File tree Expand file tree Collapse file tree 9 files changed +48
-97
lines changed Expand file tree Collapse file tree 9 files changed +48
-97
lines changed Original file line number Diff line number Diff line change 1
1
on :
2
2
push :
3
- branches : [ staging, trying, master ]
3
+ branches : [ master ]
4
4
pull_request :
5
5
6
6
name : Continuous integration
@@ -22,31 +22,22 @@ jobs:
22
22
FLAGS : rt
23
23
24
24
steps :
25
- - uses : actions/checkout@v2
25
+ - uses : actions/checkout@v4
26
26
- name : Cache cargo registry and index
27
- uses : actions/cache@v2
27
+ uses : actions/cache@v4
28
28
with :
29
29
path : |
30
30
~/.cargo/registry
31
31
~/.cargo/git
32
32
key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
33
33
- name : Cache cargo build
34
- uses : actions/cache@v2
34
+ uses : actions/cache@v4
35
35
with :
36
36
path : target
37
37
key : ${{ runner.os }}-target-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}-memory-${{ hashFiles('**/*.x') }}
38
- - uses : actions-rs/toolchain@v1
39
- with :
40
- profile : minimal
41
- toolchain : ${{ matrix.rust }}
42
- target : thumbv8m.main-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 thumbv8m.main-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }}
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 }}
38
+ - name : Install thumbv8m rust target
39
+ run : rustup target add thumbv8m.main-none-eabihf
40
+ - name : Build
41
+ run : cargo build --verbose --release --examples --target thumbv8m.main-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }}
42
+ - name : Test
43
+ run : cargo test --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ env.FLAGS }}
Original file line number Diff line number Diff line change 1
1
on :
2
2
pull_request :
3
3
push :
4
- branches : [staging, trying, master]
4
+ branches : [master]
5
5
6
6
name : Clippy
7
7
8
8
jobs :
9
9
clippy_check :
10
10
runs-on : ubuntu-latest
11
11
steps :
12
- - uses : actions/checkout@v2
13
- - uses : actions-rs/toolchain@v1
14
- with :
15
- components : clippy
16
- toolchain : 1.69.0
17
- target : thumbv8m.main-none-eabihf
18
- override : true
19
- - uses : actions-rs/clippy-check@v1
20
- with :
21
- token : ${{ secrets.GITHUB_TOKEN }}
22
- args : --examples --target thumbv8m.main-none-eabihf --features=rt,stm32h503 -- -D warnings
12
+ - uses : actions/checkout@v4
13
+ - name : Install thumb8 rust target
14
+ run : rustup target add thumbv8m.main-none-eabihf
15
+ - name : Cargo clippy
16
+ run : cargo clippy --examples --target thumbv8m.main-none-eabihf --features=rt,stm32h503 -- -D warnings
Original file line number Diff line number Diff line change 14
14
matrix :
15
15
mcu :
16
16
- stm32h503
17
- - stm32h562
18
- - stm32h563
19
- - stm32h573
20
17
logging : # Example logging options
21
18
- log-itm
22
19
- log-semihost
@@ -25,31 +22,24 @@ jobs:
25
22
FLAGS : rt
26
23
27
24
steps :
28
- - uses : actions/checkout@v2
25
+ - uses : actions/checkout@v4
29
26
- name : Cache cargo registry and index
30
- uses : actions/cache@v2
27
+ uses : actions/cache@v4
31
28
with :
32
29
path : |
33
30
~/.cargo/registry
34
31
~/.cargo/git
35
32
key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
36
33
- name : Cache cargo build
37
- uses : actions/cache@v2
34
+ uses : actions/cache@v4
38
35
with :
39
36
path : target
40
37
key : ${{ runner.os }}-target-nightly-${{ hashFiles('**/Cargo.toml') }}-memory-${{ hashFiles('**/*.x') }}
41
- - uses : actions-rs/toolchain@v1
42
- with :
43
- profile : minimal
44
- toolchain : nightly
45
- target : thumbv8m.main-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 thumbv8m.main-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }},${{ matrix.logging }}
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 }}
38
+ - name : Install nightly toolchain
39
+ run : rustup toolchain install nightly
40
+ - name : Install thumbv8m rust target
41
+ run : rustup +nightly target add thumbv8m.main-none-eabihf
42
+ - name : Build
43
+ run : cargo +nightly build --verbose --release --examples --target thumbv8m.main-none-eabihf --features ${{ matrix.mcu }},${{ env.FLAGS }},${{ matrix.logging }}
44
+ - name : Test
45
+ run : cargo +nightly test --lib --target x86_64-unknown-linux-gnu --features ${{ matrix.mcu }},${{ env.FLAGS }}
Original file line number Diff line number Diff line change 1
1
on :
2
2
push :
3
- branches : [ staging, trying, master ]
3
+ branches : [ master ]
4
4
pull_request :
5
5
6
- name : Code formatting check
6
+ name : rustfmt
7
7
8
8
jobs :
9
9
fmt :
10
10
name : Rustfmt
11
11
runs-on : ubuntu-latest
12
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
13
+ - uses : actions/checkout@v4
14
+ - name : Check formatting
15
+ run : cargo fmt --all -- --check
Original file line number Diff line number Diff line change 1
1
on :
2
2
push :
3
- branches : [ staging, trying, master ]
3
+ branches : [ master ]
4
4
pull_request :
5
5
6
6
name : Verify rustc versions match
10
10
name : Rustc version match
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - uses : actions/checkout@v2
14
- - uses : actions/setup-node@v3
13
+ - uses : actions/checkout@v4
14
+ - uses : actions/setup-node@v4
15
15
- run : node tools/verify-rust-version.js
Original file line number Diff line number Diff line change @@ -10,23 +10,22 @@ use stm32h5xx_hal::pac;
10
10
fn main ( ) -> ! {
11
11
utilities:: logger:: init ( ) ;
12
12
13
- let cp = cortex_m:: Peripherals :: take ( ) . unwrap ( ) ;
14
13
let dp = pac:: Peripherals :: take ( ) . unwrap ( ) ;
15
14
16
15
// TODO: Power/clock config is required before blinky can... blink.
17
16
18
- dp. GPIOA . moder . write ( |w| w. mode5 ( ) . variant ( 1 ) ) ; // output
19
- dp. GPIOA . pupdr . write ( |w| w. pupd5 ( ) . variant ( 1 ) ) ; // pull-up
17
+ dp. GPIOA . moder ( ) . write ( |w| w. mode5 ( ) . output ( ) ) ; // output
18
+ dp. GPIOA . pupdr ( ) . write ( |w| w. pupd5 ( ) . pull_up ( ) ) ; // pull-up
20
19
21
20
// dp.GPIOA.odr.write(|w| w.od5().set_bit());
22
21
23
22
loop {
24
- dp. GPIOA . odr . write ( |w| w. od5 ( ) . clear_bit ( ) ) ;
25
- for _ in 0 ..1_000_0 {
23
+ dp. GPIOA . odr ( ) . write ( |w| w. od5 ( ) . low ( ) ) ;
24
+ for _ in 0 ..10_000 {
26
25
cortex_m:: asm:: nop ( ) ;
27
26
}
28
- dp. GPIOA . odr . write ( |w| w. od5 ( ) . set_bit ( ) ) ;
29
- for _ in 0 ..1_000_0 {
27
+ dp. GPIOA . odr ( ) . write ( |w| w. od5 ( ) . high ( ) ) ;
28
+ for _ in 0 ..10_000 {
30
29
cortex_m:: asm:: nop ( ) ;
31
30
}
32
31
}
Original file line number Diff line number Diff line change 1
1
//! Utilities for examples
2
2
3
3
pub mod logger;
4
- #[ macro_use]
5
- mod power;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ compile_error!("Cannot not select both rm0492 and rm0481");
18
18
#[ cfg( feature = "stm32h503" ) ]
19
19
pub use stm32h5:: stm32h503 as stm32;
20
20
21
- #[ cfg( any(
22
- feature = "stm32h562" ,
23
- feature = "stm32h563" ,
24
- feature = "stm32h573" ,
25
- ) ) ]
21
+ #[ cfg( feature = "stm32h562" ) ]
22
+ pub use stm32h5:: stm32h562 as stm32;
23
+
24
+ #[ cfg( feature = "stm32h563" ) ]
25
+ pub use stm32h5:: stm32h563 as stm32;
26
+
27
+ #[ cfg( feature = "stm32h573" ) ]
26
28
pub use stm32h5:: stm32h573 as stm32;
27
29
28
30
#[ cfg( feature = "device-selected" ) ]
You can’t perform that action at this time.
0 commit comments