Skip to content

Commit 9f7dbab

Browse files
committed
test no_std in CI
1 parent bd556d1 commit 9f7dbab

File tree

7 files changed

+500
-0
lines changed

7 files changed

+500
-0
lines changed

.github/workflows/embedded.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Test Embedded
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
-
11+
name: Checkout
12+
uses: actions/checkout@v2
13+
- name: Checkout Toolchain
14+
uses: actions-rs/toolchain@v1
15+
with:
16+
profile: minimal
17+
toolchain: nightly
18+
override: true
19+
components: rust-src
20+
target: thumbv7m-none-eabi
21+
-
22+
name: Build
23+
run: cd embedded && cargo +nightly build

embedded/.cargo/config

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[target.thumbv7m-none-eabi]
2+
# uncomment this to make `cargo run` execute programs on QEMU
3+
runner = "qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel"
4+
5+
rustflags = [
6+
# This is needed if your flash or ram addresses are not aligned to 0x10000 in memory.x
7+
# See https://github.com/rust-embedded/cortex-m-quickstart/pull/95
8+
"-C", "link-arg=--nmagic",
9+
10+
# LLD (shipped with the Rust toolchain) is used as the default linker
11+
"-C", "link-arg=-Tlink.x",
12+
13+
# if you run into problems with LLD switch to the GNU linker by commenting out
14+
# this line
15+
# "-C", "linker=arm-none-eabi-ld",
16+
17+
# if you need to link to pre-compiled C libraries provided by a C toolchain
18+
# use GCC as the linker by commenting out both lines above and then
19+
# uncommenting the three lines below
20+
# "-C", "linker=arm-none-eabi-gcc",
21+
# "-C", "link-arg=-Wl,-Tlink.x",
22+
# "-C", "link-arg=-nostartfiles",
23+
]
24+
25+
[build]
26+
target = "thumbv7m-none-eabi" # Cortex-M3

embedded/Cargo.lock

+287
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

embedded/Cargo.toml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[package]
2+
authors = ["Riccardo Casatta <[email protected]>"]
3+
edition = "2018"
4+
readme = "README.md"
5+
name = "embedded"
6+
version = "0.1.0"
7+
8+
[dependencies]
9+
cortex-m = "0.6.0"
10+
cortex-m-rt = "0.6.10"
11+
cortex-m-semihosting = "0.3.3"
12+
panic-halt = "0.2.0"
13+
bech32 = { path="../", default-features = false }
14+
alloc-cortex-m = "0.4.1"
15+
16+
# Uncomment for the panic example.
17+
# panic-itm = "0.4.1"
18+
19+
# Uncomment for the allocator example.
20+
# alloc-cortex-m = "0.4.0"
21+
22+
# Uncomment for the device example.
23+
# Update `memory.x`, set target to `thumbv7em-none-eabihf` in `.cargo/config`,
24+
# and then use `cargo build --examples device` to build it.
25+
# [dependencies.stm32f3]
26+
# features = ["stm32f303", "rt"]
27+
# version = "0.7.1"
28+
29+
# this lets you use `cargo fix`!
30+
[[bin]]
31+
name = "embedded"
32+
test = false
33+
bench = false
34+
35+
[profile.release]
36+
codegen-units = 1 # better optimizations
37+
debug = true # symbols are nice and they don't increase the size on Flash
38+
lto = true # better optimizations

0 commit comments

Comments
 (0)