AnsweredAssumed Answered

ROM code in one location, but all references to another location? RELOCATE_TO?

Question asked by Carl Norman on Apr 10, 2013
Latest reply on Apr 15, 2013 by Monica Arvizu

Hi,

 

I have an external parallel flash chip that I cannot write to with my debugger. So, in production we have spare flash to store the code/constants etc, but the code is manually moved from this location to the external flash one first boot. Obviously the code is still linked to the original location, but needs to be linked to the external flash locations. I have done this in HC08 by using the linker command "relocate_to" (or something similar). How do I do this in Coldfire (MCF52259 on CW10.2 / CW10.3)?

 

i.e. in my linker

...

Production_Spare_Space         (RX): ORIGIN = 0x00070000, LENGTH = 0x0000FFFF  #Blank space during production

...

.Image2_Page:

{

For_Relocation_c.c (.data)

For_Relocation_c.c (.rodata)

For_Relocation_c.c (.text)

} Image2

 

what I want to do is something like you can in the hc08

Production_Spare_Space         (RX): ORIGIN = 0x00070000, LENGTH = 0x0000FFFF  RELOCATE_TO 0x10000000 #Blank space during production

Outcomes