I am stuck and hoping for a clue. These lines seem to show the issue. It is for a Pi4.
.equ IOBASE, 0x7E200000 .equ GPFSEL2, 0x08 //offset to reg for IO Pins 20 - 29 .align 4 LDR R0, =IOBASE //skip read modify write for now, just set the bits LDR R1, =0x08 STR R1, [R0, #GPFSEL2] //Make Pin 21 output
It all assembles, compiles without warning or error, but I get a seg. fault at every STR operation when running. Makes no difference if I log in as pi or su. Using a high level language and/or a package like pigpio would defeat the purpose.