docs.rs failed to build py32f030_hal-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
简介
该库提供 py32f030 芯片使用,目前适配了一些基本的外设驱动
安装环境
安装 Rust
Mac/Linux
|
Windows
设置 Rust night 版本
Rust 的嵌入式开发环境需要是 nightly 版本
安装 Cortex-M0 编译工具
测试编译环境
执行下面的命令,没有报错说明rust编译环境安装正常
cd py32f030-hal
cargo build
查看本机Rust 版本
)
)
安装 Probe-rs
Probe-rs 是一个优秀的固件下载和日志调试工具, 详细安装和功能请点击页面查看。
Mac/Linux
|
Windows
其他工具(暂时可不用安装)
cargo tools
串口烧录工具
- python工具 puyaisp 安装
pip install puyaisp
pip install pyusb pyserial hid
烧录:
# 同时按下 boot 和 RST 按键,然后先释放 RST,然后释放 Boot 即可,然后执行以下命令
- rust 工具 pyisp 使用 pyisp rust 串口工具烧录 bin 文件 pyisp
# 单次下载
# 多次下载
Jlink 连接运行并查看日志
- 使用cargo run命令
cargo r --example embassy_uart
- 使用 probe-rs 运行
probe-rs run --chip PY32F030x8 target/thumbv6m-none-eabi/debug/examples/embassy_uart
外设驱动
- gpio
- exit
- timer
- i2c
- clock
- embassy
- dma
- usart
- adc
- flash
- spi
- crc
- rtc
- iwatchdog
TODO
- LPTimer
- Flash
- Clock -> 48M
- spi test
examples
执行
# run
# build
Example list
)
测试开发板
关于
公众号:Rust嵌入式