Requirement: to create a RAM section and place it a specific memory location, for MPC5606B (very simple!)
Tools used: CW, LCF file, TRK-MPC5606B evaluation board
Sample code:
#pragma push
#pragma section sdata_type ".myRamData" ".myRamData"
extern unsigned char myU8Data; /*prototype */
unsigned char myU8Data; /*definition*/
#pragma pop
LCF:
MEMORY
{
boot_flash: org = 0x00000000, len = 0x00010000
interrupts_flash: org = 0x00010000, len = 0x00010000
internal_flash: org = 0x00020000, len = 0x00060000
add_data_flash: org = 0x00080000, len = 0x00000100
add_code_flash: org = 0x00080100, len = 0x00000100
internal_ram: org = 0x40000000, len = 0x00007B00
add_data_ram: org = 0x40007B00, len = 0x00000100
stack_ram: org = 0x40007C00, len = 0x0400
}
SECTIONS
{
...
.myRamData (DATA) : {} > add_data_ram
...
}
Result: The result is good as I am able to see the section created in MAP file (see below)
.myRamData section layout
Starting Virtual File
address Size address offset
---------------------------------
00000000 000001 40007b00 00000358 1 .myRamData main.o
00000000 000001 40007b00 00000358 1 myU8Data main.o
Problem faced:
However a Linker warning is issued as follows:
Overlap of the ROM image address of .myRamData section with executable address of .text_vle section.
Project: LINFlex_LIN_Example.mcp, Target: LINFlex_LIN-flash
How to remove this warning.
P.S: If you already guessed it, then yes you are correct, I am using the example workspace for LIN that comes along with the EVB.
Thanks in advance.
Regards,
Gopal.