Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evan-brass/baremetal-pi
RaspberryPi 3 B+ - Bare Metal Programming
https://github.com/evan-brass/baremetal-pi
Last synced: 16 days ago
JSON representation
RaspberryPi 3 B+ - Bare Metal Programming
- Host: GitHub
- URL: https://github.com/evan-brass/baremetal-pi
- Owner: evan-brass
- Created: 2019-01-20T18:25:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-09T23:36:36.000Z (about 3 years ago)
- Last Synced: 2024-10-10T19:00:05.632Z (about 1 month ago)
- Language: Assembly
- Size: 7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A skeleton baremetal project
## Dependencies
* cargo-binutils: `cargo install cargo-binutils`
* (required by binutils) `rustup component add llvm-tools-preview`
* ARM64 cross-target: `rustup target add aarch64-unknown-none-softfloat`## Status
It doesn't do much. It currently just blinks the green ACT led a few times and outputs "Hello World!" to the console before panicking. The panic handler outputs the panic message to the console.
The stack issue was resolved. Current issue: Any atomic memory access fails. I don't really know what that means. I haven't setup everything yet. We still need page tables. Also, maybe there's some multi cpu setup that needs to happen before being able to use atomics. I don't know.## Instructions
### Initial Configuration:
* Add firewall rule for TFTP: UDP 69 inbound
* Add firewall rule for DHCP: UDP 67 inbound
* Configure static ip for eth0: 10.0.0.10 subnet 255.0.0.0### Development time setup
* Plug in the raspberry pi + power it on:
* The static ip configuration only takes effect when the computer sees something on eth0. The DHCP server will ignore eth0 if doesn't have a subnet configuration that matches (eth0 is 169 if no device)
* Start the DHCP server `clear; sudo dhcpd -4 -cf ./dhcp.conf`
* Start the TFTP server `clear; sudo in.tftpd -4 --listen -s tftp-root`
* (optional) Run wireshark `sudo wireshark`### Development cycle
* run `./make.sh`
* Restart the pi (either unplug / replug or use the reset button)## Links
* Boot Codes: https://www.raspberrypi.org/documentation/configuration/led_blink_warnings.md
* Network booting: https://metebalci.com/blog/bare-metal-rpi3-network-boot/
* OS dev: https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials
* BCM2837: https://cs140e.sergio.bz/docs/BCM2837-ARM-Peripherals.pdf