Hello,
I have been following this case to create my own bootloader for nRF52810, but I'm using gcc/Segger Embedded Studio instead of Keil.
I have modified bootloader_secure_ble from SDK 14.1.0 with the mentioned files and memory settings and tried it successfully over nrf52832 hardware. Now I want to run it in my nrf52810 custom board so I have needed to change some files:
- ses_nrf52_Vectors.s
- system_nrf52.c
replaced by:
- ses_nrf52810_Vectors.s
- system_nrf52810.c
I have also rebuild micro-ecc library using the files in nrf52nf_armgcc (included in SDK 14.2.0) because nrf52810 has no FPU.
Now I have the following scenario:
- for nrf52810: HardFault at
// Copy the DFU settings out of flash and into a buffer in RAM.
memcpy((void*)&s_dfu_settings, m_dfu_settings_buffer, sizeof(nrf_dfu_settings_t));
- for nrf52832:
- if I erase all flash, program softdevice and run the bootloader from SeggerEmbeddedStudio I can't see it advertising
- if I program the softdevice and the previous version of the bootloader (the one with ses_nrf52_Vectors.s, system_nrf52.c and FPU version of the micro-ecc) and run again my new bootloader from Segger, it works as expected.
As nrf52810 crashes when trying to access m_dfu_settings_buffer I have used nrfjprog and nrfutil to read the bootloader settings page in the programed targets. I can successfully read it when the old version of the bootloader has been flashed before the new version. In the other cases I get:
Bad access at 0xFF000: not enough data to read 4 contifuous bytes
I'm not loading any application, only softdevice and bootloader. I'm not completely sure about how Segger manages the bootloader settings page, do I have to merge it with bootloader?