Has anyone been successful in assembling, compiling and running thumb or thumb-2 on Rasparian. Here is an example of my assembly code:
.text .global main .code 16 main: MOV r3,#1 finish: bx lr
I have been attempting to use gas for assembly and gcc to compile:
as -o multiply.o multiply.s gcc -mthumb -o multiply multiply.o
Both run without a complaint but when I attempt to run the code in GDB I get a SIGILL:
(gdb) b main Breakpoint 1 at 0x8392 (gdb) run Starting program: /home/pi/Dev/assembly_files/multiply Program received signal SIGILL, Illegal instruction. 0x00008390 in main ()
So, I'm uncertain if its something I am doing wrong or if I need to change my toolchain or other? I appreciate any advice. Also know that normal 32-bit ARM assembles, compiles and runs like a champ.