define a section of code in flash, it is also putting declared variables in flash

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

define a section of code in flash, it is also putting declared variables in flash

804件の閲覧回数
c393
Contributor II

I have a section defined in flash

 

 #pragma define_section  boot_text ".code" far_absolute RX 

In this section it is also putting any locate variable (uint8 loop) into flash. It should put this in ram but it links it into the flash area.

 

My .lcf file has the following:

 

 .boot_text:
 {
  MCUinit.c(.code)
  .= ALIGN (0x4);
  mcf5xxx_.s(.text)
  .= ALIGN (0x4);
  *(.code)
  . = ALIGN (0x4);
  *(.rodata)
  . = ALIGN (0x4);
  ___ROM_AT = .;
  ___DATA_ROM = .;
 } > bootcode

Why is it putting my locate variables in flash?

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

349件の閲覧回数
CrasyCat
Specialist III

Hello

 

Local variables are  allocated on the stack.

Where did you see they are allocated in Flash?

 

How did you define them?

 

CrasyCat

0 件の賞賛
返信