Hi,I'm working on a project that I need relocate some code into ram,and I successed,after that I want to generate a S19 file only have this segment with ram address . I changed the linker file ,the address in the S19 file is still the flash address.What I should do to generate the right S19 file only cantain the code segment with the ram address without other code.The mcu is MK64,Thank you!
Hello fei Gao,
I can't immediately see how this can be done as part of a build step - the relocation items are just part(s) a binary that will change during development.
Also, you may already have done this but I would suggest you take a look at the MCUXpresso IDE User Guide V11.0:
- 18.13 Placement of specific code/data items
- 18.15 FreeMarker Linker Script Template Examples
These options may simplify the generation (and placement) of code to be relocated.
One rather crude option might be to save the RAM section after the relocation has been performed. The default Memory view in MCUXpresso IDE supports Export and Import options - once done the binary file could be converted to srecord format.
In MCUXpresso IDE v11.0.0, the new Image Information feature should make it easier to locate the address range of the relocated area to capture.
I hope this helps,
Yours,
MCUXpresso IDE Support
Hi,
I successed got a S19 file only with the ram address that I relocated.I modified the startup file,deleted some code.I found the code didn't referenced by main wouldn't be compile.How can I change the compile option in MCUXpresso.
Thank you!
Hi ,
Thank you for your support. I rewrite the linker file, now I can get a S19 file with the ram address that I relocated,But,there's still flash code in the S19 file. I tried deleted the other section in the linker file ,but that would get some errors occured. I found the reason is that in the startup file defined some section.
I will check the User Guide again.
Thank you !
Hello fei Gao,
Yes, after relocate code into RAM, the code should still in FLASH, it is just executed from RAM.
Or after re-power , the code disappeared.
And S19 only includes code and data in FLASH.
Have a great day,
TIC
-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------
Hi,Alice_Yang
Thank you for your answer,I successed generated a S19 file with ram address,but now there's still flash code in the S19 file.