This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FreeRTOS with RTT

I am building the ble_app_hrs_freertos example code for a pca10040 dev board located in the SDK 12.2 at: nRF5_SDK_12.1.0_0d23e2a/examples/ble_peripheral/ble_app_hrs_freertos

I have the following 2 RTT macros define:

Makefile - NRF_LOG_USES_RTT=1 sdk_config.h - NRF_LOG_BACKEND_SERIAL_USES_RTT 1

I get the RTT logs through the debugger for a bit and then hit a hard_fault. I have no problems with RTT for non-FreeRTOS builds. Anyone have success with RTT logging within a FreeRTOS build?

Parents
  • I am using the quarterly released gcc compiler gcc-arm-none-eabi-5_4-2016q2.

    I just updated from 12.1 to 12.2 sdk and tried building and running ble_app_hrs_freertos example. The only change I made was to enable RTT in sdk_config.h

    #ifndef NRF_LOG_ENABLED #define NRF_LOG_ENABLED 1 #endif

    This routes NRF_LOG message to a UART console. This build looks to run fine if I use the make file as provided. If I disable optimizations (change -O3 to -O0 in the makefile) I see hardfaults again.

    APP:INFO:Fast Adverstising
    HARDFAULT:ERROR:Hardfault PC:597

    I also applied changes to port_cmsis_systick,c and applied the vTaskStepTick.patch and get the same Hardfault.

    Thanks

Reply
  • I am using the quarterly released gcc compiler gcc-arm-none-eabi-5_4-2016q2.

    I just updated from 12.1 to 12.2 sdk and tried building and running ble_app_hrs_freertos example. The only change I made was to enable RTT in sdk_config.h

    #ifndef NRF_LOG_ENABLED #define NRF_LOG_ENABLED 1 #endif

    This routes NRF_LOG message to a UART console. This build looks to run fine if I use the make file as provided. If I disable optimizations (change -O3 to -O0 in the makefile) I see hardfaults again.

    APP:INFO:Fast Adverstising
    HARDFAULT:ERROR:Hardfault PC:597

    I also applied changes to port_cmsis_systick,c and applied the vTaskStepTick.patch and get the same Hardfault.

    Thanks

Children
No Data
Related