Skip to content

Commit

Permalink
Added BSC slides and BSC demo.
Browse files Browse the repository at this point in the history
Had to move existing code down a level to avoid a conflict. Workspaces do not like having multiple incompatible targets.
  • Loading branch information
jonathanpallant committed Sep 14, 2023
1 parent 3ac2186 commit 4ccedbf
Show file tree
Hide file tree
Showing 22 changed files with 578 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ jobs:
- name: Build book-and-slides
run: |
./training-slides/build.sh
cd ./training-slides && ./build.sh
- name: Build example code
run: |
./example-code/build.sh
cd ./example-code && ./build.sh
- name: Assemble Artifacts
run: |
echo "Making ./rust-training-${{ env.slug }}..."
mkdir -p ./rust-training-${{ env.slug }}
mv ./training-slides/slides ./rust-training-${{ env.slug }}/training-slides-presentation
mv ./training-slides/book ./rust-training-${{ env.slug }}/training-slides-book
cp -r ./example-code ./rust-training-${{ env.slug }}
echo "Compressing ./rust-training-${{ env.slug }}.zip..."
zip -r ./rust-training-${{ env.slug }}.zip ./rust-training-${{ env.slug }}
Expand Down
14 changes: 10 additions & 4 deletions example-code/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

set -euo pipefail

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# Check the example code
cargo build --all --manifest-path ${SCRIPT_DIR}/Cargo.toml
pushd ./native
cargo build --all
popd
# And the C based example
make -C ${SCRIPT_DIR}/ffi/use-rust-in-c
pushd native/ffi/use-rust-in-c
make
popd
# And the nRF52 examples
pushd ./nrf52/bsp_demo
cargo build
popd
File renamed without changes.
1 change: 1 addition & 0 deletions example-code/Cargo.toml → example-code/native/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[workspace]
members = ["ffi/use-c-in-rust", "ffi/use-rust-in-c"]
resolver = "2"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions example-code/nrf52/bsp_demo/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[build]
target = "thumbv7em-none-eabihf"

[target.thumbv7em-none-eabihf]
runner = "probe-run --chip nRF52840_xxAA"
rustflags = [
"-C", "link-arg=-Tlink.x",
]
Loading

0 comments on commit 4ccedbf

Please sign in to comment.