You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Anuj Deshpande <an...@makerville.io> on 2016/05/05 12:58:19 UTC
Setting cflags correctly in bletiny
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>
Re: Setting cflags correctly in bletiny
Posted by Christopher Collins <cc...@apache.org>.
On Thu, May 05, 2016 at 06:28:19PM +0530, Anuj Deshpande wrote:
> 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.
[...]
Good catch, Anuj. The documentation is wrong. I'll submit a pull
request to fix that typo.
Thanks,
Chris