<?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のトピックRe: Problem trying to link large amount of constant data!</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-trying-to-link-large-amount-of-constant-data/m-p/130723#M479</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi CrasyCat,&lt;/P&gt;&lt;P&gt;Many thanks for the very swift response!&lt;/P&gt;&lt;P&gt;I was hoping that wasn't going to be the answer - but I guess I'd better get on with splitting up my data!&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Mar 2006 18:45:30 GMT</pubDate>
    <dc:creator>EmbeddedCoder</dc:creator>
    <dc:date>2006-03-31T18:45:30Z</dc:date>
    <item>
      <title>Problem trying to link large amount of constant data!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-trying-to-link-large-amount-of-constant-data/m-p/130721#M477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi All,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am trying to find an elegant solution to my problem. I am using the HCS12 256DP with the Metrowerks CodeWarrior IDE.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am&amp;nbsp;using this device&amp;nbsp;(amongst other functions) to load program code into another device via the SPI Device. I have got the SPI Boot loader working on a small piece of code, but my problems occur now I want to load larger code (i.e. larger than 16K)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The maximum code size I will have to load is 64K (and it will probably be near that mark eventually!). I have imported the code into an assembler file using some tools that seem to work quite reliably, which gives me a file of the structure:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;XDEF CodeStartPoint&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Allows my C Code to access this ASM area&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BootCodeData: SECTION&amp;nbsp; ; Defines this stuff in its own relocatable section&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CodeStartPoint:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; The actual start of the Data&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;dc 010h, 001h 100h, 200h, 020h&lt;/DIV&gt;&lt;DIV&gt;... and so on . ...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;To the linker this looks like one HUGE constant array of a size bigger than the Page windows (16K in size), and I am having headaches getting the code into the device!!!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I can get a final executable by removing the SEGMENT definitions for PAGE_32 to PAGE_37 and replacing with BOOT_CODE_SEG = READ_ONLY 0x328000 TO 0x37BFFF;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Then, in the PLACEMENT section, I add BootCodeData INTO BOOT_CODE_SEG;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I think this is a bit of a cheat and causes the linker to "forget" about the 16K windowing for this address range (possibly causing it to think I have an external memory device?) - especially as when I try to load this using the Debugger, I get the error, no memory at 0x338000&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;How can I get the linker to place my constant data across the different paged memory windows in one continuous block?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Other than this, the only other solution I can see is to cut up my data into 16K chunks and add each chunk into its own Page - very laborious!!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please Help!!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2006 18:27:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-trying-to-link-large-amount-of-constant-data/m-p/130721#M477</guid>
      <dc:creator>EmbeddedCoder</dc:creator>
      <dc:date>2006-03-31T18:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem trying to link large amount of constant data!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-trying-to-link-large-amount-of-constant-data/m-p/130722#M478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;The Linker does not allow to allocate an object across segment boundary. And segments should reflect real available memory blocks.&lt;/P&gt;&lt;P&gt;Defining a big segment as follows BOOT_CODE_SEG = READ_ONLY 0x328000 TO 0x37BFFF; does not help either, as the linker will try to allocate data at address 0x330000 for instance. And there is no memory there...&lt;/P&gt;&lt;P&gt;With HCS12 the only solution is to split your data into smaller 16K blocks.&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2006 18:35:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-trying-to-link-large-amount-of-constant-data/m-p/130722#M478</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-03-31T18:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem trying to link large amount of constant data!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-trying-to-link-large-amount-of-constant-data/m-p/130723#M479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi CrasyCat,&lt;/P&gt;&lt;P&gt;Many thanks for the very swift response!&lt;/P&gt;&lt;P&gt;I was hoping that wasn't going to be the answer - but I guess I'd better get on with splitting up my data!&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2006 18:45:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Problem-trying-to-link-large-amount-of-constant-data/m-p/130723#M479</guid>
      <dc:creator>EmbeddedCoder</dc:creator>
      <dc:date>2006-03-31T18:45:30Z</dc:date>
    </item>
  </channel>
</rss>

