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

Program only works in SES and not standalone

Hi, I'm using blinky from the SDK12 as an example here with a nordic nrf51 DK (pca10028, onboard nrf51422) which I am using as a programmer with a custom board (with a nrf51822_XXAA). I can flash, verify etc fine, and it runs whilst in SEGGER embedded studio (using Compile and Run). However, if I try and debug the program with the debugger or run it stand alone via the J-Link commander, it enters a HardFault and jumps to 0xFFFFFEFE indefinitely.

I presume this is something to do with the entry point as if I change "Start from Entry Point Symbol" from the default no, to yes within debug project options, the debugger then works (however standlone still has the same issue). I've tried adding the bootloader options, softdevices, moving the flash around and I still haven't got any further. Any ideas?

Preprocessor Definitions:

NRF51
NRF51822
BOARD_PCA10028
NO_VTOR_CONFIG

Linker Section Placement Macros:

FLASH_START=0x1F000
SRAM_START=0x20002000
  (Linker Section Placement file from latest SEGGER embedded studio tutorial)

Linker Section Placement Segments:

FLASH RX 0x00000000 0x00040000
SRAM RWX 0x20000000 0x00004000
Related