one first step (on a 1000 miles journey)

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Harrie Nijhof on Sat Nov 08 15:48:31 MST 2014
Dear people,

Below my first attempt to program a 1343. Guess what, it does not work. I can compile it, load the image (72 bytes) into the chip.
After restart, I can no longer enter the uart isp  bootloader so I think the chip accepts the checksum in 0x1C  and is in program mode.
But, nothing happens, pin 18 should go low, remains high, probably in a input pull-up state.
What do I do wrong?
And, has anyone an example like this for me? Perhaps a hexdump of a working image, or still better the output of a arm-none-eabi-objdump.
Just something that toggles a pin, any pin. Once, or in a sequence, I don''t care.
Looking forward..........

.equ STACKINIT,0x10002000
.equ RESETVCTR,0x0000021
.equ GPIO2DIR,0x50028000
.equ GPIO2DATA,0x50023FFC
.equ LOOPTIME,6000000
.syntax unified

.org 0x0
_start: .global _start
.word _main + 1    @ reset vector (manually adjust to odd for thumb)
    .word _nmi_handler + 1  
    .word _hard_fault  + 1  
    .word _memory_fault + 1 
    .word _bus_fault + 1    
    .word _usage_fault + 1  
mov r0, 0x10
mov r2, 0
ldr r1, =GPIO2DIR
str r1, [r0]@ GPIO2DIR is now 0x10: pin18 = output
ldr r1, =GPIO2DATA
str r1, [r2]

b infinity
_dummy:                     @ if any int gets triggered, just hang in a loop
        add r0, 1
        add r1, 1
        b _dummy