Skip to content

Commit

Permalink
examples: add simple software task example
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tmplt committed Nov 1, 2021
1 parent 95e9c89 commit 39b5be2
Show file tree
Hide file tree
Showing 7 changed files with 763 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ jobs:
override: true
components: rustfmt

- name: cargo fmt -- --check
- name: check workspace formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- run: cd ./examples
- name: check examples formatting
uses: actions-rs/cargo@v1
with:
command: fmt
Expand Down Expand Up @@ -92,7 +98,7 @@ jobs:
target: ${{ matrix.target }}
override: true

- name: cargo build
- name: build workspace
uses: actions-rs/cargo@v1
with:
command: build
Expand All @@ -102,6 +108,10 @@ jobs:
with:
name: cargo-rtic-scope
path: target/${{ matrix.target }}/debug/cargo-rtic-scope
- run: rustup target add thumbv7em-none-eabihf
- run: cd ./examples && pwd
- name: build examples
run: cargo build

resolve:
name: trace --resolve-only
Expand Down
8 changes: 8 additions & 0 deletions examples/.cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[target.thumbv7em-none-eabihf]
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=arm-none-eabi-ld",
]

[build]
target = "thumbv7em-none-eabihf"
1 change: 1 addition & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
Loading

0 comments on commit 39b5be2

Please sign in to comment.