I have a project from 3 years ago (2018) that I'm trying to make a simple update to the application code. The code downloads via the Segger Embedded Studio and runs correctly. However, when I use my release batch file (attached below) and load via nRF Go Studio (same process used 3 years ago), it the application code fails to run. My phone's Bluetooth menu shows a "dfu" device which makes me think the device is stuck in the bootloader and not jumping to the application code. Can someone help me understand why?
More details:
-Our bootloader is custom. I don't recall what is custom about it, but I believe the changes were minimal. Either way, we're still using the exact same bootloader hex image we used 3 years ago.
-The release batch file merges the Application, SoftDevice, and Bootloader together. When I update this file to exclude the Bootloader and then flash via nRF Go Studio, it runs application code correctly.
-I've never used the PC app of nRF Connect before now, but when I do and load our output hex image, it complains about "Overlapping data around address 0x40a24". It complains about anything I build now (App + SD + Boot AND ALSO App + SD), but does NOT complain when I load in our old release HEX image from 3 years ago.
-We're using Rigado 320-00040 module which has nRF52832 onboard
-We're using SoftDevice "s132_nrf52_6.0.0_softdevice.hex"
-Looks like we used SDK 15.0.0...
-Maybe it's due to updated nrfutil tools?
-Here are the Bootloader settings reported by the release batch file:
Bootloader DFU Settings:
* File: boot_setting.hex
* Family: nRF52
* Start Address: 0x0007F000
* CRC: 0x2E46D307
* Settings Version: 0x00000001 (1)
* App Version: 0x00000001 (1)
* Bootloader Version: 0x00000001 (1)
* Bank Layout: 0x00000000
* Current Bank: 0x00000000
* Application Size: 0x0001AB64 (109412 bytes)
* Application CRC: 0x1C9F9E01
* Bank0 Bank Code: 0x00000001
* Softdevice Size: 0x00000000 (0 bytes)
* Boot Validation CRC: 0x00000000
* SD Boot Validation Type: 0x00000000 (0)
* App Boot Validation Type: 0x00000000 (0)
The production team is on hold waiting on me to get this released, but I'm stuck here. Please help!!
@echo off set FW_APP_FILE= ../App/ses/Output/Debug/Exe/Output.hex set FW_BT_FILE= ../Bootloader/ses/Output/Release/Exe/secure_bootloader_ble_s132.hex set SOFTDEVICE_FILE= ../vendor/nRF5_SDK/components/softdevice/s132/hex/s132_nrf52_6.0.0_softdevice.hex set PRIVATE_KEY_FILE= ../Bootloader/dfu_private.key set TARGET_APP_ZIP_FILE= dfu_devkit.zip set TARGET_MERGED_HEX_FILE= final_merged.hex REM Generate Boot Settings file nrfutil settings generate --no-backup --family NRF52 --sd-boot-validation --application %FW_APP_FILE% --application-version 1 --bootloader-version 1 --bl-settings-version 1 boot_setting.hex REM Combine Bootloader with Boot Settings file mergehex -m %FW_BT_FILE% boot_setting.hex -o merged_bt_btset.hex REM Combine above with SoftDevice file mergehex -m merged_bt_btset.hex %SOFTDEVICE_FILE% -o merged_bt_btset_sd.hex REM Combine above with Application file mergehex -m merged_bt_btset_sd.hex %FW_APP_FILE% -o %TARGET_MERGED_HEX_FILE% REM Delete extra files that are no longer necessary del merged_bt_btset.hex merged_bt_btset_sd.hex boot_setting.hex set /p DUMMY=Hit ENTER to continue...