<?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>LPC Microcontrollers中的主题 Re: How to use __RODATA macro from &amp;lt;cr_section_macros.h&amp;gt;?</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-RODATA-macro-from-lt-cr-section-macros-h-gt/m-p/741844#M29906</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the first place, please check out chapter 16, "Memory Configuration and Linker Scripts", of the MCUXpresso IDE v10.2 User Guide. In particular, you probably want to use the linker script templates described in section 16.13.2 : "Configuring projects to span multiple Flash Devices", rather than the&amp;nbsp;__RODATA macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MCUXpresso IDE Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2018 12:57:23 GMT</pubDate>
    <dc:creator>lpcxpresso_supp</dc:creator>
    <dc:date>2018-06-05T12:57:23Z</dc:date>
    <item>
      <title>How to use __RODATA macro from &lt;cr_section_macros.h&gt;?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-RODATA-macro-from-lt-cr-section-macros-h-gt/m-p/741843#M29905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working with the LPC54608 and I'm attempting to place const data into the external board flash (SPIFI). In my end application, this will be used mostly for graphics data. I am attempting to use the __RODATA macro from &amp;lt;cr_section_macros.h&amp;gt;, as described here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/389102"&gt;Placing code/rodata into different FLASH blocks&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far this has not been successful. What am I missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Details&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;LPCXpresso54608 OM13092&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;MCUXpresso IDE v10.2.0&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;I've modified the "hello world" example from the SDK v2.4 (project files attached)&lt;/LI&gt;&lt;LI&gt;I've tried using both available drivers "LPC5460x_SPIFI_GENERIC.cfx" and "LPC546xx_SPIFI_SFDP.cfx"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the build output, it shows up under the "BOARD_FLASH" section:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Memory region&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Used Size&amp;nbsp; &amp;nbsp; &amp;nbsp; Region Size&amp;nbsp; &amp;nbsp; &amp;nbsp; %age Used&lt;BR /&gt; PROGRAM_FLASH:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;16308 B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;512 KB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3.11%&lt;BR /&gt; &lt;SPAN style="color: #ff0000;"&gt;BOARD_FLASH:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;40 B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16 MB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.00%&lt;/SPAN&gt;&lt;BR /&gt; SRAM_0_1_2_3:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8536 B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 160 KB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5.21%&lt;BR /&gt; SRAMX:&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; 0 GB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 32 KB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00%&lt;BR /&gt; USB_RAM:&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;0 GB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8 KB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00%&lt;BR /&gt; BOARD_SDRAM:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 GB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;16 MB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.00%&lt;BR /&gt;Finished building target: lpcxpresso54608_hello_world.axf&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Debug console indicates it is being written:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Inspected v.2 On-chip Flash Memory LPC5460x_512K.cfx&lt;BR /&gt;Image 'LPC5460x (512K Flash) Aug 23 2017 12:13:28'&lt;BR /&gt;Inspected v.2 External Flash Device on SPI LPC5460x_SPIFI_GENERIC.cfx&lt;BR /&gt;Image 'LPC5460x Generic SPIFI Sep 25 2017 16:15:07'&lt;BR /&gt;Opening flash driver LPC5460x_SPIFI_GENERIC.cfx&lt;BR /&gt;Sending VECTRESET to run flash driver&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;flash variant 'MT25QL128AB' detected (16MB = 256*64K at 0x10000000)&lt;/SPAN&gt;&lt;BR /&gt;Closing flash driver LPC5460x_SPIFI_GENERIC.cfx&lt;BR /&gt;NXP: LPC54608J512&lt;BR /&gt;Connected: was_reset=true. was_stopped=false&lt;BR /&gt;Awaiting telnet connection to port 3330 ...&lt;BR /&gt;GDB nonstop mode enabled&lt;BR /&gt;Opening flash driver LPC5460x_512K.cfx&lt;BR /&gt;Sending VECTRESET to run flash driver&lt;BR /&gt;Writing 16308 bytes to address 0x00000000 in Flash&lt;BR /&gt;Erased/Wrote page 0-0 with 16308 bytes in 193msec&lt;BR /&gt;Closing flash driver LPC5460x_512K.cfx&lt;BR /&gt;Flash Write Done&lt;BR /&gt;Opening flash driver LPC5460x_SPIFI_GENERIC.cfx&lt;BR /&gt;Sending VECTRESET to run flash driver&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;Writing 40 bytes to address 0x10000000 in Flash&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;Erased/Wrote page 0-0 with 40 bytes in 191msec&lt;/SPAN&gt;&lt;BR /&gt;Closing flash driver LPC5460x_SPIFI_GENERIC.cfx&lt;BR /&gt;Flash Write Done&lt;BR /&gt;Flash Program Summary: 16348 bytes in 0.38 seconds (41.47 KB/sec)&lt;BR /&gt;Starting execution using system reset and halt target&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet when I debug, I cannot see the data in the Memory monitor (address 0x10000000), and a simple printf of the data does not show the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm also seeing that this program gets stuck in SPIFI_ResetCommand() as called by SPIFI_Init(). This makes me think the h/w is being left in a bad state after programming?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 19:23:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-RODATA-macro-from-lt-cr-section-macros-h-gt/m-p/741843#M29905</guid>
      <dc:creator>mattschrader</dc:creator>
      <dc:date>2018-05-31T19:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to use __RODATA macro from &lt;cr_section_macros.h&gt;?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-RODATA-macro-from-lt-cr-section-macros-h-gt/m-p/741844#M29906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the first place, please check out chapter 16, "Memory Configuration and Linker Scripts", of the MCUXpresso IDE v10.2 User Guide. In particular, you probably want to use the linker script templates described in section 16.13.2 : "Configuring projects to span multiple Flash Devices", rather than the&amp;nbsp;__RODATA macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MCUXpresso IDE Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 12:57:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-RODATA-macro-from-lt-cr-section-macros-h-gt/m-p/741844#M29906</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2018-06-05T12:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use __RODATA macro from &lt;cr_section_macros.h&gt;?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-RODATA-macro-from-lt-cr-section-macros-h-gt/m-p/741845#M29907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for highlighting that chapter in the manual. I had read it before and decided that use of the __RODATA macro seemed to be the easiest path for my application. After following the example you pointed out in 16.13.2, I still seem to be missing something…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First off, the example code I posted initially had some problems around SPIFI initialization, which explains some of the issues. I restarted using the “lpcxpresso54608_spifi_polling_transfer” example. From this example code I was able to achieve the desired result of placing data in the external board flash using the __RODATA macro. This example code is attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I took that working example and attempted to use the linkerscript method (from 16.13.2). The test data ends up getting placed into the program flash. This example code is also attached. Could you please take a look and tell me what I’m missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2018 15:55:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-use-RODATA-macro-from-lt-cr-section-macros-h-gt/m-p/741845#M29907</guid>
      <dc:creator>mattschrader</dc:creator>
      <dc:date>2018-06-06T15:55:02Z</dc:date>
    </item>
  </channel>
</rss>

