<?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: Pure assembler code for the LPC1114</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563236#M17042</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Sat Mar 12 14:16:37 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't ventured into assembly with the cortex-mX chips yet, but I do see one thing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the second word of flash memory you have&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b main&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;which I think is the instruction 'branch to main'?&amp;nbsp; whereas that second word should be the vector to (or address of ) main, not an instruction.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:15:43 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:15:43Z</dc:date>
    <item>
      <title>Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563235#M17041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ronikeshet on Sat Mar 12 13:10:44 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, :o&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My name is Roni Daffan.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just started to get to know the LPC1114.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I try to write an assembler code from scratch.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the LPCxpresso, I try to write a small program that will convert the pull up resistor of P0.7 (led2) to a pull down resistor, just for a start.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please see the little code below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to use the debug build mode, is seems to compile it correctly, since I can see the number of bytes is correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when I use the release build mode, it does not seems to work ok, the number of bytes is always 20, no matter what the code is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to download the code into the LPC1114.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Downloading the debug *.axf results with an error of "attempt to load into missing flash area".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Downloading the release *.axf file do nothing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anybody help me out with this ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any assembler freak around here that can help me with this ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm willing provide support as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Roni&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See code below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT].syntax unified[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055].global[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] _start[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT]_start:[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.org 0x00000000 [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]//[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE]Stack pointer initial value[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055].word[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] 0x10002000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.org 0x00000004&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b main&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;.org 0x00000100[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT]main:[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]ldr R0,port_0_config_data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ldr R1,port_0_config_addr&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;str R1,[R0][/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT]endloop:[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]b endloop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;amp;#12288;[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][LEFT]//*******************************************************[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT].align&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;port_0_config_data:[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055].word[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] 0b00000000000000000000000011001000[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT]port_0_config_addr:[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055].word[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] 0x40044050&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;amp;#12288;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.end[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563235#M17041</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563236#M17042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Sat Mar 12 14:16:37 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't ventured into assembly with the cortex-mX chips yet, but I do see one thing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the second word of flash memory you have&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b main&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;which I think is the instruction 'branch to main'?&amp;nbsp; whereas that second word should be the vector to (or address of ) main, not an instruction.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563236#M17042</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563237#M17043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ronikeshet on Sat Mar 12 14:28:53 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have corrected this, but still not working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think there is some kind of an offset value for the assembler, since when I display the disassembly (right clik the *.axf file and select binary unilitiy) I can see the code is placed at address 0x8000 and on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If fact I did not start this from scrach, I was unsing a project example of another memer here. Maybe there is a difinition that I need to change, like the assembler start address, of offset ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Roni&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563237#M17043</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563238#M17044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Sat Mar 12 14:33:45 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Roni have you seen this &lt;/SPAN&gt;&lt;A href="http://http://knowledgebase.nxp.com/showpost.php?p=402&amp;amp;postcount=14"&gt;[B][COLOR=darkorange]post[/COLOR][/B]&lt;/A&gt;&lt;SPAN&gt;. I don't know if it will help address your problem or not.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563238#M17044</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563239#M17045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ktownsend on Sat Mar 12 22:49:38 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;It's written for ARM7, but this book is a very good (and rare) introduction to ARM assembly and if you can wrap your head around this it will be easy to adopt the changes on the M0 or M3 parts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://www.amazon.com/ARM-Assembly-Language-Fundamentals-Techniques/dp/1439806101&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's not cheap, but still the cheapest education you're likely to find, and it's accessible if you have a bit of experience with embedded devices.&amp;nbsp; It assumes no experience with assembly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563239#M17045</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563240#M17046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Sun Mar 13 00:41:48 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a simple assembler app that blinks a LED on an LPC1769 Cortex-M3. The register addresses and operations will differ slightly to the M0.&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;


@ Directives
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .thumb&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; @ (same as saying '.code 16')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .syntax unified

@ Equates
&amp;nbsp;&amp;nbsp;&amp;nbsp; .equ PINSEL1,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x4002C004
&amp;nbsp;&amp;nbsp;&amp;nbsp; .equ FIO0DIR,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x2009C000
&amp;nbsp;&amp;nbsp;&amp;nbsp; .equ FIO0SET,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x2009C018
&amp;nbsp;&amp;nbsp;&amp;nbsp; .equ FIO0CLR,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x2009C01c
&amp;nbsp;&amp;nbsp;&amp;nbsp; .equ LEDPIN,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x400000
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .equ STACKINIT,&amp;nbsp;&amp;nbsp; 0x10080000
&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; .equ LEDDELAY,&amp;nbsp;&amp;nbsp;&amp;nbsp; 8000000
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
.section .text
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .org 0

