Hello NXP Community,
I'm encountering an issue while trying to load an application to MCUboot during the debug process. Here are the steps I've taken and the problems I'm facing:
Steps Taken:
Post-Build Script:
I created a post-build script that signs the application.
Loading the Signed .bin File:
load path/file_signed.elf 0x60...
To perform this task, I followed these articles:
Problems Encountered:
Alternative Method Tried:
Request for Assistance:
Thank you for your help!
Best regards,
Hi @MassimilianoPegaso ,
Thanks for your interest in NXP MIMXRT series!
Frankly the operation you mentioned is not something that anyone has gone through internally to do something similar, nor is it a standardized process. But from your description, the whole workflow would be very elegant if it could be implemented. It's very interesting. I'm not sure if this will work but will give what you mentioned a try. Once you find something new please don't hesitate to discuss it with us.
Best regards,
Gavin
Hi @MassimilianoPegaso ,
Thanks for your patience!
Following the reference link you gave, I tested it locally. https://mcuoneclipse.com/2022/11/01/loading-multiple-binary-files-with-gdb/
It is possible to load the MCUBoot project using GDB. The operation is consistent with the documentation. Here are my test results for reference:
Best regards,
Gavin
Hi @Gavin_Jia,
I use an MCU-link as a debugger interface. To manually load the signed application, I use a command like this:
LinkServer.exe flash MIMXRT1052xxxxB:IMXRT1050_Refill load C:\application_signed.bin --addr 0x60100000
I need to specify the flash command because I need to load this application onto a custom board that uses a different flash memory than the EVK board.
It work, the problem is that I don't know how to run this code automatically in the IDE. I tried a solution like this:
But it doesn't work; it seems that the command is completely ignored. I don't know how to check if the command reports an error when it is executed.
I tried various combinations of the command: I placed it in the initialization command section, in the run command section, and I tried the GDB version (like load data.bin.elf 0x70000). I attempted it with and without flash in front of it or on the previous line. Nothing changed; the load is never performed.
As a completion, the initialization command section included this command:
set non-stop on
set pagination off
set mi-async
set remotetimeout 60000
##target_extended_remote##
set mem inaccessible-by-default ${mem.access}
mon ondisconnect ${ondisconnect}
set arm force-mode thumb
${load}
Best regards.
Massimiliano
Hi @MassimilianoPegaso ,
Thanks for your update.
I tried your procedure with similar results. Also, I tried adding scripts, and if there are errors in the commands in the scripts, the IDE points them out when running Debug and the operation is interrupted:
So I think the commands in the script were actually executed successfully, except that in a subsequent operation, the IDE emptied the previous signed.bin file again. If you're just trying to burn it into flash and the command line succeeds, I don't think we actually need to stick to the IDE point-and-click-and-succeed approach.
It's perfectly fine to try writing scripts or executing it via the post-build command after compiling, after all, this operation doesn't require the IDE's debugging capabilities.
Best regards,
Gavin