I want to place some code and data into a specific Internal RAM area, but when I follow the steps told in the application note CodeWarrior Linker Command File (LCF) for Qorivva/PX(AN4497), I failed. Here is my program.
(1)Create New RAM Segment in .lcf
(2)Create New RAM Section in .lcf
(3)Relocating Code and Data in Internal RAM
Then when I compile this project in CodeWarrior 2.10, an error showed below occurs.
Who can help me solve this error. Thank you very much.
It'll be apparetnly because variable 'xxxx' would normally go into .bss section. I have found in Power Architecture Build Tools Reference example below that shows how to defined two sections, one for initialized parts, second for uninitialized parts:
// you do not have to use the names in this example
// .red is the initialized part of the section
// .blue is the uninitialized part of the section
#pragma section RW “.red” “.blue” data_mode = sda_rel
Or you could just use initialized variable.