A starter project for the Lichee RV D1. There are many like it, but this one is mine.
rustup target add --toolchain nightly riscv64imac-unknown-none-elf
rustup component add --toolchain nightly llvm-tools-preview
cargo install cargo-binutils
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
picocom --imap lfcrlf -b 115200 /dev/cu.usbmodem224302
# ctrl-a + ctrl-x to exit
picocom --imap lfcrlf -b 115200 /dev/cu.usbmodem22441202
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
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
Add a RC Low Pass Filter with -3dB Cutoff @ ~33.8kHz:
C = 100nF
R = 47R