I have been struggling to light an LED using my raspberry pi 4 model b but have not been able to find a solution.
My assembly code :
.section .init .globl _start _start: mov r0, #0xF0000000 orr r0, #0x0E000000 orr r0, #0x00200000 orr r0, #0x00000004 mov r1, #1 lsl r1, #18 str r1, [r0] mov r0, #0xF0000000 orr r0, #0x0E000000 orr r0, #0x00200000 orr r0, #0x0000001C mov r1, #1 lsl r1, #16 str r1, [r0] loop$: b loop$
I am trying to light up the LED through GPIO 16. A post on the raspberry pi forums suggests that the peripheral memory base has changed to 0xFE000000 instead of 0x20000000 + the GPIO offset; neither of those memory addresses worked to light the LED.
I also installed NOOBS on a different SD card and wrote a python script to light the LED and that worked.
To learn about the bare metals of raspberry pi, I have been reading the Baking Pi tutorial by the University of Cambridge.
Any help would be great.