Skip to content
/ bl602-template Public template

Simple rust template for the pinenut/pinecone bl602 chip

Notifications You must be signed in to change notification settings

WYVERN2742/bl602-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PineNut/PineCone Rust Template

A simple project as a template for creating rust applications for the Pine64 "Pinenut" BL602 Wifi/Bluetooth SoC. PineNut Devkits with included USB-C interface are also known as "PineCones".

Thanks to all the existing documentation and repos of other rust projects used in the basis of this.

Installation

Install rust and cargo with rustup

Install other dependencies;

rustup install nightly-2022-12-25
rustup component add llvm-tools-preview --toolchain nightly-2022-12-25
rustup target add riscv32imac-unknown-none-elf

cargo install cargo-binutils
cargo install --git https://github.com/spacemeowx2/blflash cargo-blflash

These commands add the required toolchain targets along with binary flashing for easy development (No need for GUIs anymore 😉).

Building and Flashing

For a simple compilation which will create a bl602-template.bin file ready for flashing

cargo objcopy --release -- -O binary bl602-template.bin

The preferred method is to use blflash directly with cargo. (I recommend picking a baudrate across all projects and sticking to it)

# On windows:
cargo blflash --release --initial-baud-rate 1000000 --baud-rate 1000000 --port COM3

# On Linux:
cargo blflash --release --initial-baud-rate 1000000 --baud-rate 1000000 --port /dev/ttyUSB0

Note

If you're on linux, remember to have rw permission to your serial socket. You can do this by adding your user to the correct group; e.g dialout

About

Simple rust template for the pinenut/pinecone bl602 chip

Topics

Resources

Stars

Watchers

Forks