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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,205 次查看
CarlFST60L
Senior Contributor II

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

标签 (1)
1 解答
988 次查看
CarlFST60L
Senior Contributor II

I think the right way to do this is covered here in , although this example is not correct as it uses .data, I only want to use the flash. I will post it up tomorrow when the code is running in case someone finds this thread later searching for the same solution.

http://www.freescale.com/files/soft_dev_tools/doc/app_note/AN4329.pdf

Section 5.2.1

在原帖中查看解决方案

2 回复数
989 次查看
CarlFST60L
Senior Contributor II

I think the right way to do this is covered here in , although this example is not correct as it uses .data, I only want to use the flash. I will post it up tomorrow when the code is running in case someone finds this thread later searching for the same solution.

http://www.freescale.com/files/soft_dev_tools/doc/app_note/AN4329.pdf

Section 5.2.1

988 次查看
Monica
Senior Contributor III

Thanks a lot for sharing Carl, please keep us posted!

0 项奖励
回复