Hi,
I work with LPC54606 and MCXpresso (version MCUXpresso IDE v11.1.0 [Build 3209] [2019-12-12]).
I am using the "Dual Enhanced Image" feature.
I was wondering if it was possible to start a code programmed for sector 0x0 from another sector of FLASH.
I did a test with the MCUXpresso Tool and the code does not start.
Is there any way to resolve this limitation?
Hello ,
How about change the "reset handling" option to "SOFT"?
Regards,
Alice
Hello Alice,
where is located this option?
In the "Properties" project?
Regards
Hello,
I found the optional and tried it but it doesn't work.
I would like to generate a code (*.bin) with the MCUXpresso Tool that can start in any downloaded sector.
Do you think is possibile?
I need this for my custom application that writes in FLASH.
Regards
So, you want to create an application (binary) that can run at any address? This is known as position independent code (PIC). As far as I know, this is not possible with MCUXpresso and binaries. With PIC you need a loader that can read the symbols and adjust the locations immediately before the program starts to run. A binary file has all symbols and relocation information stripped from it. It would be possible to write a PIC loader from an AXF file, but not from a binary.
Thanks very much for you reply.
Yes. I would need to generate a PIC binary code with MCUXpresso.
I understand that this is not possibile.
Is that so?
Hello,
Yes, it is not possible.
You need a secondary bootloader inside address 0x00, then jump to your application.
BR
Alice
Hi,
thanks for tour answer.
Looking in the Project Properties under Settings--Miscellaneous, there is a checkbox "-fPIC".
What is the purpose of enabling this option?
Because there are some environments (such as running under Linux-like operating systems) where this is a valid option. As I said, it is possible to write a loader that reads an AXF file and performs the appropriate relocations for position independent code, but this is not possible with binary code.
OK,
thanks for the clarification.
Regards