|
1 | 1 | /*!
|
2 |
| - # Selecting the right chip |
| 2 | + # Selecting the right chip |
| 3 | +
|
| 4 | + This crate requires you to specify your target chip as a feature. |
| 5 | +
|
| 6 | + Please select one of the following |
| 7 | +
|
| 8 | + (Note: `x` denotes any character in [a-z]) |
| 9 | + * stm32f301xb |
| 10 | + * stm32f301xc |
| 11 | + * stm32f301xd |
| 12 | + * stm32f301xe |
| 13 | + * stm32f318 |
| 14 | + * stm32f302 |
| 15 | + * stm32f303xb |
| 16 | + * stm32f303xc |
| 17 | + * stm32f303xd |
| 18 | + * stm32f303xe |
| 19 | + * stm32f303x6 |
| 20 | + * stm32f303x8 |
| 21 | + * stm32f373 |
| 22 | + * stm32f378 |
| 23 | + * stm32f334 |
| 24 | + * stm32f328 |
| 25 | + * stm32f358 |
| 26 | + * stm32f398 |
| 27 | +
|
| 28 | + Example: The STM32F3Discovery board has a STM32F303VCT6 chip. |
| 29 | + So you want to expand your call to `cargo` with `--features stm32f303xc`. |
| 30 | +
|
| 31 | + For more information, see the [README](https://github.com/stm32-rs/stm32f3xx-hal/blob/master/README.md#selecting-the-right-chip) |
| 32 | +*/ |
| 33 | +#![no_std] |
| 34 | +#![allow(non_camel_case_types)] |
3 | 35 |
|
4 |
| - This crate requires you to specify your target chip as a feature. |
| 36 | +#[cfg(all(not(feature = "device-selected"), not(feature = "needs-subvariant")))] |
| 37 | +compile_error!( |
| 38 | + "This crate requires you to specify your target chip as a feature. |
5 | 39 |
|
6 | 40 | Please select one of the following
|
7 | 41 |
|
|
28 | 62 | Example: The STM32F3Discovery board has a STM32F303VCT6 chip.
|
29 | 63 | So you want to expand your call to `cargo` with `--features stm32f303xc`.
|
30 | 64 |
|
31 |
| - For more information, see the [README](https://github.com/stm32-rs/stm32f3xx-hal/blob/master/README.md#selecting-the-right-chip) |
32 |
| - */ |
33 |
| -#![no_std] |
34 |
| -#![allow(non_camel_case_types)] |
| 65 | + For more information, see README -> Selecting the right chip. |
| 66 | + " |
| 67 | +); |
35 | 68 |
|
36 |
| -#[cfg(all(not(feature = "device-selected"), not(feature = "needs-subvariant")))] |
| 69 | +#[cfg(all(not(feature = "device-selected"), feature = "stm32f301"))] |
37 | 70 | compile_error!(
|
38 |
| - "This crate requires you to specify your target chip as a feature. |
| 71 | + "This crate requires you to specify the subvariant of your chip. |
39 | 72 |
|
40 |
| - Please select one of the following |
| 73 | + You probably see this error because you updated the stm32f3xxx-hal and are still using |
| 74 | + `--features stm32f301`. |
| 75 | + Don't worry, you probably don't neet to change your code. |
41 | 76 |
|
| 77 | + Please check your datasheet and change `stm32f301` to one of those subvariants: |
42 | 78 | (Note: `x` denotes any character in [a-z])
|
43 | 79 | * stm32f301xb
|
44 | 80 | * stm32f301xc
|
45 | 81 | * stm32f301xd
|
46 | 82 | * stm32f301xe
|
47 |
| - * stm32f318 |
48 |
| - * stm32f302 |
49 |
| - * stm32f303xb |
50 |
| - * stm32f303xc |
51 |
| - * stm32f303xd |
52 |
| - * stm32f303xe |
53 |
| - * stm32f303x6 |
54 |
| - * stm32f303x8 |
55 |
| - * stm32f373 |
56 |
| - * stm32f378 |
57 |
| - * stm32f334 |
58 |
| - * stm32f328 |
59 |
| - * stm32f358 |
60 |
| - * stm32f398 |
61 | 83 |
|
62 |
| - Example: The STM32F3Discovery board has a STM32F303VCT6 chip. |
63 |
| - So you want to expand your call to `cargo` with `--features stm32f303xc`. |
| 84 | + For more information, see README -> Selecting the right chip. |
64 | 85 |
|
65 |
| - For more information, see README -> Selecting the right feature gate. |
66 |
| - " |
| 86 | + Also check the CHANGELOG for awesome new features for your chip that were made possible by |
| 87 | + forcing you to specify the subvariant. |
| 88 | +" |
67 | 89 | );
|
68 | 90 |
|
69 |
| -#[cfg(all(not(feature = "device-selected"), feature = "needs-subvariant"))] |
| 91 | +#[cfg(all(not(feature = "device-selected"), feature = "stm32f303"))] |
70 | 92 | compile_error!(
|
71 | 93 | "This crate requires you to specify the subvariant of your chip.
|
72 | 94 |
|
73 |
| - Please select one of the following |
| 95 | + You probably see this error because you updated the stm32f3xxx-hal and are still using |
| 96 | + `--features stm32f303`. |
| 97 | + Don't worry, you probably don't neet to change your code. |
74 | 98 |
|
| 99 | + Please check your datasheet and change your `stm32f303` to one of those subvariants: |
75 | 100 | (Note: `x` denotes any character in [a-z])
|
76 |
| - * stm32f301xb |
77 |
| - * stm32f301xc |
78 |
| - * stm32f301xd |
79 |
| - * stm32f301xe |
80 |
| - * stm32f318 |
81 |
| - * stm32f302 |
82 | 101 | * stm32f303xb
|
83 | 102 | * stm32f303xc
|
84 | 103 | * stm32f303xd
|
85 | 104 | * stm32f303xe
|
86 | 105 | * stm32f303x6
|
87 | 106 | * stm32f303x8
|
88 |
| - * stm32f373 |
89 |
| - * stm32f378 |
90 |
| - * stm32f334 |
91 |
| - * stm32f328 |
92 |
| - * stm32f358 |
93 |
| - * stm32f398 |
| 107 | + |
| 108 | + For more information, see README -> Selecting the right chip. |
| 109 | +
|
| 110 | + Also check the CHANGELOG for awesome new features for your chip that were made possible by |
| 111 | + forcing you to specify the subvariant. |
| 112 | +" |
| 113 | +); |
| 114 | +#[cfg(all( |
| 115 | + not(feature = "device-selected"), |
| 116 | + feature = "needs-subvariant", |
| 117 | + not(any(feature = "stm32f303", feature = "stm32f301")) |
| 118 | +))] |
| 119 | +compile_error!( |
| 120 | + "This crate requires you to specify the subvariant of your chip. |
94 | 121 |
|
95 |
| - You probably see this error because you updated the stm32f3xxx-hal. |
96 |
| - Don't worry, you don't neet to change your code. |
| 122 | + However this compile error should also tell you which subvariants to pick from. |
| 123 | + As this is not the case, please |
97 | 124 |
|
98 |
| - Example: The STM32F3Discovery board has a STM32F303VCT6 chip. |
99 |
| - You only specified `--features stm32f303` and got this error. |
100 |
| - Expand it to `--features stm32f303xc` (note the `xc` at the end) |
101 |
| - to get all the functionality of your board. |
| 125 | + File an issue at |
| 126 | + https://github.com/stm32-rs/stm32f3xx-hal/issues/new |
| 127 | + including your call to `cargo` and the version of stm32f3xxx-hal you want to use. |
102 | 128 |
|
103 |
| - For more information, see README -> Selecting the right feature gate. |
| 129 | + You may also |
| 130 | + * See README -> Selecting the right chip. |
| 131 | + * Check the CHANGELOG for awesome new features for your chip that were made possible by |
| 132 | + forcing you to specify the subvariant. |
104 | 133 | "
|
105 | 134 | );
|
106 | 135 |
|
|
0 commit comments