<?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: How to place a byte-array at a specific location in FLASH? (Need help with #pragma key-words) in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-place-a-byte-array-at-a-specific-location-in-FLASH-Need/m-p/140656#M2340</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Your lcf file might looks like this:&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;MEMORY{        flash    (RX)  : ORIGIN = 0x00000000, LENGTH = 0x0003FFBF specSect (RX)  : ORIGIN = 0x0003FFC0, LENGTH = 0x00000040 vram (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000400 sram (RWX) : ORIGIN = 0x20000400, LENGTH = 0x00007C00 ipsbar  (RWX) : ORIGIN = 0x40000000, LENGTH = 0x0}SECTIONS { .ipsbar  : {} &amp;gt; ipsbar     .vectors : {  vectors.s (.text)  . = ALIGN (0x10); } &amp;gt; flash        .text :    {        *(.text)  .= ALIGN(0x10);        *(.rodata)  .= ALIGN(0x10);        ___DATA_ROM    = .;        __S_romp       = .;     } &amp;gt;&amp;gt; flash .yourArraySection : {  *(.&lt;SPAN&gt;&lt;/SPAN&gt;yourArrayZone) } &amp;gt; specSect     .data : AT(ADDR(.text)+SIZEOF(.text))  {  ___DATA_RAM    = .;        *(.exception)   .              = ALIGN(0x10);   __exception_table_start__ = .;     EXCEPTION  __exception_table_end__   = .;  ___sinit__    = .;     STATICINIT        *(.data)  .             = ALIGN (0x10);  ___DATA_END   = .;  __START_SDATA = .;        *(.sdata)  .             = ALIGN (0x10);  __END_SDATA   = .;  __SDA_BASE    = .;  .             = ALIGN(0x10); } &amp;gt; sram .bss : {  . = ALIGN(0x10);  __START_SBSS = .;  *(.sbss)  *(SCOMMON)  __END_SBSS   = .;  . = ALIGN(0x10);  __START_BSS  = .;  *(.bss)  *(COMMON)  __END_BSS    = .;         ___BSS_START = __START_SBSS;        ___BSS_END   = __END_BSS;        . = ALIGN(0x10); } &amp;gt;&amp;gt; sram ___FLASH  = ADDR(.vectors); ___FLASH_SIZE = 0x0003E000; ___SRAM   = ADDR(sram); ___SRAM_SIZE = 0x00007C00; ___VECTOR_RAM = ADDR(vram); ___IPSBAR  = ADDR(.ipsbar);    ___SP_SIZE      = 0x400; ___HEAP_START = .; ___HEAP_END  = ___SRAM + ___SRAM_SIZE - ___SP_SIZE; ___SP_END  = ___HEAP_END; ___SP_INIT  = ___SP_END + ___SP_SIZE;    ___heap_addr  = ___HEAP_START; ___heap_size  = ___HEAP_END - ___HEAP_START ; __SP_INIT   = ___SP_INIT; }&lt;/PRE&gt;&lt;BR /&gt;and in your C file :&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;#pragma define_section yourArrayZone ".yourArrayZone" far_absolute R__declspec(yourArrayZone)char WhatYouWant[] = {"Data of your Array"};&lt;/PRE&gt;&lt;BR /&gt;Emmanuel&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 08:41:25 GMT</pubDate>
    <dc:creator>Nouchi</dc:creator>
    <dc:date>2020-10-29T08:41:25Z</dc:date>
    <item>
      <title>How to place a byte-array at a specific location in FLASH? (Need help with #pragma key-words)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-place-a-byte-array-at-a-specific-location-in-FLASH-Need/m-p/140655#M2339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can any one guide me with some #pragma key words and examples of how I place a const in a specific FLASH location, so that it can be modified later.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I think it has something to do with seting up a segment in the linker file (.lcf) (don't need more than 10 bytes).&lt;/DIV&gt;&lt;DIV&gt;And with the key-word of that segment use some kind of #pragma when defining my const.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any one?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Dec 2006 22:54:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-place-a-byte-array-at-a-specific-location-in-FLASH-Need/m-p/140655#M2339</guid>
      <dc:creator>claus_schmidt</dc:creator>
      <dc:date>2006-12-19T22:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to place a byte-array at a specific location in FLASH? (Need help with #pragma key-words)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-place-a-byte-array-at-a-specific-location-in-FLASH-Need/m-p/140656#M2340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Your lcf file might looks like this:&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;MEMORY{        flash    (RX)  : ORIGIN = 0x00000000, LENGTH = 0x0003FFBF specSect (RX)  : ORIGIN = 0x0003FFC0, LENGTH = 0x00000040 vram (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000400 sram (RWX) : ORIGIN = 0x20000400, LENGTH = 0x00007C00 ipsbar  (RWX) : ORIGIN = 0x40000000, LENGTH = 0x0}SECTIONS { .ipsbar  : {} &amp;gt; ipsbar     .vectors : {  vectors.s (.text)  . = ALIGN (0x10); } &amp;gt; flash        .text :    {        *(.text)  .= ALIGN(0x10);        *(.rodata)  .= ALIGN(0x10);        ___DATA_ROM    = .;        __S_romp       = .;     } &amp;gt;&amp;gt; flash .yourArraySection : {  *(.&lt;SPAN&gt;&lt;/SPAN&gt;yourArrayZone) } &amp;gt; specSect     .data : AT(ADDR(.text)+SIZEOF(.text))  {  ___DATA_RAM    = .;        *(.exception)   .              = ALIGN(0x10);   __exception_table_start__ = .;     EXCEPTION  __exception_table_end__   = .;  ___sinit__    = .;     STATICINIT        *(.data)  .             = ALIGN (0x10);  ___DATA_END   = .;  __START_SDATA = .;        *(.sdata)  .             = ALIGN (0x10);  __END_SDATA   = .;  __SDA_BASE    = .;  .             = ALIGN(0x10); } &amp;gt; sram .bss : {  . = ALIGN(0x10);  __START_SBSS = .;  *(.sbss)  *(SCOMMON)  __END_SBSS   = .;  . = ALIGN(0x10);  __START_BSS  = .;  *(.bss)  *(COMMON)  __END_BSS    = .;         ___BSS_START = __START_SBSS;        ___BSS_END   = __END_BSS;        . = ALIGN(0x10); } &amp;gt;&amp;gt; sram ___FLASH  = ADDR(.vectors); ___FLASH_SIZE = 0x0003E000; ___SRAM   = ADDR(sram); ___SRAM_SIZE = 0x00007C00; ___VECTOR_RAM = ADDR(vram); ___IPSBAR  = ADDR(.ipsbar);    ___SP_SIZE      = 0x400; ___HEAP_START = .; ___HEAP_END  = ___SRAM + ___SRAM_SIZE - ___SP_SIZE; ___SP_END  = ___HEAP_END; ___SP_INIT  = ___SP_END + ___SP_SIZE;    ___heap_addr  = ___HEAP_START; ___heap_size  = ___HEAP_END - ___HEAP_START ; __SP_INIT   = ___SP_INIT; }&lt;/PRE&gt;&lt;BR /&gt;and in your C file :&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;#pragma define_section yourArrayZone ".yourArrayZone" far_absolute R__declspec(yourArrayZone)char WhatYouWant[] = {"Data of your Array"};&lt;/PRE&gt;&lt;BR /&gt;Emmanuel&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:41:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-place-a-byte-array-at-a-specific-location-in-FLASH-Need/m-p/140656#M2340</guid>
      <dc:creator>Nouchi</dc:creator>
      <dc:date>2020-10-29T08:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to place a byte-array at a specific location in FLASH? (Need help with #pragma key-words)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-place-a-byte-array-at-a-specific-location-in-FLASH-Need/m-p/140657#M2341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It did the job.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I had to move the specSect to 0x0001FFC0 due to a license limit at 128k though. Took me a while to find :smileywink:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;specSect (RX) : ORIGIN = 0x0001FFC0,&amp;nbsp; LENGTH = 0x00000040&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks again.&lt;/DIV&gt;&lt;DIV&gt;Claus&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 22:33:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-place-a-byte-array-at-a-specific-location-in-FLASH-Need/m-p/140657#M2341</guid>
      <dc:creator>claus_schmidt</dc:creator>
      <dc:date>2006-12-20T22:33:29Z</dc:date>
    </item>
  </channel>
</rss>

