I am currently developing a bootloader for N548 chip from Dynastream/Nordic. I am following the project example for the S310 soft device and using IAR. The project had been running fine until I switched computers and upgraded from IAR 7.20.2.7431 to 7.40.2.8570.
Now every time I run the application it stalls when it has issued the command
sd_mbr_command_t com = {SD_MBR_COMMAND_INIT_SD, };
err_code = sd_mbr_command(&com);
When I pause the execution the instruction pointer points to 0x14fde which is somewhere inside the softdevice.
Here are the details of my project:
- Using soft device 7.1.0
- To Force bootloader address into UICR register the following code was written
#if defined ( __CC_ARM )
uint32_t m_uicr_bootloader_start_address attribute((at(NRF_UICR_BOOT_START_ADDRESS))) = BOOTLOADER_REGION_START;
#elif defined( ICCARM )
__root const uint32_t m_uicr_bootloader_start_address @ NRF_UICR_BOOT_START_ADDRESS = BOOTLOADER_REGION_START;
#endif
- Since J-Link is unable to write to UICR register when flashing chip, I use nRFgo Studio to flash the chip and then select a debug without downloading to singlestep through the project.
- List item
#if defined ( __CC_ARM )
uint8_t m_boot_settings[CODE_PAGE_SIZE] attribute((at(BOOTLOADER_SETTINGS_ADDRESS))) attribute((used));
#elif defined(ICCARM)
__root __no_init uint8_t m_boot_settings[CODE_PAGE_SIZE] @ BOOTLOADER_SETTINGS_ADDRESS;
#endif