Assembly projects on Raspberry Pi 4 model B
Blinky on built-in led
Blinky using a GPIO (17 randomly chosen)
Connect a led with 1k resistor in series from GPIO17 to ground
UART peripheral used to write strings to usb via TTL
UART peripheral used to read strings from usb via TTL
Uart reads are use to control the built-in LED.
Control an led with pwd peripheral
Control a motor with pwd peripheral
First, format an SD card in FAT32 format and name it "BOOT." To make this card bootable, a few more files are required:
bcm2711-rpi-4-b.dtb
bootcode.bin
start.elf
start4.elf
These can be downloaded from https://github.com/raspberrypi/firmware/tree/master/boot
Generate program with
arm-none-eabi-as blinky.s -o blinky.o
arm-none-eabi-ld --no-undefined blinky.o -o blinky.elf
arm-none-eabi-objcopy blinky.elf -O binary kernel7l.img
You can now copy your generated "kernel7i.img" file to the boot partition of the SD card. Now insert the card into the Raspberry Pi and boot the Raspberry Pi