Re: Linux port of NimBLE BLE Stack question

2018-11-01 Thread Martin Turon
Hi Husam,

The README for how to use the existing linux port example is here:

https://github.com/apache/mynewt-nimble/blob/master/porting/examples/linux/README.md

Martin

_
Martin Turon  |  Google


On Thu, Nov 1, 2018 at 11:46 AM, aditi hilbert  wrote:

> Hi Husam,
>
> Have you checked out the port already available?
> https://github.com/apache/mynewt-nimble/tree/master/porting/npl/linux <
> https://github.com/apache/mynewt-nimble/tree/master/porting/npl/linux>
>
> thanks,
> aditi
>
> > On Nov 1, 2018, at 11:00 AM, Husam Elfadil 
> wrote:
> >
> > Dear NimBLE Support,
> >
> > I read about the NimBLE BLE stack and it looks interesting. I'm trying
> to port it to Linux and just play with it a little bit and see how it
> works. However, I had trouble in getting started with the porting process
> as there is not much information on how to do it for Linux. Could you
> briefly give a steps to do the porting of the stack to Linux and run some
> of your sample apps. Please not that I'm working with a 64-bit Ubuntu
> 18.04. I appreciate your help.
> >
> > Best Regards,
> > Husam
>
>


Upcoming compatibility-breaking change

2018-11-01 Thread Christopher Collins
Hello all,

I wanted to give a heads up: a compatibility-breaking change will likely
be made to the `mynewt-core` and `mynewt-nimble` repos soon.  These
repos will no longer be compatible with older versions of newt.  If you
use development versions of these repos, I suggest you upgrade to the
latest development version of newt now.

You can read the details of this change in the following PRs:

Newt: https://github.com/apache/mynewt-newt/pull/230 (merged)
Core: https://github.com/apache/mynewt-core/pull/1486
Nimble: https://github.com/apache/mynewt-nimble/pull/232

I will not merge these PRs until 2018-11-05 (Monday) at the earliest.
If you have any objections or other feedback, please don't hesitate to
share them here or as PR comments.

A summary of the change is reproduced below:

This change adds four newt commands:

newt target sysinit show 
newt target sysinit brief 
newt target sysdown show 
newt target sysdown brief 

Both sysinit commands produce a report of all the sysinit entries
configured for the target. The sysdown commands are similar; they
show sysdown entries rather than sysinit entries.

This change attempts to address two problems:

1. It is difficult to know the exact order of package initialization
and shutdown. The brief commands allow this information to be
visualized in a condensed table.

2. The sysinit or sysdown stages chosen used by third-party packages
may not be suitable for a particular target. This change allows
syscfg settings to be used as stage numbers. The expectation is that
all packages will define syscfg settings for their sysinit and
sysdown stages. This allows the target to reorder the stages by
overriding the corresponding syscfg settings.

I wanted to make this change backwards compatible via an injected newt
syscfg setting, e.g.,

pkg.init.NEWT_FEATURE_SYSCFG_STAGES:
log_init: 'MYNEWT_VAL(LOG_SYSINIT_STAGE)'

pkg.init.!NEWT_FEATURE_SYSCFG_STAGES:
log_init: 100

Unfortunately, this is not possible, as the old newt does not allow
conditionals to be applied to pkg.init.  This is fixed by the merged
newt PR, but that doesn't help us in the short term.

I think it is still worth it to get this change in.  When 1.6.0 is
released, we can make sure to add the appropriate newt version
restriction.

Thanks,
Chris


Re: Linux port of NimBLE BLE Stack question

2018-11-01 Thread aditi hilbert
Hi Husam,

Have you checked out the port already available?
https://github.com/apache/mynewt-nimble/tree/master/porting/npl/linux 


thanks,
aditi

> On Nov 1, 2018, at 11:00 AM, Husam Elfadil  wrote:
> 
> Dear NimBLE Support,
> 
> I read about the NimBLE BLE stack and it looks interesting. I'm trying to 
> port it to Linux and just play with it a little bit and see how it works. 
> However, I had trouble in getting started with the porting process as there 
> is not much information on how to do it for Linux. Could you briefly give a 
> steps to do the porting of the stack to Linux and run some of your sample 
> apps. Please not that I'm working with a 64-bit Ubuntu 18.04. I appreciate 
> your help.
> 
> Best Regards,
> Husam



Linux port of NimBLE BLE Stack question

2018-11-01 Thread Husam Elfadil
Dear NimBLE Support,

I read about the NimBLE BLE stack and it looks interesting. I'm trying to port 
it to Linux and just play with it a little bit and see how it works. However, I 
had trouble in getting started with the porting process as there is not much 
information on how to do it for Linux. Could you briefly give a steps to do the 
porting of the stack to Linux and run some of your sample apps. Please not that 
I'm working with a 64-bit Ubuntu 18.04. I appreciate your help.

Best Regards,
Husam


Re: Setting up RISC-V toolchain for Linux

2018-11-01 Thread Andrey Serdtsev
There is riscv64 package in compiler folder. Why not to try it?
Just change 'bsp.compiler' value in your bsp.yml.


On 01.11.2018 3:30, PEIJIE LI wrote:
> Hi,
>  I am trying to set up RISC-V as the toolchain on a Linux system. But I 
> am getting an error saying "sys/mman.h: No such file or director”. Here is 
> what I did:
>  1. I installed newt by following the instructions on “Installing Newt on 
> Linux”
>  2. I then modified the 
> /repos/apache-mynewt-core/compiler/sim/compiler.yml 
> file to change the default gcc-5 to riscv64-unknown-elf-gcc.
>  3. I ran newt test @apache-mynewt-core/sys/config
>  The full error message is
>  hw/bsp/native/src/sbrk.c:20:10: fatal error: sys/mman.h: No such file or 
> directory
>  #include 
>^~~~
>  compilation terminated.
>  Error: Test failure(s):
>  Passed tests: []
>  Failed tests: [sys/config/test-fcb sys/config/test-nffs]
>
>  And all tests passed before I changed the compiler.yml file.
>  The error messages is saying there is a missing file, but I don’t really 
> know how I can fix it. I don’t have much experience in doing this, so any 
> advice will be helpful!
>  Thank you very much!
>  Best,
>  Peijie