@ Vectors
vectors:&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; .word STACKINIT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ stack pointer value when stack is empty
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .word _start + 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ reset vector (manually adjust to odd for thumb)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .word _nmi_handler + 1&amp;nbsp; @ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .word _hard_fault&amp;nbsp; + 1&amp;nbsp; @ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .word _memory_fault + 1 @
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .word _bus_fault + 1&amp;nbsp;&amp;nbsp;&amp;nbsp; @ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .word _usage_fault + 1&amp;nbsp; @
&amp;nbsp;&amp;nbsp;&amp;nbsp; .word 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ checksum 

_start:
&amp;nbsp;&amp;nbsp;&amp;nbsp; @ disable interrupts left on by bootloader
&amp;nbsp;&amp;nbsp;&amp;nbsp; cpsid i

&amp;nbsp;&amp;nbsp;&amp;nbsp; @ set the pinselect
&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr r6, = PINSEL1
&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr r0, [r6]
&amp;nbsp;&amp;nbsp;&amp;nbsp; and r0, 0xffffcfff
&amp;nbsp;&amp;nbsp;&amp;nbsp; str r0, [r6]
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; @ and port direction
&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr r6, = FIO0DIR
&amp;nbsp;&amp;nbsp;&amp;nbsp; mov r0, LEDPIN
&amp;nbsp;&amp;nbsp;&amp;nbsp; str r0, [r6]

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ Load R2 with the led pin number
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov r2, LEDPIN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ value to turn on/off LED
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
loop:
&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr r6, = FIO0SET
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; str r2, [r6]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ set Port 0, pin 22, turning on LED
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr r1, = LEDDELAY
delay1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subs r1, 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bne delay1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr r6, = FIO0CLR
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; str r2, [r6]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ clear Port 0, pin 22, turning off LED
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr r1, = LEDDELAY
delay2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subs r1, 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bne delay2

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b loop&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; @ continue forever

_dummy:&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ if any int gets triggered, just hang in a loop
_nmi_handler:
_hard_fault:
_memory_fault:
_bus_fault:
_usage_fault:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add r0, 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add r1, 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b _dummy&amp;nbsp; 


