Hi all,

I am on 64 bit 16.04 Ubuntu with a manually installed toolchain which has
been added to my path.

Before building the app, while setting the cflags for the target, the
documentation says that one should not give the - symbol.

http://mynewt.incubator.apache.org/os/tutorials/bletiny_project/

I had to give that to get it to build. Here's the error -

➜  myapp1 newt target set myble build_profile=optimized
Target targets/myble successfully set target.build_profile to optimized
➜  myapp1 newt target set myble cflags=DSTATS_NAME_ENABLE
Target targets/myble successfully set pkg.cflags to DSTATS_NAME_ENABLE
➜  myapp1 newt target show
targets/my_blinky_sim
    app=apps/blinky
    bsp=@apache-mynewt-core/hw/bsp/native
    build_profile=debug
targets/myble
    app=@apache-mynewt-core/apps/bletiny
    bsp=@apache-mynewt-core/hw/bsp/nrf52dk
    build_profile=optimized
    cflags=DSTATS_NAME_ENABLE
➜  myapp1 newt build myble
Building target targets/myble
Error: arm-none-eabi-gcc: error: DSTATS_NAME_ENABLE: No such file or directory

I fixed this with -

➜  myapp1 newt target set myble cflags=-DSTATS_NAME_ENABLE
Target targets/myble successfully set pkg.cflags to -DSTATS_NAME_ENABLE
➜  myapp1 newt target show
targets/my_blinky_sim
    app=apps/blinky
    bsp=@apache-mynewt-core/hw/bsp/native
    build_profile=debug
targets/myble
    app=@apache-mynewt-core/apps/bletiny
    bsp=@apache-mynewt-core/hw/bsp/nrf52dk
    build_profile=optimized
    cflags=-DSTATS_NAME_ENABLE
➜  myapp1 newt build myble
Building target targets/myble
Compiling gatt_svr.c
Compiling main.c

<snip>

Reply via email to