Skip to content

Commit babb1f8

Browse files
committed
Add stm327xx-hal benchmark
1 parent e28471d commit babb1f8

Some content is hidden

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

97 files changed

+21330
-0
lines changed

collector/benchmarks/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ ways.
4747
compiler in certain ways.
4848
- **keccak**: A cryptography algorithm. Contains a very high number of locals
4949
and basic blocks.
50+
- **stm32h7xx-hal**: An embedded crate with lots of generated code. Contains
51+
thousands of structs and `impl` blocks that
52+
[stress](https://github.com/rust-lang/rust/issues/78761) intra-doc links.
5053
- **packed-simd**: Portable packed SIMD vectors. Exercises SIMD features
5154
heavily, and uses a compiler plugin.
5255
- **ucd**: A Unicode crate. Contains large statics that
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[target.thumbv7em-none-eabihf]
2+
runner = 'arm-none-eabi-gdb'
3+
rustflags = [
4+
# LLD (shipped with the Rust toolchain) is used as the default linker
5+
"-C", "link-arg=-Tlink.x",
6+
]
7+
8+
[build]
9+
target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
block_labels = ["wip"]
2+
delete_merged_branches = true
3+
status = [
4+
"Rustfmt",
5+
"ci (1.43.0, stm32h743)",
6+
"ci (1.43.0, stm32h753)",
7+
"ci (1.43.0, stm32h743v)",
8+
"ci (1.43.0, stm32h753v)",
9+
"ci (1.43.0, stm32h747cm7)",
10+
"ci (1.43.0, stm32h7b3)",
11+
"ci (1.43.0, stm32h7b0)",
12+
"ci (stable, stm32h743)",
13+
"ci (stable, stm32h753)",
14+
"ci (stable, stm32h743v)",
15+
"ci (stable, stm32h753v)",
16+
"ci (stable, stm32h747cm7)",
17+
"ci (stable, stm32h7b3)",
18+
"ci (stable, stm32h7b0)",
19+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
on:
2+
push:
3+
branches: [ staging, trying, master ]
4+
pull_request:
5+
6+
name: Continuous integration
7+
8+
jobs:
9+
ci:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix: # All permutations of {rust, mcu}
13+
rust:
14+
- 1.43.0 # MSRV
15+
- stable
16+
mcu:
17+
- stm32h743
18+
- stm32h753
19+
- stm32h743v
20+
- stm32h753v
21+
- stm32h747cm7
22+
- stm32h7b3
23+
- stm32h7b0
24+
env: # Peripheral Feature flags
25+
FLAGS: rt,quadspi,sdmmc,fmc,usb_hs,rtc,ethernet
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Cache cargo registry and index
30+
uses: actions/cache@v2
31+
with:
32+
path: |
33+
~/.cargo/registry
34+
~/.cargo/git
35+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
36+
- name: Cache cargo build
37+
uses: actions/cache@v2
38+
with:
39+
path: target
40+
key: ${{ runner.os }}-target-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}-memory-${{ hashFiles('**/memory.x') }}
41+
- uses: actions-rs/toolchain@v1
42+
with:
43+
profile: minimal
44+
toolchain: ${{ matrix.rust }}
45+
target: thumbv7em-none-eabihf
46+
override: true
47+
- uses: actions-rs/cargo@v1
48+
with:
49+
use-cross: true
50+
command: build
51+
args: --verbose --release --examples --target thumbv7em-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }}
52+
- uses: actions-rs/cargo@v1
53+
with:
54+
command: test
55+
args: --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ env.FLAGS }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
on:
2+
push:
3+
branches: [ staging, trying, master ]
4+
pull_request:
5+
6+
name: Clippy
7+
8+
jobs:
9+
clippy_check:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions-rs/toolchain@v1
14+
with:
15+
components: clippy
16+
toolchain: stable
17+
target: thumbv7em-none-eabihf
18+
override: true
19+
- uses: actions-rs/clippy-check@v1
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
args: --examples --target thumbv7em-none-eabihf --features=rt,stm32h743v
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
on:
2+
push:
3+
branches: [ master ] # Do not run on staging / trying
4+
pull_request:
5+
6+
# Checks the crate compiles on nightly rust, and that the logging options for the
7+
# examples compile on nightly
8+
name: Nightly rust examples
9+
10+
jobs:
11+
ci:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
mcu:
16+
- stm32h743v
17+
logging: # Example logging options
18+
- log-itm
19+
- log-semihost
20+
- log-rtt
21+
env: # Peripheral Feature flags
22+
FLAGS: rt,quadspi,sdmmc,fmc,usb_hs,rtc,ethernet
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Cache cargo registry and index
27+
uses: actions/cache@v2
28+
with:
29+
path: |
30+
~/.cargo/registry
31+
~/.cargo/git
32+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
33+
- name: Cache cargo build
34+
uses: actions/cache@v2
35+
with:
36+
path: target
37+
key: ${{ runner.os }}-target-nightly-${{ hashFiles('**/Cargo.toml') }}-memory-${{ hashFiles('**/memory.x') }}
38+
- uses: actions-rs/toolchain@v1
39+
with:
40+
profile: minimal
41+
toolchain: nightly
42+
target: thumbv7em-none-eabihf
43+
override: true
44+
- uses: actions-rs/cargo@v1
45+
with:
46+
use-cross: true
47+
command: build
48+
args: --verbose --release --examples --target thumbv7em-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }},${{ matrix.logging }}
49+
- uses: actions-rs/cargo@v1
50+
with:
51+
command: test
52+
args: --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ env.FLAGS }}
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+
- run: rustup component add rustfmt
20+
- uses: actions-rs/cargo@v1
21+
with:
22+
command: fmt
23+
args: --all -- --check
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/target
2+
**/*.rs.bk
3+
Cargo.lock
4+
*.hex
5+
*.bin
6+
.gdb_history
7+
Embed.toml
8+
**/*.vscode
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Changelog
2+
3+
## [Unreleased]
4+
5+
## [v0.8.0] 2020-10-26
6+
7+
* **Breaking**: Ethernet PHY configuration feature flags removed. The user must
8+
now instantiate an instance of the PHY type in order to configure the PHY.
9+
* pac: Upgrade to stm32-rs v0.12.0
10+
* devices: Add support for 7B3, 7B0, 7A3
11+
* Add USB support
12+
* Add I2S support
13+
* Add RTC support
14+
* Add LPTIM support
15+
* Add DMA support, but the current API is depreciated and will be replaced
16+
* timer: add tick_timer and set_tick_freq to configure the timer's counter frequency [#144](https://github.com/stm32-rs/stm32h7xx-hal/pull/144)
17+
* Add RTC support [#143](https://github.com/stm32-rs/stm32h7xx-hal/pull/143)
18+
* pwr: add PowerConfiguration to ensure VoltageScale isn't modified from pwr.freeze() to rcc.freeze() [#141](https://github.com/stm32-rs/stm32h7xx-hal/pull/141)
19+
* impl Copy, Clone, PartialEq for enums [#139](https://github.com/stm32-rs/stm32h7xx-hal/pull/139)
20+
* ethernet: automatically configure MDC clock based on hclk
21+
* time: add types for microseconds and nanoseconds
22+
* rec: add `low_power` methods for configuring peripherals
23+
24+
## [v0.7.1] 2020-09-04
25+
26+
* Update docs
27+
28+
## [v0.7.0] 2020-09-03
29+
30+
* **Breaking**: Fix PWM pin types. See #110
31+
* Add QSPI support
32+
* Add SDMMC support
33+
* Add Ethernet support
34+
* Add FMC support
35+
* spi: add new configuration options
36+
* i2c: fix i2c bus clock frequency calculation
37+
* i2c: extend write duration until transaction finishes
38+
* timer: Fix timer first cycle invalid #72
39+
* timer: Add set_timeout method
40+
* adc: add method to initialise ADC1 and ADC2 together, see examples
41+
* Added method to switch to VOS0 (480MHz)
42+
* Allow external HSE clock input (bypass mode)
43+
* Use ACLK (AXI clock) frequency for calculating flash waitstates
44+
* pll: Add fractional strategies
45+
* pll: fix very subtle error in PLL Q,R frequencies
46+
* serial: rename usart method to serial, will be depreciated in future
47+
* examples: Added logging framework
48+
* MSRV increased to 1.43.0
49+
50+
## [v0.6.0] 2020-06-25
51+
52+
* **Breaking:** Peripheral driver constructors now consume a peripheralREC
53+
singleton. Previously they inconsistently took `&mut` or `&` references
54+
to the CCDR struct itself. See the examples for the new constructors
55+
* **Breaking:** Erase pins from peripheral driver types. `free()` method return
56+
types may have changed.
57+
* Expose `new_unchecked` methods for instantiating peripheral drivers without
58+
providing pins
59+
* Improved top-level docs
60+
* Add DAC peripheral driver
61+
* Added MCO pins
62+
* Add `.free()` method for ADC
63+
* MSRV increased to 1.41.0
64+
* rtfm crate was renamed to rtic
65+
* Added alternate flash size definitions to memory.x
66+
* Bump dependency versions: cortex-m, cortex-m-rt, cast, paste, bare-metal
67+
68+
## [v0.5.0] 2020-04-27
69+
70+
* pac: Upgrade to stm32-rs v0.11.0
71+
* pwr: Remove need for unsafe, add documentation describing Run* mode
72+
* rcc: Add a safe interface for the user and other crates to access the RCC
73+
* spi: 16-bit word support
74+
* i2c: Remove reference to I2C1 in macro generic for all I2Cs
75+
* Add HAL for Serial Audio Interface, PDM mode
76+
* Implement default blocking write for serial
77+
78+
## [v0.4.0] 2020-03-20
79+
80+
* pac: Upgrade to stm32-rs v0.10.0
81+
* rcc: Add iterative PLL configuration strategy
82+
* rcc: Improve documentation
83+
* pwr: configure core supply on parts with SMPS (dual core). Prevents
84+
lock-up without unsafe for certain hardware configurations
85+
* i2c: wait for end of previous address phase before setting START
86+
* i2c: return immediately when TXIS / RXNE is set
87+
* timers: implement TIM3/4/5/6/7/8/12/13/14/15/16/17
88+
* gpio: fix error in PF7 definition
89+
* add MSRV 1.39.0
90+
91+
## [v0.3.0] 2019-12-27
92+
93+
* timer: add method to clear interrupt flag
94+
* gpio: initialise gpio in the correct typestate
95+
* i2c: flush the TXDR register when a NACK condition occurs
96+
* Fix `clear_interrupt_pending_bit()`
97+
* i2c: detect not-acknowledge error, clear errors when detected
98+
* Run CI against stable since Rust 1.37.0
99+
* Upgrade to stm32-rs v0.9.0 (including svd2rust v0.16)
100+
* Started Changelog
101+
102+
[Unreleased]: https://github.com/stm32-rs/stm32h7xx-hal/compare/v0.8.0...HEAD
103+
[v0.8.0]: https://github.com/stm32-rs/stm32h7xx-hal/compare/v0.7.1...v0.8.0
104+
[v0.7.1]: https://github.com/stm32-rs/stm32h7xx-hal/compare/v0.7.0...v0.7.1
105+
[v0.7.0]: https://github.com/stm32-rs/stm32h7xx-hal/compare/v0.6.0...v0.7.0
106+
[v0.6.0]: https://github.com/stm32-rs/stm32h7xx-hal/compare/v0.5.0...v0.6.0
107+
[v0.5.0]: https://github.com/stm32-rs/stm32h7xx-hal/compare/v0.4.0...v0.5.0
108+
[v0.4.0]: https://github.com/stm32-rs/stm32h7xx-hal/compare/v0.3.0...v0.4.0
109+
[v0.3.0]: https://github.com/stm32-rs/stm32h7xx-hal/compare/v0.2.1...v0.3.0

0 commit comments

Comments
 (0)