I am trying to implement a simple example with custom profile by building upon
the tutorial given devzone.nordicsemi.com/.../
My profile is something like this:
I am using the FreeRTOS HRM example as the base because we need FreeRTOS in our
project. Logger is enabled to print all the debug/info data.
I am attaching the main.c file which I am using for this.
The problem is that BLE starts to advertise but then encounters a hardfault which
triggers a reset. I have got the additional log printed related to Cortex m4 registers.
Although, I am not able to trace what exactly is triggering this hardfault?
I have tried this example with gcc 2016 q2 and gcc 2017 q1 compilers and the result
remains the same.
File(main.c and image of log) are here : drive.google.com/.../0B5lr6ikuuOsxUFlaRzZla2hNZW8
Which SDK are you testing ?
If you only test with the HRM example would it work ?
There is a bug need to be fix if you use SDK v13/12 , please have a look at new issue #6 here.
The SDK in use is v12. I am able to do a lot more than running the basic HRM example. But the examples with freeRTOS generally face issues. I have attached files in the question.
Have you tried ble_app_hrs_freertos with no modification ? Could you try with gcc 4.9 2015q3 ?
If the issue still occurs, please check the call stack when hardfault occurs to see what triggered it.
ble_app_hrs_freertos example for the SDK set works fine for me with the current set up. But when I try to modify the ble_app_template example with my custom profile and freeRTOS(used exactly like hrs freertos example), I get the hardfault. The log attached in the question has some extra register values as well. Is FreeRTOS totally compatible with Nordic SDK?
Could you try to debug and check what causes the assertion ? You may want to follow this debug guide.