Can we store hex data through UART into flash and RUN it from that particular location

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

Can we store hex data through UART into flash and RUN it from that particular location

1,302 Views
keerthana_r
Contributor II
I am trying to store my hex file in another sector of the flash memory i.e (0x00050000) I want to store a hex file at different sector of the flash and to change the execution point to that address through my bootloader. I am able store and change the address through the MCUExpress IDE. Now i want achieve the same without using the IDE.

Through IDE:-
I have flashed the .hex file at 0x00050000 and i'm changing the execution pointer to this address through MCUExpress IDE settings. At 0x00000000 i have my boot loader code which changes the execution point to 0x00050000.

When i write the .hex file(Some data)(Image 2) content at the location 0x00050000 , i observe that the stored hex data at the address is different . I checked it through flash magic. My data is being displayed in the ASCII region rather than the Hex region of the display memory in flash magic.

                                  Flash_Magic_3.png

                                       The Hex Data and its ascii form when observed through flash.

                                HexStringThrougCont.png

                           Hex data when written through the application code is being converted to some format.

So how to copy the hex into flash through application code ? Is there any conversion happens while flashing the hex file?

Labels (1)
0 Kudos
1 Reply

922 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I check below tech document for your reference:

HEX File to Array in C: 10 Steps 

Wish it helps.


Have a great day,
Mike

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos