<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Codewarrior DSC linker map file in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-DSC-linker-map-file/m-p/1493408#M15713</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm working on an old project with Codewarrior 8.3 and DSC 56F8347.&lt;/P&gt;&lt;P&gt;In the linker cmd file (used by Codewarrior) the RAM section is the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;.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=.;

} &amp;gt; .x_Data&lt;/LI-CODE&gt;&lt;P&gt;In the xmap file, I have following segments addressed:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;BSS address start&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000104&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;BSS length&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000511&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;BSS address end&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000615&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;HEAD address start&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000618&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;HEAP length&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;HEAP address end&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000718&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;STACK address start&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000718&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;STACK address length&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;STACK address end&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000C18&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Furthermore, I have in the xmap BSS section all variable listed in address order with own size.&lt;/P&gt;&lt;P&gt;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)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;   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)&lt;/LI-CODE&gt;&lt;P&gt;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&amp;nbsp;an example with the variable at address 0x00000223)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;   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)&lt;/LI-CODE&gt;&lt;P&gt;I have searched for xmap documention but didn't find anything.&lt;/P&gt;&lt;P&gt;Someone can give me a tip? What is the "B" on the left side of this variables?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2022 14:51:00 GMT</pubDate>
    <dc:creator>Lucas42</dc:creator>
    <dc:date>2022-07-21T14:51:00Z</dc:date>
    <item>
      <title>Codewarrior DSC linker map file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-DSC-linker-map-file/m-p/1493408#M15713</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm working on an old project with Codewarrior 8.3 and DSC 56F8347.&lt;/P&gt;&lt;P&gt;In the linker cmd file (used by Codewarrior) the RAM section is the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;.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=.;

} &amp;gt; .x_Data&lt;/LI-CODE&gt;&lt;P&gt;In the xmap file, I have following segments addressed:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;BSS address start&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000104&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;BSS length&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000511&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;BSS address end&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000615&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;HEAD address start&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000618&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;HEAP length&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;HEAP address end&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000718&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;STACK address start&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000718&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;STACK address length&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;STACK address end&lt;/TD&gt;&lt;TD width="50%"&gt;0x00000C18&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Furthermore, I have in the xmap BSS section all variable listed in address order with own size.&lt;/P&gt;&lt;P&gt;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)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;   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)&lt;/LI-CODE&gt;&lt;P&gt;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&amp;nbsp;an example with the variable at address 0x00000223)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;   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)&lt;/LI-CODE&gt;&lt;P&gt;I have searched for xmap documention but didn't find anything.&lt;/P&gt;&lt;P&gt;Someone can give me a tip? What is the "B" on the left side of this variables?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 14:51:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-DSC-linker-map-file/m-p/1493408#M15713</guid>
      <dc:creator>Lucas42</dc:creator>
      <dc:date>2022-07-21T14:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior DSC linker map file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-DSC-linker-map-file/m-p/1493991#M15714</link>
      <description>&lt;P&gt;Does anyone have any information on the meaning of that "B"?&lt;/P&gt;&lt;P&gt;Or any information/documentation on xmap file format?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 10:13:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-DSC-linker-map-file/m-p/1493991#M15714</guid>
      <dc:creator>Lucas42</dc:creator>
      <dc:date>2022-07-22T10:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior DSC linker map file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-DSC-linker-map-file/m-p/1501051#M15724</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Pls refer the description in the screenshot:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1659609254521.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/189092i7A4047A9AEBAA4EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1659609254521.png" alt="xiangjun_rong_0-1659609254521.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I attach the doc Targeting_56800E_cd.pdf&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 10:36:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-DSC-linker-map-file/m-p/1501051#M15724</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-08-04T10:36:37Z</dc:date>
    </item>
  </channel>
</rss>

