Define a value in particular address in RAM but it needs to be in the .bss list

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

Define a value in particular address in RAM but it needs to be in the .bss list

1,527件の閲覧回数
JimMcP
Contributor I
I need to define a value in RAM. This value is uninitialized and needs to be in the .bss list  (battery backed up). Using  the following syntax it is alway intialized,,,


// LCF file

   bootSec  (RWX) : ORIGIN = 0x20007FF0,  LENGTH = 0x00000008
.........

   .myData :
   {
      *(.myData)
   } > bootSec

// main.c  file

#pragma push
#pragma define_section myData ".myData" far_absolute RW
#pragma pop
__declspec(myData) long flash_process;

///////////////////////

I need it to be defined in the .bss list  at the particular ram location 0x20007FF0

Thank you in advance..

 

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

366件の閲覧回数
CrasyCat
Specialist III
Hello
 
Variables defined in .bss section are initialized with 0 at startup.
If you want to define persistent variables with CodeWarrior for MPC, look at FAQ 27500.
 
You can find it at following URL:
 
CrasyCat
0 件の賞賛