I'm trying to control the GPIO in assembly. After a quick look at the ARM peripherals documentation, I wrote this program :
However, I have a segmentation fault when executing the first STR (STR r1, [r0, #4])
Code: Select all
.globl _start _start: LDR r0, =0x20200000 MOV r1, #0x200000 STR r1, [r0, #4] MOV r1, #0x20000 STR r1, [r0, #0x1C] loop: B loop
Could someone explain me what I'm doing wrong please ?