<?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のトピックIssue in placing a function to a particular location in flash</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Issue-in-placing-a-function-to-a-particular-location-in-flash/m-p/381616#M6785</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai all,&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing some problems while placing a function in a particular location in flash memory.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have explained the issues below.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;To do this I modified the LCF as follows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;/**********************************************************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;resetvector:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00030000,&amp;nbsp;&amp;nbsp; len = 0x00000010&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;init:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00030010,&amp;nbsp;&amp;nbsp; len = 0x00000FF0 /* ~4K */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;exception_handlers_p0: org = 0x00080000,&amp;nbsp;&amp;nbsp; len = 0x00010000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;exception_handlers_p1: org = 0x00090000,&amp;nbsp;&amp;nbsp; len = 0x00010000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;internal_flash:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x000A0000,&amp;nbsp;&amp;nbsp; len = 0x00090000 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/* 1792 KB*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;myrom_1:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00130000,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len = 0x00004000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;key_segment:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x0013FFF8,&amp;nbsp;&amp;nbsp; len = 0x00000008 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/* 8 byte for key*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/***************************************************************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/***************************************************************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: #006699; font-size: 10.0pt; font-family: 'Courier New';"&gt;GROUP&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; : {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;.rom_symbols1 (VLECODE):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __ROM_SYMBOLS = 0x00130000; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/* start address of the new symbol area */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . = &lt;/SPAN&gt;&lt;STRONG style="color: #0099ff; font-size: 10.0pt; font-family: 'Courier New';"&gt;ALIGN&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; (0x4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(.romsymbols1) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/* actual data matching pragma directives. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . = &lt;/SPAN&gt;&lt;STRONG style="color: #0099ff; font-size: 10.0pt; font-family: 'Courier New';"&gt;ALIGN&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; (0x4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;} &amp;gt; myrom_1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;.__key_segment LOAD (0x0013FFF8): {} &amp;gt; key_segment&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;/***************************************************************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;In source code I declared the function as follows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;#pragma&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; section RX &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;"&gt;".romsymbols1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; code_mode=far_abs &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;__declspec&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;(section &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;"&gt;".romsymbols1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;funcInROM_Test_1&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; flag,&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; *); &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #3f7f5f;"&gt;//Function Prototype&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;#pragma&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; push&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;#pragma&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; section all_types &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;"&gt;".__key_segment"&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;"&gt;".__key_segment"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;unsigned&lt;/STRONG&gt; &lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;long&lt;/STRONG&gt; &lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;long&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; key = BOOT_KEY;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;#pragma&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; pop&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;funcInROM_Test_1&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; flag,&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; *iData)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;const&lt;/STRONG&gt; &lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; i = 55;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; (flag &amp;gt; 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flag ++;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *iData = 111; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Program compiled successfully and I verified the MAP file. I n MAP file I can see both the functions are placed in locations as I expected. But &lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;.rom_symbols1 section layout&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; Starting&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Virtual&amp;nbsp; File&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; address&amp;nbsp; Size&amp;nbsp;&amp;nbsp; address offset&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; ---------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; 00000000 00000c 00130000 0000e1d0 1 .romsymbols1&amp;nbsp;&amp;nbsp; OBC_Main_c.obj &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; 00000000 00000c 00130000 0000e1d0 2 funcInROM_Test_1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OBC_Main_c.obj&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;In memory map section I found the following line.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;Memory map:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;.rom_symbols1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00130000 0000000c 0000e1d0 000ad270 000ad270&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: yellow;"&gt;34572&lt;/SPAN&gt; 0000d270 DP_SPL_6202_FWO_QT(RSM)_PXS3020_1V00.000A0000.bin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Starting Address – 0x00130000;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Size – 0x0000000c;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;File Offset – 0x0000e1d0;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;ROM Address – 0x000ad270;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;RAM Buffer Address – 0x000ad270;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="background: yellow;"&gt;S Record Line number – 34572;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Bin file offset – 0x0000d270;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Bin file Name - DP_SPL_6202_FWO_QT(RSM)_PXS3020_1V00.000A0000.bin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Here S Record Line number and the corresponding address made me confused. The memory address available at line number 34572 is not matching with 0x00130000. Please check the attachment.&amp;nbsp; Instead of 0x00130000, it is 0x000ad270.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;A screenshot of the location 0x00130000 is also attached. Please check it.&lt;/P&gt;&lt;P style="min- padding: 0px; margin-bottom: .0001pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This made me really confused. Somebody please help me to solve this problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I will appreciate any help.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Thank you all.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338883"&gt;DP_SPL_6202_FWO_QT(RSM)_PXS3020_1V00.MAP.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338883"&gt;MPC5675K_FLASH.lcf.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338883"&gt;DP_SPL_6202_FWO_QT(RSM)_PXS3020_1V00.mot.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Nov 2014 18:59:40 GMT</pubDate>
    <dc:creator>mohammedshibin</dc:creator>
    <dc:date>2014-11-29T18:59:40Z</dc:date>
    <item>
      <title>Issue in placing a function to a particular location in flash</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Issue-in-placing-a-function-to-a-particular-location-in-flash/m-p/381616#M6785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai all,&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing some problems while placing a function in a particular location in flash memory.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have explained the issues below.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;To do this I modified the LCF as follows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;/**********************************************************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;resetvector:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00030000,&amp;nbsp;&amp;nbsp; len = 0x00000010&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;init:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00030010,&amp;nbsp;&amp;nbsp; len = 0x00000FF0 /* ~4K */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;exception_handlers_p0: org = 0x00080000,&amp;nbsp;&amp;nbsp; len = 0x00010000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;exception_handlers_p1: org = 0x00090000,&amp;nbsp;&amp;nbsp; len = 0x00010000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;internal_flash:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x000A0000,&amp;nbsp;&amp;nbsp; len = 0x00090000 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/* 1792 KB*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;myrom_1:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00130000,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len = 0x00004000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;key_segment:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x0013FFF8,&amp;nbsp;&amp;nbsp; len = 0x00000008 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/* 8 byte for key*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/***************************************************************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/***************************************************************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: #006699; font-size: 10.0pt; font-family: 'Courier New';"&gt;GROUP&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; : {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;.rom_symbols1 (VLECODE):&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __ROM_SYMBOLS = 0x00130000; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/* start address of the new symbol area */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . = &lt;/SPAN&gt;&lt;STRONG style="color: #0099ff; font-size: 10.0pt; font-family: 'Courier New';"&gt;ALIGN&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; (0x4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(.romsymbols1) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #cc0000;"&gt;/* actual data matching pragma directives. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . = &lt;/SPAN&gt;&lt;STRONG style="color: #0099ff; font-size: 10.0pt; font-family: 'Courier New';"&gt;ALIGN&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; (0x4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;} &amp;gt; myrom_1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;.__key_segment LOAD (0x0013FFF8): {} &amp;gt; key_segment&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;/***************************************************************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;In source code I declared the function as follows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;#pragma&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; section RX &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;"&gt;".romsymbols1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; code_mode=far_abs &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;__declspec&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;(section &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;"&gt;".romsymbols1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;funcInROM_Test_1&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; flag,&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; *); &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #3f7f5f;"&gt;//Function Prototype&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;#pragma&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; push&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;#pragma&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; section all_types &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;"&gt;".__key_segment"&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;"&gt;".__key_segment"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;unsigned&lt;/STRONG&gt; &lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;long&lt;/STRONG&gt; &lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;long&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; key = BOOT_KEY;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;#pragma&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; pop&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;funcInROM_Test_1&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; flag,&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; *iData)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;const&lt;/STRONG&gt; &lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; i = 55;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';"&gt;if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; (flag &amp;gt; 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flag ++;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *iData = 111; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Program compiled successfully and I verified the MAP file. I n MAP file I can see both the functions are placed in locations as I expected. But &lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;.rom_symbols1 section layout&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; Starting&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Virtual&amp;nbsp; File&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; address&amp;nbsp; Size&amp;nbsp;&amp;nbsp; address offset&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; ---------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; 00000000 00000c 00130000 0000e1d0 1 .romsymbols1&amp;nbsp;&amp;nbsp; OBC_Main_c.obj &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; 00000000 00000c 00130000 0000e1d0 2 funcInROM_Test_1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OBC_Main_c.obj&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;In memory map section I found the following line.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;Memory map:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;.rom_symbols1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00130000 0000000c 0000e1d0 000ad270 000ad270&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: yellow;"&gt;34572&lt;/SPAN&gt; 0000d270 DP_SPL_6202_FWO_QT(RSM)_PXS3020_1V00.000A0000.bin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Starting Address – 0x00130000;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Size – 0x0000000c;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;File Offset – 0x0000e1d0;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;ROM Address – 0x000ad270;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;RAM Buffer Address – 0x000ad270;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="background: yellow;"&gt;S Record Line number – 34572;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Bin file offset – 0x0000d270;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Bin file Name - DP_SPL_6202_FWO_QT(RSM)_PXS3020_1V00.000A0000.bin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Here S Record Line number and the corresponding address made me confused. The memory address available at line number 34572 is not matching with 0x00130000. Please check the attachment.&amp;nbsp; Instead of 0x00130000, it is 0x000ad270.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;A screenshot of the location 0x00130000 is also attached. Please check it.&lt;/P&gt;&lt;P style="min- padding: 0px; margin-bottom: .0001pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This made me really confused. Somebody please help me to solve this problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I will appreciate any help.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Thank you all.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338883"&gt;DP_SPL_6202_FWO_QT(RSM)_PXS3020_1V00.MAP.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338883"&gt;MPC5675K_FLASH.lcf.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338883"&gt;DP_SPL_6202_FWO_QT(RSM)_PXS3020_1V00.mot.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 18:59:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Issue-in-placing-a-function-to-a-particular-location-in-flash/m-p/381616#M6785</guid>
      <dc:creator>mohammedshibin</dc:creator>
      <dc:date>2014-11-29T18:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in placing a function to a particular location in flash</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Issue-in-placing-a-function-to-a-particular-location-in-flash/m-p/381617#M6786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found some solution.&amp;nbsp; I have gone through the MCU_Power_Architecture_Compiler document and I found an example for absolute placement of code in flash.&lt;/P&gt;&lt;P&gt;I have given the piece of code below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma push&lt;/P&gt;&lt;P&gt;#pragma section code_type ".abs.00010000" code_mode=pc_rel&lt;/P&gt;&lt;P&gt;asm void _ISRVectorTable(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;b InterruptHandler&lt;/P&gt;&lt;P&gt;nop&lt;/P&gt;&lt;P&gt;b InterruptHandler&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;#pragma pop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MEMORY &lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;//internal Flash&lt;/P&gt;&lt;P&gt;APPL_INT_VECT : org= 0x00010000, len= 0x000000FF;&lt;/P&gt;&lt;P&gt;// If org is changed, make sure to adjust start&lt;/P&gt;&lt;P&gt;// address in .abs.00010000 LOAD (0x00010000): {} &amp;gt;&lt;/P&gt;&lt;P&gt;// APPL_INT_VECT accordingly &lt;/P&gt;&lt;P&gt;// ...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;SECTIONS {&lt;/P&gt;&lt;P&gt;.abs.00010000 LOAD (0x00010000): {} &amp;gt; APPL_INT_VECT&lt;/P&gt;&lt;P&gt;&amp;lt;...&amp;gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;I verified both MAP file and .MOT file and found OK.&lt;/P&gt;&lt;P&gt;But I want to know the difference between placing a piece of code using "#pragma push" and "__declspec".&lt;/P&gt;&lt;P&gt;I think "#pragma push" place the function at the physical memory as specified in LCF and&amp;nbsp; I don't know what exactly is happening in the case of "__declspec".&lt;/P&gt;&lt;P&gt;Somebody please help me and clarify my doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I want to modify a function which is already available in a fixed location(say 0x00040000) during run time. That is, I will receive the S Record file for that particular function through UART and keep it in RAM. After validating the checksum of the received data, I would like erase the particular sector(0x00040000) and write the received data. If I call the function after modifying it, will it work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Nov 2014 14:06:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Issue-in-placing-a-function-to-a-particular-location-in-flash/m-p/381617#M6786</guid>
      <dc:creator>mohammedshibin</dc:creator>
      <dc:date>2014-11-30T14:06:38Z</dc:date>
    </item>
  </channel>
</rss>

