<?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のトピックRe: Assembly Commands on LPC812</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Assembly-Commands-on-LPC812/m-p/593683#M30567</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Rorrik on Mon Nov 17 13:12:14 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you! Very helpful! This seems to be working great as far as I can see. Thank you for the explanation of why this needs to be done. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:53:50 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:53:50Z</dc:date>
    <item>
      <title>Assembly Commands on LPC812</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Assembly-Commands-on-LPC812/m-p/593681#M30565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Rorrik on Mon Nov 17 11:42:21 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to jump my code to a new vector table location using the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;asm(".syntax unified");
asm("LDR.W SP, [R0]");
asm("LDR.W PC, [R0, #4]");
asm(".syntax divided");&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On build I get the errors:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error: selected processor does not support Thumb-2 mode `ldr.w SP,[R0]'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error: selected processor does not support Thumb-2 mode `ldr.w PC,[R0,#4]'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since the LPC812 does support some Thumb-2 commands, including LDR, I can't figure out how to fix this error. Is there something I need to include? Or is it a compiler setting? Is there a mode I need to set? Is there a different command that could serve the same purpose? I've tried STR with the same error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be appreciated. Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:53:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Assembly-Commands-on-LPC812/m-p/593681#M30565</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Assembly Commands on LPC812</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Assembly-Commands-on-LPC812/m-p/593682#M30566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MikeSimmonds on Mon Nov 17 12:33:31 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Trying to use 'high' registers in the LDR is the problem specifically sp and pc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will have to go through an intermediate register or maybe two.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;E.g&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;ldr r1, [r0]
mov sp, r1
ldr r1, [r0, 4]
bx r1 &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or &lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;ldr r1, [r0]
ldr r2, [r0, 4]
mov sp, r1
bx r2 &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The M0 cannot use high registers (r8 to r15) except for sp (r13) and pc (r15) in very limited circumstances.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:53:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Assembly-Commands-on-LPC812/m-p/593682#M30566</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Assembly Commands on LPC812</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Assembly-Commands-on-LPC812/m-p/593683#M30567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Rorrik on Mon Nov 17 13:12:14 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you! Very helpful! This seems to be working great as far as I can see. Thank you for the explanation of why this needs to be done. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:53:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Assembly-Commands-on-LPC812/m-p/593683#M30567</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Assembly Commands on LPC812</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Assembly-Commands-on-LPC812/m-p/593684#M30568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MikeSimmonds on Mon Nov 17 13:30:09 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What I said is not completely true.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can 'mov' in and out of the high registers (effectively as tmp variables).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But most everything else add, sub, and, etc. etc. needs low registers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I assume that you don't need to go deep into M0 assembler.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If (when) you do, get hold of "Arm Architecture V7-M" pdf from infocenter.arm&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And check the various instructions encodings for "All versions of the Thumb instruction set.".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And check out Joseph Yiu's book "The Deﬁnitive Guide to the ARM Cortex-M0" if you are that serious.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:53:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Assembly-Commands-on-LPC812/m-p/593684#M30568</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:53:51Z</dc:date>
    </item>
  </channel>
</rss>

