Hi,
I'm working on an old project with Codewarrior 8.3 and DSC 56F8347.
In the linker cmd file (used by Codewarrior) the RAM section is the following:
.ApplicationData :
{
# save space for the pROM data copy
. = ALIGN(2);
. = __xRAM_data_start + __data_size;
# .bss sections
* (rtlib.bss.lo)
* (rtlib.bss)
. = ALIGN(4);
F_Xbss_start_addr = .;
_START_BSS = .;
* (.bss.char) # used if "Emit Separate Char Data Section" enabled
* (.bss)
_END_BSS = .;
F_Xbss_length = _END_BSS - _START_BSS;
/* Setup the HEAP address */
. = ALIGN(4);
_HEAP_ADDR = .;
_HEAP_SIZE = 0x00000100;
_HEAP_END = _HEAP_ADDR + _HEAP_SIZE;
. = _HEAP_END;
/* SETUP the STACK address */
_min_stack_size = 0x00000500;
_stack_addr = _HEAP_END;
_stack_end = _stack_addr + _min_stack_size;
. = _stack_end;
/* EXPORT HEAP and STACK runtime to libraries */
F_heap_addr = _HEAP_ADDR;
F_heap_end = _HEAP_END;
F_Lstack_addr = _HEAP_END;
F_StackAddr = _HEAP_END;
F_StackEndAddr = _stack_end - 1;
# runtime code __init_sections uses these globals:
F_Ldata_size = __data_size;
F_Ldata_RAM_addr = __xRAM_data_start;
F_Ldata_ROM_addr = __pROM_data_start;
F_xROM_to_xRAM = 0x0000;
F_pROM_to_xRAM = 0x0001;
F_start_bss = _START_BSS;
F_end_bss = _END_BSS;
__DATA_END=.;
} > .x_DataIn the xmap file, I have following segments addressed:
| BSS address start | 0x00000104 |
| BSS length | 0x00000511 |
| BSS address end | 0x00000615 |
| HEAD address start | 0x00000618 |
| HEAP length | 0x00000100 |
| HEAP address end | 0x00000718 |
| STACK address start | 0x00000718 |
| STACK address length | 0x00000500 |
| STACK address end | 0x00000C18 |
Furthermore, I have in the xmap BSS section all variable listed in address order with own size.
Tha main problem is that some of this variables haves an address that is outside the BSS section even if they are in the BSS section and on the left of this variable, near the address, a "B" is listed (follow an example)
000003A7 00000001 .bss FsTxStato (sci.c)
000003A8 00000001 .bss FsRxStato (sci.c)
B 00000750 00000001 .bss FgFasiTestCLAMP2 (T0_Test.c)
B 00000751 00000001 .bss FgFasiTestCLAMP1 (T0_Test.c)
B 00000752 00000001 .bss FgCLAMP2InTest (T0_Test.c)
B 00000753 00000001 .bss FgCLAMP1InTest (T0_Test.c)
000003AA 00000001 .bss FSR_lock (Cpu.c)
000003AB 00000001 .bss FSR_reg (Cpu.c)The second problem is that some variable in the BSS section haves the address inside the BSS section but are out of order and searching for their address seems to be overlapped with other variable. Also those variables haves a "B" on the left side. (follows an example with the variable at address 0x00000223)
00000111 00000001 .bss FsStatoAd (AD.c)
B 00000223 00000001 .bss FgOutFlg (AD.c)
00000112 00000001 .bss FsTastoStopOld (Alarm_Manager.c)
...
...
...
00000216 00000054 .bss FgDpTimer100ms (EM_01_Scheduler.c)
0000026A 0000001E .bss FgDpTimer5ms (EM_01_Scheduler.c)
00000288 000000D2 .bss FgDpTimer1ms (EM_01_Scheduler.c)I have searched for xmap documention but didn't find anything.
Someone can give me a tip? What is the "B" on the left side of this variables?
Thanks
.
Does anyone have any information on the meaning of that "B"?
Or any information/documentation on xmap file format?
Thanks.