Skip to content

Commit

Permalink
Merge branch 'rtic-rs:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
romancardenas authored Dec 21, 2023
2 parents ca1d535 + deda4f0 commit 05d4f98
Show file tree
Hide file tree
Showing 24 changed files with 1,148 additions and 133 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install rust ${{ matrix.toolchain }}
run: |
rustup set profile minimal
Expand All @@ -166,6 +166,9 @@ jobs:
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2

- name: Install flip-link
run: cargo install flip-link

- name: Check the examples
run: cargo xtask usage-example-build

Expand Down Expand Up @@ -277,22 +280,22 @@ jobs:
cp -r target/doc $td/api
echo rtic
lychee --offline --format detailed $td/api/rtic/
echo rtic_common
lychee --offline --format detailed $td/api/rtic_common/
echo rtic_macros
lychee --offline --format detailed $td/api/rtic_macros/
echo rtic_monotonics
lychee --offline --format detailed $td/api/rtic_monotonics/
echo rtic_sync
lychee --offline --format detailed $td/api/rtic_sync/
echo rtic_time
lychee --offline --format detailed $td/api/rtic_time/
- name: Archive the API docs
run: |
Expand Down Expand Up @@ -338,7 +341,7 @@ jobs:
name: apidocs

- name: Extract the API docs
run: tar -xf apidocs.tar
run: tar -xf apidocs.tar

- name: Check links
run: |
Expand Down Expand Up @@ -465,7 +468,7 @@ jobs:
# master branch.
# As master moves on to development, the work on the
# stable version will happen in release/v"stable_version".
# Thus, no need to push changes
# Thus, no need to push changes
#
# This needs to run before book is built, as bookbuilding fetches from the branch
pushtostablebranch:
Expand Down Expand Up @@ -505,8 +508,8 @@ jobs:
runs-on: ubuntu-22.04
needs:
- pushtostablebranch
- docs
- mdbookold
- docs
- mdbookold
- mdbook

# Only run this when pushing to master branch
Expand All @@ -523,7 +526,7 @@ jobs:
uses: taiki-e/install-action@v2
with:
tool: mdbook-mermaid

- name: mdBook Action
uses: peaceiris/actions-mdbook@v1
with:
Expand All @@ -539,7 +542,7 @@ jobs:

- name: Extract the dev-version book and API docs
run: |
tar -xf book.tar
tar -xf book.tar
- name: Download built old versions of books and API docs
uses: actions/download-artifact@v3
Expand All @@ -548,7 +551,7 @@ jobs:

- name: Extract the old version books and API docs
run: |
tar -xf mdbookold.tar
tar -xf mdbookold.tar
- name: Prepare books
shell: 'script --return --quiet --command "bash {0}"'
Expand Down Expand Up @@ -633,7 +636,7 @@ jobs:

- name: Extract the books
run: |
tar -xf bookstodeploy.tar
tar -xf bookstodeploy.tar
- name: Deploy to GH-pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
18 changes: 18 additions & 0 deletions examples/nrf52840_blinky/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
runner = "probe-rs run --chip nRF52840_xxAA"

rustflags = [
"-C", "linker=flip-link",
"-C", "link-arg=-Tlink.x",
"-C", "link-arg=-Tdefmt.x",
# This is needed if your flash or ram addresses are not aligned to 0x10000 in memory.x
# See https://github.com/rust-embedded/cortex-m-quickstart/pull/95
"-C", "link-arg=--nmagic",
]

[build]
target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)

[alias]
rb = "run --bin"
rrb = "run --release --bin"
1 change: 1 addition & 0 deletions examples/nrf52840_blinky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
9 changes: 9 additions & 0 deletions examples/nrf52840_blinky/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
// override the default setting (`cargo check --all-targets`) which produces the following error
// "can't find crate for `test`" when the default compilation target is a no_std target
// with these changes RA will call `cargo check --bins` on save
"rust-analyzer.checkOnSave.allTargets": false,
"rust-analyzer.checkOnSave.extraArgs": [
"--bins"
]
}
Loading

0 comments on commit 05d4f98

Please sign in to comment.