Skip to content

Commit b6410c6

Browse files
usb example
1 parent bbdef68 commit b6410c6

33 files changed

Lines changed: 90051 additions & 2 deletions

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
# usb-examples
2-
USB Examples for RP2 and STM32
1+
# Embassy USB Examples
2+
This repository contains several examples using Embassy's USB drivers for RP2 and STM32.
3+
4+
Host software is implemented in Rust and Python.
5+
6+
## Folders
7+
- `device` - firmware used on the device
8+
- `host` - software used for the host
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file is used for configuring Cargo's behavior for your Rust project.
2+
3+
# This section is used for defining the configuration options for the build process.
4+
[build]
5+
# Specify the target triple we are building for
6+
# Cross-compiling for the Raspberry Pi Pico 2 requires the thumbv8m.main-none-eabihf triple. It tells the compiler to build code for:
7+
# * the ARMv8-M Mainline (thumbv8m.main) architecture
8+
# * that runs bare metal, without an operating system available (none)
9+
# * uses the Embedded Application Binary Interface (eabi) with hardware floating point support (hf)
10+
target = "thumbv8m.main-none-eabihf"
11+
12+
# This section is used for defining the executable that will run when we use the `cargo run` command.
13+
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
14+
# Run probe-rs for flashing the executable on the board.
15+
runner = "probe-rs run --chip RP235x"
16+
17+
# This section is used to specify environment variables that should be set when
18+
# running Cargo commands.
19+
[env]
20+
# This environment variable is used by the `defmt` crate to specify the level of
21+
# logging. This crate supports five levels of logging ranked by severity from
22+
# lowest to highest:
23+
# * `trace`
24+
# * `debug`
25+
# * `info`
26+
# * `warn`
27+
# * `error`
28+
DEFMT_LOG = "info"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"preLaunchTask": "rust: cargo build",
6+
"type": "probe-rs-debug",
7+
"request": "launch",
8+
"name": "STM32 Nucleu F429ZI",
9+
"cwd": "${workspaceFolder}",
10+
"connectUnderReset": false,
11+
"chip": "STM32F429ZITx",
12+
"flashingConfig": {
13+
"flashingEnabled": true,
14+
"haltAfterReset": false,
15+
},
16+
"coreConfigs": [
17+
{
18+
"coreIndex": 0,
19+
"programBinary": "./target/thumbv8m.main-none-eabihf/debug/${workspaceFolderBasename}",
20+
"svdFile": "./stm32f429zi.svd",
21+
"rttEnabled": true,
22+
}
23+
]
24+
}
25+
]
26+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"rust-analyzer.check.allTargets": false,
3+
"rust-analyzer.cargo.target": "thumbv8m.main-none-eabihf",
4+
"editor.formatOnSave": true,
5+
"editor.formatOnSaveMode": "file",
6+
}

0 commit comments

Comments
 (0)