Skip to content

ThePurpleOne/bare_led

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bare metal Rust Blink

Run on real hardware

Need :

rustup target add armv7a-none-eabi

Compile code into ELF:

cargo build --release

Flatten into binary

arm-none-eabi-objcopy -O binary ./target/armv7a-none-eabi/release/led ./kernel.img

Put it on SD

Put the to_push/kernel.img on the SD card alongside with:

  • bootcode.bin
  • fixup.dat
  • start.elf

Simulate it

Need :

rustup target add aarch64-unknown-none

QEMU Simulating

We can test out things with qemu:

qemu-system-aarch64 -M raspi3b -serial stdio -kernel to_push/kernel.img

Sources

Sourceware : Linker script explanation BCM 2837 Datasheet Interactive Pinout

About

Bare metal LED blink on raspberry Pi, in RUST.

Resources

Stars

Watchers

Forks

Packages

No packages published