File tree Expand file tree Collapse file tree 3 files changed +40
-5
lines changed Expand file tree Collapse file tree 3 files changed +40
-5
lines changed Original file line number Diff line number Diff line change 1+ name : Rust
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ env :
10+ CARGO_TERM_COLOR : always
11+
12+ jobs :
13+ build :
14+
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v2
19+ - name : Install Dependencies
20+ run : |
21+ sudo apt update
22+ rustup component add rust-src
23+ cargo install cargo-binutils
24+ rustup component add llvm-tools-preview
25+ - name : Build
26+ run : |
27+ ./build.sh
28+ - name : Run tests
29+ run : cargo test --verbose
Original file line number Diff line number Diff line change 33This is a flash algorithm for the RP2040 chip, used in the Raspberry Pi Pico board.
44It implements the CMSIS-Pack ABI, so it's compatible with any tools that use it, including probe-rs.
55
6+ ## Dependencies
7+
8+ Run the following requirements:
9+ ``` bash
10+ cargo install cargo-binutils && rustup component add llvm-tools-preview rust-src
11+ ```
612## Building
713
814Building requires nightly Rust.
Original file line number Diff line number Diff line change @@ -5,16 +5,16 @@ set -euo pipefail
55cargo build --release
66ELF=target/thumbv6m-none-eabi/release/flash-algo
77
8- llvm -objdump --disassemble $ELF > target/disassembly.s
9- llvm -objdump -x $ELF > target/dump.txt
10- llvm -nm $ELF -n > target/nm.txt
8+ rust -objdump --disassemble $ELF > target/disassembly.s
9+ rust -objdump -x $ELF > target/dump.txt
10+ rust -nm $ELF -n > target/nm.txt
1111
1212function bin {
13- llvm -objcopy $ELF -O binary - | base64 -w0
13+ rust -objcopy $ELF -O binary - | base64 -w0
1414}
1515
1616function sym {
17- echo $(( 0 x$(llvm - nm $ELF | grep - w $1 | cut - d ' ' - f 1 ) + 1 ))
17+ echo $(( 0 x$(rust - nm $ELF | grep - w $1 | cut - d ' ' - f 1 ) + 1 ))
1818}
1919
2020cat << EOF
You can’t perform that action at this time.
0 commit comments