I am trying to program a Arduino due in ARM assembly and have myself a fine program:
.asm
.text
.global changeworkingio
.type changeworkingio, %function
.global startup
.type startup, %function
.global main
.type main, %function
main:
bl startup
ldr r7, #0x400E1230
adr r7, #3
ldr r6, #0b1
str r7, [r6]
BX LR
startup:
ldr r7, #0x0
str r7, #0x400E12E4 ;allows PIOC to be modified :)
ldr r7, #0b1
ldr r6, #0x400E1200 ;writes
adr r6, r6, #3
str r7, [r6]
ldb r3, #3
ldb r4, #3
stb r3, workingio
stb r3, [workingio + #1]
BX LR
.data
.word workingio
.end
My issue is sending it to the board as all tutorials show how to write functions in asm and call from C. Boiled down my question is this: How do I write a compiled ARM program into the boards memory and have it run.