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,212件の閲覧回数
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 解決策
995件の閲覧回数
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 返答(返信)
996件の閲覧回数
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

995件の閲覧回数
Monica
Senior Contributor III

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

0 件の賞賛
返信