<?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>Classic/Legacy CodeWarriorのトピック56800E Linker Command file  for 56F8367 question</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-Linker-Command-file-for-56F8367-question/m-p/649279#M7327</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tool: Codewarrior tool for DSC56800/E version 8.3 build 091203&lt;/P&gt;&lt;P&gt;target: 56F8367 processor&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having issue of string constant. The code below to initialize a Global char array does not work (the array elements have wrong data when later being read out as ex: serial_dr = String[0] does not TX out ascii H correctly) :&lt;/P&gt;&lt;P&gt;char String[] = "Hello";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// defined as global variable&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when assigning the array individually in main(), as below, it works (serial_dr=String[1] does send out 'e' ascii)&lt;/P&gt;&lt;P&gt;String[0]='H';&lt;/P&gt;&lt;P&gt;String[1]='e';&lt;/P&gt;&lt;P&gt;String[2]='l';&lt;/P&gt;&lt;P&gt;String[3]='l';&lt;/P&gt;&lt;P&gt;String[4]='o';&lt;/P&gt;&lt;P&gt;String[5]='\0';&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked into the Linker command file trying to understand how the tool writing the "Hello" string into the array. Does the tool write the string "Hello" into p_flash_ROM_data(RX) (which is located in the program flash memory block as the executable code), and then when the code runs after power reset, the code copies the string from p_flash into the array String[] (in internal RAM)?&lt;/P&gt;&lt;P&gt;(It seems the p_flash_ROM_data section is located right after the executing code section. How does the tool know if the p_flash_ROM_data does not written over the chip's p_flash ROM total area with a very large string constant for example?)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MEMORY &lt;BR /&gt;{&lt;BR /&gt; .p_interrupts_ROM (RX) : ORIGIN = 0x0000, LENGTH = 0x00AC # reserved for interrupts&lt;BR /&gt; .p_flash_ROM (RX) : ORIGIN = 0x00AC, LENGTH = 0x3FF54 # 256K words contiguous flash minus interrupt space&lt;/P&gt;&lt;P&gt;# p_flash_ROM_data mirrors internal xRAM, mapping to origin and length&lt;BR /&gt; # the "X" flag in "RX" tells the debugger to download to p-memory.&lt;BR /&gt; # the download to p-memory is directed to the address determined by AT&lt;BR /&gt; # in the section definition below. &lt;BR /&gt; &lt;BR /&gt; .p_flash_ROM_data (RX) : ORIGIN = 0x0001, LENGTH = 0x3FFF # internal xRAM mirror&lt;/P&gt;&lt;P&gt;.p_boot_flash_ROM (RX) : ORIGIN = 0x40000, LENGTH = 0x4000 # 16K words &lt;BR /&gt;# .p_reserved : ORIGIN = 0x44000, LENGTH = 0xB800 # 46K words&lt;BR /&gt; .p_internal_RAM (RWX) : ORIGIN = 0x4F800, LENGTH = 0x0800 # 2K words&lt;BR /&gt; .p_external_RAM (RWX) : ORIGIN = 0x50000, LENGTH = 0x0000 # max available &lt;BR /&gt; .x_internal_RAM (RW) : ORIGIN = 0x0001, LENGTH = 0x3FFF &lt;BR /&gt; .x_flash_ROM (RW) : ORIGIN = 0x4000, LENGTH = 0x4000 &lt;BR /&gt; .x_external_RAM (RW) : ORIGIN = 0x8000, LENGTH = 0x7000 &lt;BR /&gt; .x_onchip_peripherals (RW) : ORIGIN = 0xF000, LENGTH = 0x1000 &lt;BR /&gt; .x_external_RAM_2 (RW) : ORIGIN = 0x10000, LENGTH = 0xFEFF00 &lt;BR /&gt; .x_EOnCE (RW) : ORIGIN = 0xFFFF00, LENGTH = 0x0000 &lt;BR /&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Feb 2017 20:32:30 GMT</pubDate>
    <dc:creator>bdang</dc:creator>
    <dc:date>2017-02-17T20:32:30Z</dc:date>
    <item>
      <title>56800E Linker Command file  for 56F8367 question</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-Linker-Command-file-for-56F8367-question/m-p/649279#M7327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tool: Codewarrior tool for DSC56800/E version 8.3 build 091203&lt;/P&gt;&lt;P&gt;target: 56F8367 processor&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having issue of string constant. The code below to initialize a Global char array does not work (the array elements have wrong data when later being read out as ex: serial_dr = String[0] does not TX out ascii H correctly) :&lt;/P&gt;&lt;P&gt;char String[] = "Hello";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// defined as global variable&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when assigning the array individually in main(), as below, it works (serial_dr=String[1] does send out 'e' ascii)&lt;/P&gt;&lt;P&gt;String[0]='H';&lt;/P&gt;&lt;P&gt;String[1]='e';&lt;/P&gt;&lt;P&gt;String[2]='l';&lt;/P&gt;&lt;P&gt;String[3]='l';&lt;/P&gt;&lt;P&gt;String[4]='o';&lt;/P&gt;&lt;P&gt;String[5]='\0';&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked into the Linker command file trying to understand how the tool writing the "Hello" string into the array. Does the tool write the string "Hello" into p_flash_ROM_data(RX) (which is located in the program flash memory block as the executable code), and then when the code runs after power reset, the code copies the string from p_flash into the array String[] (in internal RAM)?&lt;/P&gt;&lt;P&gt;(It seems the p_flash_ROM_data section is located right after the executing code section. How does the tool know if the p_flash_ROM_data does not written over the chip's p_flash ROM total area with a very large string constant for example?)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MEMORY &lt;BR /&gt;{&lt;BR /&gt; .p_interrupts_ROM (RX) : ORIGIN = 0x0000, LENGTH = 0x00AC # reserved for interrupts&lt;BR /&gt; .p_flash_ROM (RX) : ORIGIN = 0x00AC, LENGTH = 0x3FF54 # 256K words contiguous flash minus interrupt space&lt;/P&gt;&lt;P&gt;# p_flash_ROM_data mirrors internal xRAM, mapping to origin and length&lt;BR /&gt; # the "X" flag in "RX" tells the debugger to download to p-memory.&lt;BR /&gt; # the download to p-memory is directed to the address determined by AT&lt;BR /&gt; # in the section definition below. &lt;BR /&gt; &lt;BR /&gt; .p_flash_ROM_data (RX) : ORIGIN = 0x0001, LENGTH = 0x3FFF # internal xRAM mirror&lt;/P&gt;&lt;P&gt;.p_boot_flash_ROM (RX) : ORIGIN = 0x40000, LENGTH = 0x4000 # 16K words &lt;BR /&gt;# .p_reserved : ORIGIN = 0x44000, LENGTH = 0xB800 # 46K words&lt;BR /&gt; .p_internal_RAM (RWX) : ORIGIN = 0x4F800, LENGTH = 0x0800 # 2K words&lt;BR /&gt; .p_external_RAM (RWX) : ORIGIN = 0x50000, LENGTH = 0x0000 # max available &lt;BR /&gt; .x_internal_RAM (RW) : ORIGIN = 0x0001, LENGTH = 0x3FFF &lt;BR /&gt; .x_flash_ROM (RW) : ORIGIN = 0x4000, LENGTH = 0x4000 &lt;BR /&gt; .x_external_RAM (RW) : ORIGIN = 0x8000, LENGTH = 0x7000 &lt;BR /&gt; .x_onchip_peripherals (RW) : ORIGIN = 0xF000, LENGTH = 0x1000 &lt;BR /&gt; .x_external_RAM_2 (RW) : ORIGIN = 0x10000, LENGTH = 0xFEFF00 &lt;BR /&gt; .x_EOnCE (RW) : ORIGIN = 0xFFFF00, LENGTH = 0x0000 &lt;BR /&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 20:32:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-Linker-Command-file-for-56F8367-question/m-p/649279#M7327</guid>
      <dc:creator>bdang</dc:creator>
      <dc:date>2017-02-17T20:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: 56800E Linker Command file  for 56F8367 question</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-Linker-Command-file-for-56F8367-question/m-p/649280#M7328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to be the same question as this other thread, it will be answered there:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/445124"&gt;56800E Linker Command file for 56F8367 question&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Carlos Mendoza&lt;BR /&gt;Technical Support Engineer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 14:45:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-Linker-Command-file-for-56F8367-question/m-p/649280#M7328</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2017-02-20T14:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: 56800E Linker Command file  for 56F8367 question</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-Linker-Command-file-for-56F8367-question/m-p/649281#M7329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My apology for multiple posts of the same thing -- was not sure if anyone would see in legacy/classic. 5 days have past and not any answers yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 20:20:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56800E-Linker-Command-file-for-56F8367-question/m-p/649281#M7329</guid>
      <dc:creator>bdang</dc:creator>
      <dc:date>2017-02-22T20:20:19Z</dc:date>
    </item>
  </channel>
</rss>

