Skip to content

Commit 0ffd083

Browse files
committed
Merge cortex-m-rt repository into cortex-m.
2 parents 92552c7 + 5932aaa commit 0ffd083

File tree

94 files changed

+4956
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+4956
-0
lines changed

cortex-m-rt/.cargo/config

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[target.thumbv6m-none-eabi]
2+
runner = "qemu-system-arm -cpu cortex-m0 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel"
3+
4+
[target.thumbv7m-none-eabi]
5+
runner = "qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel"
6+
7+
[target.thumbv7em-none-eabi]
8+
runner = "qemu-system-arm -cpu cortex-m4 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel"
9+
10+
[target.thumbv7em-none-eabihf]
11+
runner = "qemu-system-arm -cpu cortex-m4 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel"
12+
13+
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
14+
# uncomment ONE of these three option to make `cargo run` start a GDB session
15+
# which option to pick depends on your system
16+
# runner = "arm-none-eabi-gdb -q -x openocd.gdb"
17+
# runner = "gdb-multiarch -q -x openocd.gdb"
18+
# runner = "gdb -q -x openocd.gdb"
19+
20+
rustflags = [
21+
# LLD (shipped with the Rust toolchain) is used as the default linker
22+
"-C", "link-arg=-Tlink.x",
23+
24+
# if you run into problems with LLD switch to the GNU linker by commenting out
25+
# this line
26+
# "-C", "linker=arm-none-eabi-ld",
27+
28+
# if you need to link to pre-compiled C libraries provided by a C toolchain
29+
# use GCC as the linker by commenting out both lines above and then
30+
# uncommenting the three lines below
31+
# "-C", "linker=arm-none-eabi-gcc",
32+
# "-C", "link-arg=-Wl,-Tlink.x",
33+
# "-C", "link-arg=-nostartfiles",
34+
]

cortex-m-rt/.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @rust-embedded/cortex-m

cortex-m-rt/.github/bors.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
block_labels = ["needs-decision"]
2+
delete_merged_branches = true
3+
required_approvals = 1
4+
status = [
5+
"ci-linux (stable)",
6+
"ci-linux (1.39.0)",
7+
"build-other (macOS-latest)",
8+
"build-other (windows-latest)",
9+
"Rustfmt"
10+
]

cortex-m-rt/.github/workflows/ci.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
on:
2+
push:
3+
branches: [ staging, trying, master ]
4+
pull_request:
5+
6+
name: Continuous integration
7+
8+
jobs:
9+
ci-linux:
10+
runs-on: ubuntu-20.04
11+
continue-on-error: ${{ matrix.experimental || false }}
12+
strategy:
13+
matrix:
14+
# All generated code should be running on stable now
15+
rust: [nightly, stable, 1.39.0]
16+
17+
include:
18+
# Nightly is only for reference and allowed to fail
19+
- rust: nightly
20+
experimental: true
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions-rs/toolchain@v1
25+
with:
26+
profile: minimal
27+
toolchain: ${{ matrix.rust }}
28+
override: true
29+
- name: Install all Rust targets for ${{ matrix.rust }}
30+
run: rustup target install --toolchain=${{ matrix.rust }} thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf
31+
- name: Install qemu and gcc
32+
run: sudo apt-get update && sudo apt-get install qemu-system-arm gcc-arm-none-eabi
33+
- name: Run CI script for x86_64-unknown-linux-gnu under ${{ matrix.rust }}
34+
run: TARGET=x86_64-unknown-linux-gnu TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
35+
- name: Run CI script for thumbv6m-none-eabi under ${{ matrix.rust }}
36+
run: TARGET=thumbv6m-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
37+
- name: Run CI script for thumbv7m-none-eabi under ${{ matrix.rust }}
38+
run: TARGET=thumbv7m-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
39+
- name: Run CI script for thumbv7em-none-eabi under ${{ matrix.rust }}
40+
run: TARGET=thumbv7em-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
41+
- name: Run CI script for thumbv7em-none-eabihf under ${{ matrix.rust }}
42+
run: TARGET=thumbv7em-none-eabihf TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
43+
- name: Run CI script for thumbv8m.base-none-eabi under ${{ matrix.rust }}
44+
run: TARGET=thumbv8m.base-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
45+
- name: Run CI script for thumbv8m.main-none-eabi under ${{ matrix.rust }}
46+
run: TARGET=thumbv8m.main-none-eabi TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
47+
- name: Run CI script for thumbv8m.main-none-eabihf under ${{ matrix.rust }}
48+
run: TARGET=thumbv8m.main-none-eabihf TRAVIS_RUST_VERSION=${{ matrix.rust }} bash ci/script.sh
49+
50+
# On macOS and Windows, we at least make sure that all examples build and link.
51+
build-other:
52+
strategy:
53+
matrix:
54+
os:
55+
- macOS-latest
56+
- windows-latest
57+
runs-on: ${{ matrix.os }}
58+
59+
steps:
60+
- uses: actions/checkout@v2
61+
- uses: actions-rs/toolchain@v1
62+
with:
63+
profile: minimal
64+
toolchain: stable
65+
override: true
66+
- name: Install all Rust targets
67+
run: rustup target install thumbv6m-none-eabi thumbv7m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf
68+
- name: Build examples for thumbv6m-none-eabi
69+
run: cargo build --target=thumbv6m-none-eabi --examples
70+
- name: Build examples for thumbv7m-none-eabi
71+
run: cargo build --target=thumbv7m-none-eabi --examples
72+
- name: Build examples for thumbv7em-none-eabi
73+
run: cargo build --target=thumbv7em-none-eabi --examples
74+
- name: Build examples for thumbv7em-none-eabihf
75+
run: cargo build --target=thumbv7em-none-eabihf --examples
76+
- name: Build examples for thumbv8m.base-none-eabi
77+
run: cargo build --target=thumbv8m.base-none-eabi --examples
78+
- name: Build examples for thumbv8m.main-none-eabi
79+
run: cargo build --target=thumbv8m.main-none-eabi --examples
80+
- name: Build examples for thumbv8m.main-none-eabihf
81+
run: cargo build --target=thumbv8m.main-none-eabihf --examples
82+
- name: Build crate for host OS
83+
run: cargo build
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
on:
2+
push:
3+
branches: [ staging, trying, master ]
4+
pull_request:
5+
6+
name: Clippy check
7+
jobs:
8+
clippy_check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions-rs/toolchain@v1
13+
with:
14+
profile: minimal
15+
toolchain: stable
16+
override: true
17+
components: clippy
18+
- uses: actions-rs/clippy-check@v1
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
push:
3+
branches: [ staging, trying, master ]
4+
pull_request:
5+
6+
name: Code formatting check
7+
8+
jobs:
9+
fmt:
10+
name: Rustfmt
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions-rs/toolchain@v1
15+
with:
16+
profile: minimal
17+
toolchain: stable
18+
override: true
19+
components: rustfmt
20+
- uses: actions-rs/cargo@v1
21+
with:
22+
command: fmt
23+
args: --all -- --check

cortex-m-rt/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
**/*.rs.bk
2+
.#*
3+
Cargo.lock
4+
bin/*.after
5+
bin/*.before
6+
bin/*.o
7+
target/

0 commit comments

Comments
 (0)