Clarifications on "Dual Enhanced Image" feature

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clarifications on "Dual Enhanced Image" feature

958 Views
Rainbow73
Contributor III

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?

0 Kudos
9 Replies

946 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

How about change the "reset handling" option to "SOFT"?

 

Regards,

Alice

0 Kudos

939 Views
Rainbow73
Contributor III

Hello Alice,

where is located this option?

In the "Properties" project?

Regards

0 Kudos

936 Views
Rainbow73
Contributor III

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

0 Kudos

929 Views
converse
Senior Contributor V

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.

0 Kudos

924 Views
Rainbow73
Contributor III

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?

 

0 Kudos

901 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

Yes, it is not possible.

You need a secondary bootloader inside address 0x00, then jump to your application.

 

BR

Alice

0 Kudos

895 Views
Rainbow73
Contributor III

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?

0 Kudos

890 Views
converse
Senior Contributor V

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.

0 Kudos

879 Views
Rainbow73
Contributor III

OK,

thanks for the clarification.

Regards

0 Kudos