Skip to content

Commit 113357f

Browse files
committed
examples: add simple software task example
While we do have a dedicated repo for RTIC examples, it makes more sense to merge those too with this repo: cargo-rtic-scope, cortem-m-rtic-trace and relevant examples are all interlinked and must be in phase with eachother. However, we can't add it to the workspace yet because per-package-target[0] is not yet stable. [0] rust-lang/cargo#9406
1 parent 95e9c89 commit 113357f

File tree

7 files changed

+765
-2
lines changed

7 files changed

+765
-2
lines changed

.github/workflows/build.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ jobs:
2727
override: true
2828
components: rustfmt
2929

30-
- name: cargo fmt -- --check
30+
- name: check workspace formatting
31+
uses: actions-rs/cargo@v1
32+
with:
33+
command: fmt
34+
args: -- --check
35+
- run: cd ./examples
36+
- name: check examples formatting
3137
uses: actions-rs/cargo@v1
3238
with:
3339
command: fmt
@@ -92,7 +98,7 @@ jobs:
9298
target: ${{ matrix.target }}
9399
override: true
94100

95-
- name: cargo build
101+
- name: build workspace
96102
uses: actions-rs/cargo@v1
97103
with:
98104
command: build
@@ -102,6 +108,12 @@ jobs:
102108
with:
103109
name: cargo-rtic-scope
104110
path: target/${{ matrix.target }}/debug/cargo-rtic-scope
111+
- run: rustup target add thumbv7em-none-eabihf
112+
- run: cd ./examples && pwd
113+
- name: build examples
114+
uses: actions-rs/cargo@v1
115+
with:
116+
command: build
105117

106118
resolve:
107119
name: trace --resolve-only

examples/.cargo/config

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[target.thumbv7em-none-eabihf]
2+
rustflags = [
3+
"-C", "link-arg=-Tlink.x",
4+
"-C", "linker=arm-none-eabi-ld",
5+
]
6+
7+
[build]
8+
target = "thumbv7em-none-eabihf"

examples/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target/

0 commit comments

Comments
 (0)