Application built from nRF5 SDK 17.1.0 doesn't start

Hi there,

I've got a problem with getting the sample applications (and our primary application, but I'll focus on just the sample application) to run. I've got the bootloader running and with the pre-built hex files within the SDK, that is working as expected. I'm using the nrf5 SDK 17.1.0 for DFU reasons (I do have an application built on the nrf Connect SDK 2.5.0, but need DFU)

Setup:

  • MCU: nrf52832 (nRF52 DK/PCA10040)
  • Compiler: arm-none-eabi-gcc (11.2 2022.02)/make
  • Development platform/IDE in use: Windows 10 64-bit/Visual Studio Code

There is nothing in the debug log to indicate the application (in this case the ble_peripheral\ble_app_uart\pca10040\s132\armgcc application/build) started compared with the prebuilt hex:

<info> app: Inside bl main
<debug> app: In nrf_bootloader_init
<debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
<debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
<debug> nrf_dfu_settings: Using settings page.
<debug> nrf_dfu_settings: Copying forbidden parts from backup page.
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<debug> app: Enter nrf_bootloader_fw_activate
<info> app: No firmware to activate.
<debug> app: App is valid
<debug> app: Attempting to launch app
<debug> app: DFU Settings Backup
<info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<debug> app: Running nrf_bootloader_app_start with address: 0x00001000
<debug> app: Disabling interrupts. NVIC->ICER[0]: 0x4

Only change made was to remove the -Werror argument from the Makefile; everything else is unmodified.

Running "nrfjprog.exe --readregs" showed:

          R0: 0x00000004
          R1: 0x0002AB3A
          R2: 0x00026000
          R3: 0x0002CF77
          R4: 0x00050000
          R5: 0x00000000
          R6: 0x00030004
          R7: 0x00000000
          R8: 0x00000000
          R9: 0x00000000
         R10: 0x20000000
         R11: 0x00000000
         R12: 0x00000000
          SP: 0x2000FEC8
          LR: 0xFFFFFFF9
          PC: 0x0002CF76
        xPSR: 0x21000003
         MSP: 0x2000FEC8
         PSP: 0x00000000
         RAZ: 0x00000000
        CFBP: 0x00000001
        APSR: 0x20000000
        EPSR: 0x01000000
        IPSR: 0x00000003

And looking at the map file to go with the program counter; it's looking as if it's Hard Faulted:

 .text          0x0002cf4c       0x3c _build/nrf52832_xxaa/gcc_startup_nrf52.S.o
                0x0002cf4c                Reset_Handler
                0x0002cf74                NMI_Handler
                0x0002cf76                HardFault_Handler
                0x0002cf78                MemoryManagement_Handler
                0x0002cf7a                BusFault_Handler
                0x0002cf7c                UsageFault_Handler
                0x0002cf7e                SVC_Handler

Any suggestions on a potential configuration issue/build issue to get the ble_app_uart working? Using the nrf Desktop - Flash Programmer utility to program. Hex files, sdk_config and map file attached.

ble_app_uart build.zip

Kind Regards,

Trystan

Related