Exclude section from .romp

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

Exclude section from .romp

895 次查看
christophschmid
Contributor I

I need to exclude an array from being initialized during boot. Therefore I added a new memory section "m_data_reset" in processor expert:

 

148653_148653.pngscreenshot.png

 

And mapped this array into my new section:

 

static uint8_t __attribute__ ((section (".m_data_reset"))) array[SIZE];

 

As expected the new section isn't initialized by "zero_fill_bss()", but it gets zeroed by "__copy_rom_sections_to_ram()". I can manually suppress this by deleting the corresponding lines from ".romp" in the linker file:

 

.romp : AT(_romp_at)

{

  __S_romp = _romp_at;

  LONG(___ROM_AT);

  LONG(_sdata);

  LONG(___data_size);

  LONG(___m_data_reset_ROMStart);  /* These lines */

  LONG(___m_data_reset_RAMStart);  /* I have to   */

  LONG(___m_data_reset_ROMSize);   /* delete      */

  LONG(0);

  LONG(0);

  LONG(0);

} > m_data

 

But as the linker file gets overwritten every time processor expert is run, I'm looking for a solution to tell processor expert to exclude this section from initialization. (Why is it included anyway in ".romp", the array isn't initialized? And it's not an array issue, a normal - non-array - variable is zeroed by "__copy_rom_sections_to_ram()" as well.)

 

The only possible solution I've found up to know is to prevent processor expert to generate the linker file at all and to maintain it manually.

 

I'm using CodeWarrior 10.6 for SKEAZN64 with the GNU tool chain.

标签 (1)
0 项奖励
回复
1 回复

497 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

hi,

The .romp is used by the linker for the ‘copy-down’ and initialization of .data.

if you want customize your own linker file, set "Generate linker file" as "no", thus the linker file will not be overwritten by processor expert.

pastedImage_0.png


Have a great day,
Jennie Zhang

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

0 项奖励
回复