[riot-devel] nrf52, nordic soft device and riot-os
robert at sephix.com
Fri Sep 9 07:14:40 CEST 2016
Thank you for the quick response. Your suggestions were very useful.
>> I'm currently trying to use RIOT-OS with the Nordic SDK Softdevice S132.
> I assume you're not targeting the nrf52dk?
[RH] I am targeting the nrf52dk.
>> Unfortunately, when trying to use the shell, the moment that I type
>> anything into the shell and hit 'enter', I get a hard fault. Seen here:
> Does it work in the examples (e.g., gnrc_networking)?
[RH]I used the hello-world example, imported the shell module, and new
nordic sdk package. I was able to get the example running, but only with
the compiler optimizer on (ie, -Os). With the gcc optimizer off ( ie,
-O0 ), the hello world example still runs into the same problem. To be
clear, aside from initializing the softdevice handler (in cpu.c), there
is no code in main that interacts with the softdevice.
>> If I do not hit "enter" in the shell, the application / test code
>> continues to run (albeit most of the code is sitting idle except for the
>> isr that is manipulating the led).
> Are you using pyterm? (pyterm buffers serial input until enter is
> pressed). If yes, please try another terminal emulator and confirm that
> the first serial input character leads to the crash.
[RH] Using minicom, I confirmed that the first serial input character
led to the crash. (but only with optimizer off)
>> I'm looking for suggestions on what else to check. Help is appreciated.
> How I love debugging blobs. ;)
[RH] Apologies if the first email was a bit vague.
[RH] I had the optimizer off so that I could use the debugger
effectively. The optimizer was disabled by overriding the CFLAGS_OPT
variable in the example Makefile. I'm using ARM GCC (arm-none-eabi-gcc)
Is there some part of the build / OS that assumes/requires optimization
to be turned on? Or do you suppose this is simply a 'size' issue
relating to larger code size with the optimizer off?
More information about the devel