Skip to content

Commit fa9eacc

Browse files
committed
Add STM32_ETH prefix
1 parent f8432a8 commit fa9eacc

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ The examples use `defmt` and `defmt_rtt` for logging, and `panic_probe` over `de
9494

9595
##### Alternative pin configuration & HSE
9696

97-
If the board you're developing for has a High Speed External oscillator connected to the correct pins, the HSE configuration can be activated by setting the `EXAMPLE_HSE` environment variable to one of `oscillator` or `bypass` when compiling.
97+
If the board you're developing for has a High Speed External oscillator connected to the correct pins, the HSE configuration can be activated by setting the `STM32_ETH_EXAMPLE_HSE` environment variable to one of `oscillator` or `bypass` when compiling.
9898

99-
If the board you're developing for uses the nucleo pinout (PG11 and PG13 instead of PB11 and PB12), the pin configuration can be changed by setting the `EXAMPLE_PINS` environment variable to `nucleo` when compiling.
99+
If the board you're developing for uses the nucleo pinout (PG11 and PG13 instead of PB11 and PB12), the pin configuration can be changed by setting the `STM32_ETH_EXAMPLE_PINS` environment variable to `nucleo` when compiling.
100100

101101
### Building examples
102102
To build an example, run the following command:
@@ -115,7 +115,7 @@ cargo build --release --example ip \
115115
If we wish to build the `arp` example for a Nucleo-F767ZI with a HSE oscillator:
116116

117117
```bash
118-
EXAMPLE_HSE=bypass EXAMPLE_PINS=nucleo \
118+
STM32_ETH_EXAMPLE_HSE=bypass STM32_ETH_EXAMPLE_PINS=nucleo \
119119
cargo build --release --example arp \
120120
--features stm32f767
121121
```
@@ -147,7 +147,7 @@ Or, if we want to run the `arp` example on a Nucleo-F767ZI with a HSE oscillator
147147

148148
```bash
149149
DEFMT_LOG=info PROBE_RUN_CHIP=STM32F767ZGTx \
150-
EXAMPLE_PINS=nucleo EXAMPLE_HSE=oscillator \
150+
STM32_ETH_EXAMPLE_PINS=nucleo STM32_ETH_EXAMPLE_HSE=oscillator \
151151
cargo run --release --example arp \
152152
--features stm32f767 \
153153
--target thumbv7em-none-eabihf

build.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@ fn main() {
22
#[cfg(feature = "stm32f1xx-hal")]
33
println!("cargo:rustc-link-search=memory.x");
44

5-
let hse = std::env::var("EXAMPLE_HSE");
5+
let hse = std::env::var("STM32_ETH_EXAMPLE_HSE");
66

77
if let Ok(hse) = hse {
88
if hse == "bypass" {
99
println!("cargo:rustc-cfg=hse=\"bypass\"")
1010
} else if hse == "oscillator" {
1111
println!("cargo:rustc-cfg=hse=\"oscillator\"");
1212
} else if hse != "off" {
13-
panic!("Invalid EXAMPLE_HSE value. Allowed values: bypass, oscillator, off")
13+
panic!("Invalid STM32_ETH_EXAMPLE_HSE value. Allowed values: bypass, oscillator, off")
1414
}
1515
}
1616

17-
let example_pins = std::env::var("EXAMPLE_PINS");
17+
let example_pins = std::env::var("STM32_ETH_EXAMPLE_PINS");
1818

1919
if let Ok(pins) = example_pins {
2020
if pins == "nucleo" {
2121
println!("cargo:rustc-cfg=pins=\"nucleo\"")
2222
} else if pins != "default" {
23-
panic!("Invalid EXAMPLE_PINS value. Allowed values: nucleo, default");
23+
panic!("Invalid STM32_ETH_EXAMPLE_PINS value. Allowed values: nucleo, default");
2424
}
2525
}
2626

27-
println!("cargo:rerun-if-env-changed=EXAMPLE_HSE");
28-
println!("cargo:rerun-if-env-changed=EXAMPLE_PINS");
27+
println!("cargo:rerun-if-env-changed=STM32_ETH_EXAMPLE_HSE");
28+
println!("cargo:rerun-if-env-changed=STM32_ETH_EXAMPLE_PINS");
2929
}

0 commit comments

Comments
 (0)