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 113357f
Show file tree
Hide file tree
Showing 7 changed files with 765 additions and 2 deletions.
16 changes: 14 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,12 @@ 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
uses: actions-rs/cargo@v1
with:
command: 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 113357f

Please sign in to comment.