File tree Expand file tree Collapse file tree 3 files changed +32
-16
lines changed Expand file tree Collapse file tree 3 files changed +32
-16
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
62
62
- The ` embedded-hal ` Read implementation of ` Serial ` does now return ` WoudBlock `
63
63
if the peripheral is busy. Also if an ` Overrun ` occured the receive data
64
64
register (RDR) is flushed to have a more consistent API. ([ #253 ] )
65
+ - Remove ` cargo-metadata ` as a build dependency to cut down dependencies and
66
+ the reliance on ` resolver = "2" ` . ([ #270 ] )
65
67
66
68
### Fixed
67
69
@@ -438,6 +440,7 @@ let clocks = rcc
438
440
[ defmt ] : https://github.com/knurling-rs/defmt
439
441
[ filter ] : https://defmt.ferrous-systems.com/filtering.html
440
442
443
+ [ #270 ] : https://github.com/stm32-rs/stm32f3xx-hal/pull/270
441
444
[ #266 ] : https://github.com/stm32-rs/stm32f3xx-hal/pull/266
442
445
[ #265 ] : https://github.com/stm32-rs/stm32f3xx-hal/pull/265
443
446
[ #264 ] : https://github.com/stm32-rs/stm32f3xx-hal/pull/264
Original file line number Diff line number Diff line change @@ -65,7 +65,6 @@ panic-rtt-target = { version = "0.1", features = ["cortex-m"] }
65
65
rtt-target = { version = " 0.3.0" , features = [" cortex-m" ] }
66
66
67
67
[build-dependencies ]
68
- cargo_metadata = " 0.13.1"
69
68
slice-group-by = " 0.2.6"
70
69
71
70
[features ]
Original file line number Diff line number Diff line change @@ -4,12 +4,39 @@ use std::fs::File;
4
4
use std:: io:: prelude:: * ;
5
5
use std:: path:: PathBuf ;
6
6
7
- use cargo_metadata:: MetadataCommand ;
8
7
// TODO(Sh3Rm4n - 2021-04-28):
9
8
// Remove when [feature="slice_group_by"] is stable.
10
9
// See with https://github.com/rust-lang/rust/issues/80552.
11
10
use slice_group_by:: GroupBy ;
12
11
12
+ const DEVICE_VARIANTS : [ & str ; 25 ] = [
13
+ "stm32f301x6" ,
14
+ "stm32f301x8" ,
15
+ "stm32f318x8" ,
16
+ "stm32f302x6" ,
17
+ "stm32f302x8" ,
18
+ "stm32f302xb" ,
19
+ "stm32f302xc" ,
20
+ "stm32f302xd" ,
21
+ "stm32f302xe" ,
22
+ "stm32f303x6" ,
23
+ "stm32f303x8" ,
24
+ "stm32f303xb" ,
25
+ "stm32f303xc" ,
26
+ "stm32f303xd" ,
27
+ "stm32f303xe" ,
28
+ "stm32f328x8" ,
29
+ "stm32f358xc" ,
30
+ "stm32f398xe" ,
31
+ "stm32f373x8" ,
32
+ "stm32f373xb" ,
33
+ "stm32f373xc" ,
34
+ "stm32f378xc" ,
35
+ "stm32f334x4" ,
36
+ "stm32f334x6" ,
37
+ "stm32f334x8" ,
38
+ ] ;
39
+
13
40
fn main ( ) {
14
41
check_device_feature ( ) ;
15
42
if cfg ! ( feature = "ld" ) {
@@ -36,20 +63,7 @@ fn check_device_feature() {
36
63
std:: process:: exit ( 1 ) ;
37
64
}
38
65
39
- // get all device variants from the metadata
40
- let metadata = MetadataCommand :: new ( ) . exec ( ) . unwrap ( ) ;
41
- let device_variants: HashSet < String > = metadata
42
- . root_package ( )
43
- . unwrap ( )
44
- . features
45
- . iter ( )
46
- . filter_map ( |( feature, dependent_features) | {
47
- dependent_features
48
- . iter ( )
49
- . any ( |dependent_feature| dependent_feature == "device-selected" )
50
- . then ( || feature. clone ( ) )
51
- } )
52
- . collect ( ) ;
66
+ let device_variants: HashSet < String > = DEVICE_VARIANTS . iter ( ) . map ( |s| s. to_string ( ) ) . collect ( ) ;
53
67
54
68
// get all selected features via env variables
55
69
let selected_features: HashSet < String > = env:: vars ( )
You can’t perform that action at this time.
0 commit comments