<?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 Re: Custom Linker Section, recognized in assembly in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Custom-Linker-Section-recognized-in-assembly/m-p/147539#M1858</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to place the section BootRange that you have created in one of the memory area inside of the linker command file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume you gave to change the definition of the section .BootRange as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;.BooksRange :  {     *(BooksRange)    . = ALIGN (0x4);} &amp;gt;&amp;gt; code_00020410 &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally why are you using a an org after the section command in the assembly file?&lt;/P&gt;&lt;P&gt;Not sure I get the point here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At which address do you expect the section BootRange to be allocated?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 08:49:06 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2020-10-29T08:49:06Z</dc:date>
    <item>
      <title>Custom Linker Section, recognized in assembly</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Custom-Linker-Section-recognized-in-assembly/m-p/147536#M1855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a project using a mix of C and Assembly on the Coldfire V1, QE256 part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the App Note AN4329, I was able to create a custome linker section in the lower half of the memory space&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp; .BooksRange :
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; __BOOKS_BASE = .;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #start address of the new books area
&amp;nbsp;&amp;nbsp;&amp;nbsp; .=ALIGN(512);
&amp;nbsp;&amp;nbsp;&amp;nbsp; *(.BooksRange)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #actual data matching pragma directives
&amp;nbsp;&amp;nbsp;&amp;nbsp; __BOOKS_END = .;
&amp;nbsp;&amp;nbsp;&amp;nbsp; .=ALIGN(512);
&amp;nbsp; } &amp;gt;&amp;gt; code_00020410

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This isn't causing any errors that I can tell &lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;&lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but now I am stumped as how to get code into the BooksRange area, I tried the following but am getting&lt;/P&gt;&lt;P&gt;undefine macro or opcode when I insert this snippit into .asm file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .BooksRange&amp;nbsp;&amp;nbsp; month1: .byte 1,2,3,4,5&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:49:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Custom-Linker-Section-recognized-in-assembly/m-p/147536#M1855</guid>
      <dc:creator>Kerrie</dc:creator>
      <dc:date>2020-10-29T08:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Linker Section, recognized in assembly</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Custom-Linker-Section-recognized-in-assembly/m-p/147537#M1856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As section .BooksRange&amp;nbsp; is not a predefined section you need to define it using .section directive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please look at the ColdFire_Assembler_MCU_Eclipse.pdf manual and check syntax of the .section directive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2012 15:02:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Custom-Linker-Section-recognized-in-assembly/m-p/147537#M1856</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2012-03-21T15:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Linker Section, recognized in assembly</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Custom-Linker-Section-recognized-in-assembly/m-p/147538#M1857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Crasy, you have definitly pointed me on the right path.&amp;nbsp; I no longer have compiler errors.&amp;nbsp; But I am getting this warning " BooksRange (BooksRange) is refrenced but not written check your linker command file and sure enough when I look into memory after program nothing is store in that memory location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the complete linker file&lt;/P&gt;&lt;PRE&gt;# Sample Linker Command File for CodeWarrior for ColdFire MCF51JE256# Memory rangesMEMORY {   code        (RX)  : ORIGIN = 0x00000414, LENGTH = 0x0001FFE8   code_00020410 (RX) : ORIGIN = 0x00020410, LENGTH = 0x0001FBF0   userram     (RWX) : ORIGIN = 0x00800000, LENGTH = 0x00008000}SECTIONS {# Heap and Stack sizes definition  ___heap_size     = 0x0400;  ___stack_size    = 0x0400;# MCF51JE256 Derivative Memory map definitions from linker command files:# ___RAM_ADDRESS, ___RAM_SIZE, ___FLASH_ADDRESS, ___FLASH_SIZE linker# symbols must be defined in the linker command file.# 32 Kbytes Internal SRAM   ___RAM_ADDRESS = 0x00800000;   ___RAM_SIZE    = 0x00008000;   # 256 KByte Internal Flash Memory   ___FLASH_ADDRESS  = 0x00000000;   ___FLASH_SIZE     = 0x00040000;  .userram        : {} &amp;gt; userram  .code      : {} &amp;gt; code  .code1     : {} &amp;gt; code_00020410   .text :  {    *(.text)    . = ALIGN (0x4);    *(.rodata)    . = ALIGN (0x4);    ___ROM_AT = .;    ___DATA_ROM = .; } &amp;gt;&amp;gt; code   .BooksRange :  {     *(.text)    . = ALIGN (0x4);} &amp;gt;&amp;gt; code_00020410    .usb_bdt :  {    .=ALIGN(512);    __BDT_BASE = .;    *(.usb_bdt)     __BDT_END = .;   } &amp;gt;&amp;gt; userram  .data : AT(___ROM_AT)  {    ___DATA_RAM = .;    . = ALIGN(0x4);    *(.exception)    . = ALIGN(0x4);    __exception_table_start__ = .;    EXCEPTION    __exception_table_end__ = .;    ___sinit__ = .;      STATICINIT    __START_DATA = .;    *(.data)    . = ALIGN (0x4);    __END_DATA = .;    __START_SDATA = .;    *(.sdata)    . = ALIGN (0x4);    __END_SDATA = .;    ___DATA_END = .;    __SDA_BASE = .;    . = ALIGN (0x4);  } &amp;gt;&amp;gt; userram  .bss :  {    ___BSS_START = .;    __START_SBSS = .;    *(.sbss)    . = ALIGN (0x4);    *(SCOMMON)    __END_SBSS = .;    __START_BSS = .;    *(.bss)    . = ALIGN (0x4);    *(COMMON)    __END_BSS = .;    ___BSS_END = .;    . = ALIGN(0x4);  } &amp;gt;&amp;gt; userram  .custom :  {    ___HEAP_START       = .;    ___heap_addr        = ___HEAP_START;    ___HEAP_END         = ___HEAP_START + ___heap_size;    ___SP_END             = ___HEAP_END;    ___SP_INIT          = ___SP_END + ___stack_size;    ___mem_limit        = ___HEAP_END;    ___stack_safety     = 16;    . = ALIGN (0x4);  } &amp;gt;&amp;gt; userram  __SP_INIT             = ___SP_INIT;  ___SP_AFTER_RESET     = __SP_INIT;  _romp_at = ___ROM_AT + SIZEOF(.data);  .romp : AT(_romp_at)  {    __S_romp = _romp_at;    WRITEW(___ROM_AT);    WRITEW(ADDR(.data));    WRITEW(SIZEOF(.data));    WRITEW(0);    WRITEW(0);    WRITEW(0);  }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and here is the snippit of assembly code&lt;/P&gt;&lt;PRE&gt; .section  BooksRange, text .org 0x0020500 testingloop: move.l #$0FF,D2  ;get current byte move.b #$03,D1 add.l D2,D1  ;D1 = D1+D2  subi.l #$01,D2  ;decrement the counter of length bne testingloop rts&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:49:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Custom-Linker-Section-recognized-in-assembly/m-p/147538#M1857</guid>
      <dc:creator>Kerrie</dc:creator>
      <dc:date>2020-10-29T08:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Linker Section, recognized in assembly</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Custom-Linker-Section-recognized-in-assembly/m-p/147539#M1858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to place the section BootRange that you have created in one of the memory area inside of the linker command file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume you gave to change the definition of the section .BootRange as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;.BooksRange :  {     *(BooksRange)    . = ALIGN (0x4);} &amp;gt;&amp;gt; code_00020410 &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally why are you using a an org after the section command in the assembly file?&lt;/P&gt;&lt;P&gt;Not sure I get the point here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At which address do you expect the section BootRange to be allocated?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:49:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Custom-Linker-Section-recognized-in-assembly/m-p/147539#M1858</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2020-10-29T08:49:06Z</dc:date>
    </item>
  </channel>
</rss>

