<?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>LPCXpresso IDE中的主题 Memory access</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Memory-access/m-p/589290#M28565</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by stl on Wed Dec 08 00:45:36 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working on a project using LPC1114. I have a lookup table (const unsigned&amp;nbsp; char table[256]) that holds precalculated values. However, every time I try to access this table, (e.g. table[index] ) I get a hard fault.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From the disassembly, table is at address 0x0d010001. The hard fault occurs when I run "ldrb r3, [r3, #0]" where r3 holds the address (ie table+index).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions on why this happens?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 01:24:54 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T01:24:54Z</dc:date>
    <item>
      <title>Memory access</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Memory-access/m-p/589290#M28565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by stl on Wed Dec 08 00:45:36 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working on a project using LPC1114. I have a lookup table (const unsigned&amp;nbsp; char table[256]) that holds precalculated values. However, every time I try to access this table, (e.g. table[index] ) I get a hard fault.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From the disassembly, table is at address 0x0d010001. The hard fault occurs when I run "ldrb r3, [r3, #0]" where r3 holds the address (ie table+index).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions on why this happens?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:24:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Memory-access/m-p/589290#M28565</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Memory access</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Memory-access/m-p/589291#M28566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by domen on Wed Dec 08 01:13:59 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;There's no code to look at. :P&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The table address seems just wrong, I'd say linker problems, but that doesn't explain the 1 at the end.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:24:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Memory-access/m-p/589291#M28566</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Memory access</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Memory-access/m-p/589292#M28567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Wed Dec 08 02:24:55 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;So 0x0d010001 sounds more likely to be 0x100010d0 which is in the LPC1114 RAM. However I would not expect a const array to be placed in RAM at all - I would expect it to be placed into the flash, regardless of whether it is declared as local or global.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But 0x0d010001 is in a reserved block of the memory map - and probably would cause a hard fault if accessed. However I don't see how, using default project settings, you would end up with data being placed at this address.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What value do you actually see in r3 before you execute the LDRB instruction?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How have you created the project - is this a standard LPC1114 project created with the LPCXPresso project wizard (and using the standard autogenerated linker script) - or is this something different.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As domen, says, we really need to see some actual code here- and preferably a buildable example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:24:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Memory-access/m-p/589292#M28567</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:24:56Z</dc:date>
    </item>
  </channel>
</rss>