&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563240#M17046</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563241#M17047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cktham on Sun May 01 18:44:51 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear jharwood,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please advise how best to launch the pure assembler code you gave, using LPCXpresso IDE. I'm using LPCXpresso with LPC 1769.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I managed to build it. Running the .axf file doesn't work, but running the .o file seems OK, but I'm not sure whether I'm doing the right thing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563241#M17047</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563242#M17048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Mon May 02 08:47:48 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: cktham&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Please advise how best to launch the pure assembler code you gave, using LPCXpresso IDE. I'm using LPCXpresso with LPC 1769.&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Chen,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not too sure how to build and run it with the IDE. I just used the command line tools.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563242#M17048</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563243#M17049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Mon May 02 09:17:49 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I spent some time last night trying to figure this out and didn't come up with a solution for building and downloading from the the IDE either.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport, Can you describe how to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;jharwood, Could you tell me how you used the command line tools to accomplish this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Larry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563243#M17049</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563244#M17050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Mon May 02 10:25:10 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: larryvc&lt;/STRONG&gt;&lt;BR /&gt;Could you tell me how you used the command line tools to accomplish this?&lt;BR /&gt; &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a quick and dirty example using windows batch files. It would be better to write it as one Makefile.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's a readme.txt file explaining how to set it up.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563244#M17050</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563245#M17051</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 Mon May 02 10:41:46 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: larryvc&lt;/STRONG&gt;&lt;BR /&gt;I spent some time last night trying to figure this out and didn't come up with a solution for building and downloading from the the IDE either.&lt;BR /&gt; &lt;BR /&gt;CodeRedSupport, Can you describe how to do this?&lt;BR /&gt; &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a number of issues here. The primary one is that the assembler file is not compatible with the default managed linker script generated by the IDE. This can be overcome by providing a linker script template that matches how the assembler file was written.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Linker templates covered in the FAQ at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2F" rel="nofollow" target="_blank"&gt;http://support.code-red-tech.com/CodeRedWiki/EnhancedManagedLinkScripts&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A secondary issue is that the debugger tries to set on breakpoint on the symbol main. Thus the launch configuration needs editing to instead set the breakpoint on the symbol used by the assembler file : _start, as per the FAQ:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2F" rel="nofollow" target="_blank"&gt;http://support.code-red-tech.com/CodeRedWiki/InitialBP&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also modified the assembler file itself to reduce the length of the delay loop and also to make the _start symbol accessible by the linker script.&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 02:15:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563245#M17051</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563246#M17052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Mon May 02 10:49:34 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you both for your quick replies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy are you now in San Jose for ESC?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563246#M17052</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563247#M17053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cktham on Mon May 09 02:17:52 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;lpc17_pureasm works :) from within IDE for LPC1769.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Andy!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563247#M17053</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563248#M17054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Mon May 09 08:57:07 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: cktham&lt;/STRONG&gt;&lt;BR /&gt;lpc17_pureasm works :) from within IDE for LPC1769.&lt;BR /&gt;Thanks, Andy!&lt;BR /&gt; &lt;BR /&gt;Chen&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Chen,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy is only one of the nice people that answer under the username CodeRedSupport.&amp;nbsp; The only reason I had assumed it was Andy was his name in the files in the .zip above and that I knew he was going to ESC. Sorry to cause this confusion.&amp;nbsp; In the future use CodeRedSupport and not an individuals name when replying to posts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank You,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Larry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563248#M17054</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563249#M17055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cktham on Fri Jun 03 21:32:12 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]After the help from CodeRed Support below in early May, I managed to do some fun things with pure assembly language, the LPC1769 registers and stack. :)[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]However, I am not able to write into memory reserved using .word in the GNU assembler, e.g.[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]var1:[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]&amp;nbsp;&amp;nbsp;&amp;nbsp; . word 0[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]:[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]LDR R3, =var1[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]&amp;nbsp;&amp;nbsp;&amp;nbsp; STR R0, [R3][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]:[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]causes ImpreciseErr and StkErr at the next instruction (contents of R0 also not written into var1 location - I monitored these in the IDE)![/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]Another question is: does it matter where the var1: .word is done? [/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]I did it before vectors: .word definitions and it complained immediately, so I now I do it between vectors: .word definitions and .global _start[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]Please help.[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]Thanks.[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]Chen[/SIZE]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563249#M17055</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563250#M17056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Rob65 on Sat Jun 04 22:51:10 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;There must be something else going on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Arm v7-M Architecture Reference manual (downloadable via arm.com) tells me:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Derived exceptions on exception entry&lt;BR /&gt;Where an exception entry sequence itself causes a fault, the exception that caused the exception entry&lt;BR /&gt;sequence is known as the original exception. The fault that is caused by the exception entry sequence is&lt;BR /&gt;known as the derived exception. The code stream running at the time of the original exception is known as&lt;BR /&gt;the preempted code, and the execution priority of that code is the preempted priority.&lt;BR /&gt;The following derived exceptions can occur during exception entry:&lt;BR /&gt;• A MemManage fault on a write to the stack memory performed as part of the exception entry. This&lt;BR /&gt;is described as a MSTKERR class of MemManage fault.&lt;BR /&gt;• A BusFault on a write to the stack memory performed as part of the exception entry. This is described&lt;BR /&gt;as a STKERR class of BusFault.&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So this is a derived bus fault during exception entry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Meaning the error is not happening where you think it might be, the processor was somehow not able to properly enter the exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you using interrupts? Or are you simply stuck in one of the exception handlers in the startup code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ImpreciseErr means that the processor does not show you where the exact bus fault occured. If it was a PreciseErr you would have been able to read the address of the load or store in the Bus Fault Address Register, now you have to trace this back in your code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like you have a problem elsewhere in your code that appears to happen at this point. Do you see any strange things in your registers? What is the content of R3 when you execute the STR? What ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully you will be able to get a bit further with this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Debugging error exception is a difficult task (I've spend more than a few days tracking down errors like this in my own code). It is (almost) impossible to do this without having the complete environment set up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563250#M17056</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563251#M17057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cktham on Tue Jun 07 02:52:38 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to CodeRed Support (Rob) for your prompt response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This problem has stumped me for 2 days.:mad:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;StkErr sometimes does not happen, but ImpreciseErr always does.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem only occurs with the .word obtained address, e.g. 0x00000060 (which really contains the var1 value).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use another memory location, e.g. 0x10004000, everything is fine, e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LDR R3, =0x10004000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;STR R2, [R3]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LDR R5, [R3]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i.e. R2 content correctly written into 0x10004000 and correct value read back into R5.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563251#M17057</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pure assembler code for the LPC1114</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563252#M17058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by affonpign on Fri Jun 17 01:15:35 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried the assembler code disabling the main breakpoint and using the RAMAHB32 but I still have a problem because the debugger tells me:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;symbol is not available; 0x00000028&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also use the LPCExpresso IDE Chen is using. Can anybody help? Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;affonpign&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:15:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Pure-assembler-code-for-the-LPC1114/m-p/563252#M17058</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:15:53Z</dc:date>
    </item>
  </channel>
</rss>

