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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

1,308 Views
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..

 

Labels (1)
0 Kudos
1 Reply

147 Views
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 Kudos