Skip to content

Comprehensively re-worked. #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[target.armv8r-none-eabihf]
# Note, this requires QEMU 9 or higher
runner = "qemu-system-arm -machine mps3-an536 -cpu cortex-r52 -semihosting -nographic -kernel"

[target.armv7r-none-eabihf]
runner = "qemu-system-arm -machine versatileab -cpu cortex-r5f -semihosting -nographic -kernel"

[target.armv7r-none-eabi]
# change to '-mcpu=cortex-r5' to '-mcpu=cortex-r5f' if you use eabi-fpu feature, otherwise
# qemu-system-arm will lock up
runner = "qemu-system-arm -machine versatileab -cpu cortex-r5 -semihosting -nographic -kernel"
3 changes: 0 additions & 3 deletions .github/bors.toml

This file was deleted.

229 changes: 229 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
on:
push:
branches: [ main ]
pull_request:

name: Build

jobs:
# Build the workspace for a target architecture
build:
runs-on: ubuntu-24.04
strategy:
matrix:
rust: [stable, 1.82]
target:
- armebv7r-none-eabi
- armebv7r-none-eabihf
- armv7r-none-eabi
- armv7r-none-eabihf
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup target add ${{ matrix.target }}
- name: Build
run: |
cargo build --target ${{ matrix.target }}

# Build the host tools
build-host:
runs-on: ubuntu-24.04
strategy:
matrix:
rust: [stable, 1.82]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- name: Build
run: |
cd arm-targets
cargo build

# Build the workspace for the target architecture but using nightly to compile libcore
build-tier3:
runs-on: ubuntu-24.04
strategy:
matrix:
target:
- armebv7r-none-eabi
- armebv7r-none-eabihf
- armv7r-none-eabi
- armv7r-none-eabihf
- armv8r-none-eabihf
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup install nightly
rustup default nightly
rustup component add rust-src --toolchain nightly
- name: Build
run: |
cargo build --target ${{ matrix.target }} -Zbuild-std=core

# Gather all the above build jobs together for the purposes of getting an overall pass-fail
build-all:
runs-on: ubuntu-24.04
needs: [build, build-tier3, build-host]
steps:
- run: /bin/true

# Build the docs for the workspace
docs:
runs-on: ubuntu-24.04
strategy:
matrix:
rust: [stable, 1.82]
target:
- armebv7r-none-eabi
- armebv7r-none-eabihf
- armv7r-none-eabi
- armv7r-none-eabihf
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup target add ${{ matrix.target }}
- name: Build docs
run: |
cargo doc --target ${{ matrix.target }}

# Build the docs for the host tools
docs-host:
runs-on: ubuntu-24.04
strategy:
matrix:
rust: [stable, 1.82]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- name: Build docs
run: |
cd arm-targets
cargo doc

# Gather all the above doc jobs together for the purposes of getting an overall pass-fail
docs-all:
runs-on: ubuntu-24.04
needs: [docs, docs-host]
steps:
- run: /bin/true

# Format the workspace
fmt:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup install stable
rustup default stable
- name: Format
run: |
cargo fmt --check

# Format the host tools
fmt-host:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup install stable
rustup default stable
- name: Format
run: |
cd arm-targets
cargo fmt --check

# Gather all the above fmt jobs together for the purposes of getting an overall pass-fail
fmt-all:
runs-on: ubuntu-24.04
needs: [fmt, fmt-host]
steps:
- run: /bin/true

# Run clippy on the workpace
clippy:
runs-on: ubuntu-24.04
strategy:
matrix:
rust: [stable, 1.82]
target:
- armebv7r-none-eabi
- armebv7r-none-eabihf
- armv7r-none-eabi
- armv7r-none-eabihf
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup target add ${{ matrix.target }}
rustup component add clippy
- name: Clippy
run: |
cargo clippy --target ${{ matrix.target }}

# Run clippy on the host tools
clippy-host:
runs-on: ubuntu-24.04
strategy:
matrix:
rust: [stable, 1.82]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add clippy
- name: Clippy
run: |
cd arm-targets
cargo clippy

# Gather all the above clippy jobs together for the purposes of getting an overall pass-fail
clippy-all:
runs-on: ubuntu-24.04
needs: [clippy, clippy-host]
steps:
- run: /bin/true

# Run some programs in QEMU
test:
runs-on: ubuntu-24.04
needs: [build-all]
steps:
- run: sudo apt-get -y update && sudo apt-get -y install qemu-system-arm
- name: Checkout
uses: actions/checkout@v4
- run: ./tests.sh

# Gather all the above xxx-all jobs together for the purposes of getting an overall pass-fail
all:
runs-on: ubuntu-24.04
needs: [docs-all, build-all, fmt-all, test] # not gating on clippy-all
steps:
- run: /bin/true
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
**/*.rs.bk
.#*
/target
target
Cargo.lock
70 changes: 0 additions & 70 deletions .travis.yml

This file was deleted.

17 changes: 10 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[package]
authors = ["Cortex-R team <[email protected]>"]
edition = "2018"
name = "cortex-r"
version = "0.1.0-alpha"

[dependencies]
[workspace]
exclude = [
"arm-targets",
]
members = [
"cortex-r",
"cortex-r-examples",
"cortex-r-rt",
]
resolver = "2"
25 changes: 0 additions & 25 deletions LICENSE-APACHE
Original file line number Diff line number Diff line change
Expand Up @@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading