Skip to content

Commit baf4c91

Browse files
committed
Added _platformio.ini
1 parent c0828b6 commit baf4c91

File tree

3 files changed

+54
-10
lines changed

3 files changed

+54
-10
lines changed

stm32f405/README.md

+2-9
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,7 @@ https://github.com/stm32duino/Arduino_Core_STM32/blob/main/variants/STM32F4xx/
3333
git clone https://github.com/nopnop2002/Arduino-STM32-CAN
3434
cd Arduino-STM32-CAN/stm32f407
3535
pio init --board genericSTM32F405RG
36-
vi platform.ini
37-
---------------------------------------
38-
[env:genericSTM32F405RG]
39-
platform = ststm32
40-
board = genericSTM32F405RG
41-
framework = arduino
42-
upload_protocol = stlink ---> Add this
43-
---------------------------------------
36+
cp _platformio.ini platformio.ini
4437
cp stm32f407.ino src/
45-
pio run -t upload
38+
pio run -t upload -e genericSTM32F405RG
4639
```

stm32f407/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ https://github.com/stm32duino/Arduino_Core_STM32/blob/main/variants/STM32F4xx/
5555
git clone https://github.com/nopnop2002/Arduino-STM32-CAN
5656
cd Arduino-STM32-CAN/stm32f407
5757
pio init --board genericSTM32F407VET6
58+
cp _platformio.ini platformio.ini
5859
cp stm32f407.ino src/
59-
pio run -t upload
60+
pio run -t upload -e genericSTM32F407VET6
6061
```

stm32f407/_platformio.ini

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
; PlatformIO Project Configuration File
2+
;
3+
; Build options: build flags, source filter
4+
; Upload options: custom upload port, speed and extra flags
5+
; Library options: dependencies, extra library storages
6+
; Advanced options: extra scripting
7+
;
8+
; Please visit documentation for the other options and examples
9+
; https://docs.platformio.org/page/projectconf.html
10+
11+
[env:genericSTM32F405RG]
12+
platform = ststm32
13+
board = genericSTM32F405RG
14+
framework = arduino
15+
upload_protocol = stlink
16+
17+
[env:genericSTM32F405RG_usbcon]
18+
platform = ststm32
19+
board = genericSTM32F405RG
20+
framework = arduino
21+
upload_protocol = stlink
22+
build_flags =
23+
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
24+
-D USBCON
25+
26+
[env:black_f407ve]
27+
platform = ststm32
28+
board = black_f407ve
29+
framework = arduino
30+
31+
[env:black_f407ve_usbcon]
32+
platform = ststm32
33+
board = black_f407ve
34+
framework = arduino
35+
build_flags =
36+
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
37+
-D USBCON
38+
39+
[env:genericSTM32F407VET6]
40+
platform = ststm32
41+
board = genericSTM32F407VET6
42+
framework = arduino
43+
44+
[env:genericSTM32F407VET6_usbcon]
45+
platform = ststm32
46+
board = genericSTM32F407VET6
47+
framework = arduino
48+
build_flags =
49+
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
50+
-D USBCON

0 commit comments

Comments
 (0)