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

Blinky FreeRTOS does not run when DFU bootloader and softdevice is present

I have an application that currently does not use the soft device, but I want to use the dfu bootloader. The application runs fine if only the soft device is present, but as soon as I add a dfu bootloader, the app crashes as soon as the RTOS is started, i.e. when interrupts start to run. (ends up in NMI_Handler).

To try to see if it was my application that had problems, I took the examples\peripheral\blinky_freertos and modified the linker configuration so that the blinky app starts at 0x1c000, RAM 0x20002080-0x2000ffff. (On PCA10040)

This works with S132 soft device programmed onto the nRF52, but when the DFU bootloader is in addition added, the application starts but crashes as soon as the RTOS is started (i.e. interrupts are started). Here it crashes with hardfault.

Debugger settings for vector table: --drv_vector_table_base=0x0 (Runs in debugger if this is not set)

DFU bootloader used is the predefined one from examples, dual bank, s132, PCA10040

My question is: does the DFU bootloader forward the interrupt vectors correctly or does the application have to add something related to the soft device, even if it does not use the soft device?

I use the released SDK11.

Toolchain IAR 7.60.1

Parents
  • blinky_freertos_s132.zip

    Works with attached modified project file for s132

    • minor change in main.c, not reconfiguring clock when SOFTDEVICE_PRESENT defined

    The blinky_FreeRTOS_s132_pca10040.ewp is almost identical to the original:

    • has SOFTDEVICE_PRESENT define added
    • uses linker config file blinky_FreeRTOS_iar_nRF5x_S132.icf
    • and has excluded the following 2 files from building: nrf_nvic.c and nrf.soc.c (functions used are replaced by those in softdevice\s132\headers
    • include directories no longer points to components\drivers_nrf\nrf_soc_nosd
    • added components\softdevice\s132\headers to include directories
Reply
  • blinky_freertos_s132.zip

    Works with attached modified project file for s132

    • minor change in main.c, not reconfiguring clock when SOFTDEVICE_PRESENT defined

    The blinky_FreeRTOS_s132_pca10040.ewp is almost identical to the original:

    • has SOFTDEVICE_PRESENT define added
    • uses linker config file blinky_FreeRTOS_iar_nRF5x_S132.icf
    • and has excluded the following 2 files from building: nrf_nvic.c and nrf.soc.c (functions used are replaced by those in softdevice\s132\headers
    • include directories no longer points to components\drivers_nrf\nrf_soc_nosd
    • added components\softdevice\s132\headers to include directories
Children
No Data
Related