Bare-metal Raspberry Pi Zero (BCM2835) project in Carp with:
- PL011 UART console
- IRQ-driven UART RX/TX ring buffers
- monitor shell (
help,uptime,sleep,peek,poke,hexdump,reboot,crash,logdump,tasks,yield,fbtest,dash on|off|once|rate|reset) - 1 kHz system timer tick
- scheduler tick queue drained in main loop
- mailbox framebuffer bring-up demo (
fbtest) - UART SREC RAM loader (
loadsrec,endsrec,boot)
Prereqs:
arm-none-eabi-gcctoolchaincarp
Build:
make -f tooling/MakefileOutput image:
build/kernel.img
Assuming boot volume mounted at /Volumes/BOOT:
cp build/kernel.img /Volumes/BOOT/kernel.img
syncconfig.txt should contain:
kernel=kernel.img
arm_64bit=0
enable_uart=1
init_uart_clock=3000000PL011 serial on GPIO14/15:
- TXD0: GPIO14 (pin 8)
- RXD0: GPIO15 (pin 10)
- GND: pin 6
Serial settings: 115200 8N1, no flow control.
Example:
screen /dev/tty.usbserial-BG02PQ2J 115200Serial regression check:
make -f tooling/Makefile serial-regress PORT=/dev/tty.usbserial-BG02PQ2JBuild RAM-linked SREC (entry at 0x00100000):
make -f tooling/Makefile srecIn monitor:
- Type
loadsrecand press Enter. - Paste
build/kernel_ram.sreclines into the serial terminal. - After
S7, loader exits SREC mode and prints entry/line/byte stats. - Type
bootto jump to loaded entry.
Accepted record types:
- data:
S1,S2,S3 - entry:
S7,S8,S9
Address window accepted by loader: 0x00100000..0x01FFFFFF.
docs/monitor.md: monitor command reference