This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export GIT_AUTHOR_NAME="""bouffalolab""" | |
export GIT_AUTHOR_EMAIL="""[email protected]""" | |
export GIT_AUTHOR_DATE="$2" | |
export GIT_COMMITTER_NAME="""bouffalolab""" | |
export GIT_COMMITTER_EMAIL="""[email protected]""" | |
export GIT_COMMITTER_DATE="$2" | |
rm "*" -rf | |
tar -xvf ../bflb-mcu-tool-$1.tar.gz --strip-components=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! # Pimoroni Display Pack Example | |
#![no_std] | |
#![no_main] | |
use embedded_hal::digital::v2::InputPin; | |
// The macro for our start-up function | |
use rp_pico::entry; | |
// Time handling traits |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo qemu-debootstrap --arch=mipsel --keyring /usr/share/keyrings/debian-archive-keyring.gpg \ | |
--variant=buildd --exclude=debfoster unstable debian-mipsel http://ftp.debian.org/debian | |
sudo apt install qemu binfmt-support qemu-user-static | |
sudo cp /usr/bin/qemu-mipsel-static debian-mipsel/usr/bin/ | |
cd debian-mipsel | |
for f in dev dev/pts sys proc run ; do sudo mount --bind /$f ./$f ; done | |
sudo chroot . | |
apt update | |
apt install dialog locales |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swd-1: LINERESET | |
swd-1: JTAG->SWD | |
swd-1: LINERESET | |
swd-1: IDCODE | |
swd-1: OK | |
swd-1: 0x2ba01477 | |
swd-1: W ABORT | |
swd-1: OK | |
swd-1: 0x0000001e | |
swd-1: W SELECT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! # Pico USB Serial - with format, panics. | |
//! Should move into it's own crate. | |
//! | |
//! heavily inspired by https://github.com/eterevsky/rp2040-blink/blob/main/src/main.rs and https://github.com/mvirkkunen/rtt-target | |
#![no_std] | |
#![no_main] | |
use core::cell::RefCell; | |
use core::fmt::Write; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"arch": "riscv32", | |
"cpu": "generic-rv32", | |
"data-layout": "e-m:e-p:32:32-i64:64-n32-S128", | |
"eh-frame-header": false, | |
"emit-debug-gdb-scripts": false, | |
"executables": true, | |
"features": "+m,+a", | |
"linker": "rust-lld", | |
"linker-flavor": "ld.lld", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::net::{TcpStream}; | |
use std::io::{Read, Write}; | |
use memchr::memmem; | |
// Update this to match what your tool says. | |
const END_OF_SEGGER_RTT_HEADER: &[u8; 28] = b"Process: JLinkGDBServerCLExe"; | |
fn main() { | |
match TcpStream::connect("localhost:19021") { | |
Ok(mut stream) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! # UART Example | |
//! | |
//! This application demonstrates how to use the UART Driver to talk to a serial | |
//! connection. | |
//! | |
//! It may need to be adapted to your particular board layout and/or pin | |
//! assignment. | |
//! | |
//! See the `Cargo.toml` file for Copyright and licence details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uart1_pins_split-join_flow-control.rs: configuring pins as TX/RX/CTS/RTS, split and join functions, UART HW flow control | |
uart0_split_flow-control.rs: test UART HW flow control on UART0 but uses split TX/RX for all operations | |
flow_control_debugging.rs: attempting to work out if we could unblock UART after errors (unsuccessfully) | |
I also tested without the CTS/RTS pins enabled, and that worked fine (HW flow control is currently always enabled) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! Serial Peripheral Interface (SPI) | |
//! | |
//! See [Chapter 4 Section 4](https://datasheets.raspberrypi.org/rp2040/rp2040_datasheet.pdf) for more details | |
//! | |
//! ## Usage | |
//! | |
//! ```no_run | |
//! use embedded_hal::spi::MODE_0; | |
//! use embedded_time::rate::*; | |
//! use rp2040_hal::{spi::Spi, gpio::{Pins, FunctionSpi}, pac, sio::Sio}; |