Skip to content

antoinevg/hello-d1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hello-d1

A starter project for the Lichee RV D1. There are many like it, but this one is mine.

Dependencies

Rust

rustup target add --toolchain nightly riscv64imac-unknown-none-elf
rustup component add --toolchain nightly llvm-tools-preview
cargo install cargo-binutils

xfel

Build:

git clone https://github.com/xboot/xfel.git xfel.git
cd xfel.git
make

Put device into xfel mode:

  • Power off
  • Hold xfel button
  • Power on
  • Release xfel button

Test:

./xfel version

Debugging

Dock UART

picocom --imap lfcrlf -b 115200 /dev/cu.usbmodem224302
# ctrl-a + ctrl-x to exit

D1 UART

picocom --imap lfcrlf -b 115200 /dev/cu.usbmodem22441202

TODO gdb

Install via homebrew:

brew tap "riscv-software-src/riscv"
brew install riscv-tools

Build from source:

https://github.com/T-head-Semi/xuantie-gnu-toolchain

Build, flash & run

cargo build --release --example audio_testsignal

rust-objcopy target/riscv64imac-unknown-none-elf/debug/test-d1-flash-bare \
    --binary-architecture=riscv64 \
    --strip-all -O binary \
    target/flash.bin

# put device into xfel mode

xfel ddr d1
xfel write 0x40000000 target/flash.bin
xfel exec 0x40000000

Noisy Audio Output

Add a RC Low Pass Filter with -3dB Cutoff @ ~33.8kHz:

C = 100nF
R = 47R

Greets fly to

About

Bare-metal Rust explorations of the Allwinner D1

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published