Hello everybody,
Im developing a Zephyr application without MCUXpresso IDE, i wrote a launch configuration in my launch.json file to connect to a remote LinkServer instance connected to a FRDM_MCXN957 board, this currently works flawlessly.
The issue at hand is that now im developing the application to be booted by MCUBoot, and thus it should be flashed as a signed image at a specific flash offset (being 0x14000 by how i defined the partitions), it seems like the configuration is loading the .elf directly, so there's no informations on the signing and MCUBoot doesnt recognize any image in the slots, failing to boot.
I tried modifying the launch configuration adding a step where it flashes in memory the correct signed image after connecting and loading symbols, but its currently not yielding any effect, here is the config:
{
"type": "cppdbg",
"name": "Remote NXP",
"request": "launch",
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"program": "${workspaceFolder}/build/frdm_mcxn947_for_bootloader/zephyr/zephyr.elf",
"miDebuggerPath": "/home/fez/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb",
"miDebuggerServerAddress": "192.168.1.70:3333",
"stopAtEntry": true,
"setupCommands": [
{"text": "set remotetimeout 600"},
{"text": "set debug-file-directory"},
{"text": "set non-stop off"}
],
"postRemoteConnectCommands": [
{
"text": "load"
},
{
"text": "flash MCXN947 load ${workspaceFolder}/build/frdm_mcxn947_for_bootloader/zephyr/zephyr.signed.bin -a 0x14000"
},
{
"text": "monitor reset"
}
],
},
If i manualy flash with LinkServer with the same command in a terminal and then reset the board with the dedicated button the application is correctly booted and run, so the image itself is fine
I've been battling with this issue for the last few days with no success, so any help is greatly appreciated, thank you in advance