https://github.com/albanseurat/aos
Raspi3 bare-bone playground with Rust Programming language
https://github.com/albanseurat/aos
bare-metal operating-system os raspberry-pi raspberry-pi-3 rust
Last synced: 2 months ago
JSON representation
Raspi3 bare-bone playground with Rust Programming language
- Host: GitHub
- URL: https://github.com/albanseurat/aos
- Owner: AlbanSeurat
- Created: 2019-08-19T19:53:08.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-16T11:17:30.000Z (over 1 year ago)
- Last Synced: 2025-03-16T12:26:37.820Z (over 1 year ago)
- Topics: bare-metal, operating-system, os, raspberry-pi, raspberry-pi-3, rust
- Language: Rust
- Homepage:
- Size: 929 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# AoS
Small playground bare-metal programming for raspberry pi 3+ (my own)
I have been inspired by https://github.com/bztsrc/raspi3-tutorial and https://github.com/rust-embedded/rust-raspi3-OS-tutorials
## setup env`(macOS)
```./setup.sh```
## compile and run
* to compile rust programs
```make```
* to run the kernel and programs
setup the tty to simulate the serial
```socat pty,link=cu.serial-master,raw,echo=0 pty,link=cu.serial-slave,raw,echo=0```
prepare the sender
```pip install pyserial```
```python3 load.py cu.serial-slave```
run arguments
```./run.sh```
#### show instructions and interruption
```./run.sh -d in_asm,int ```
## Run on real hardware
* wire the cable et setup the link
```python3 load.py `ls /dev/cu.usb*` ```
* launch raspi (python will show the debug output)
## copy on SD card and run on Raspi
Files to be found here :
https://github.com/raspberrypi/firmware/tree/master/boot
- bootcode.bin
- start.elf
- fixup.dat
Schematics with my USB-to-serial
## Troubleshooting
#### Exception Handling
Reference : SysReg_xml_v85A-2019-06.pdf (page 418)
ELR : The execption returns (where the exception occured if data fault or synchronous)
ESR_ELx : Register holding exception information :
EC : Exception Class
#### Disassembling
- Disassemble stripped version
```aarch64-none-elf-objdump -b binary -maarch64 -D program.img```
- Disassemble version with symbol
aarch64-none-elf-objdump -g -D target/aarch64-unknown-none/release/aos-kernel