-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplatformio.ini
More file actions
86 lines (81 loc) · 3.52 KB
/
Copy pathplatformio.ini
File metadata and controls
86 lines (81 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
; DefCon 34 Washer/Dryer Badge firmware
;
; ── STM32G031F8 + MXC6655XA (production target) ──────────────────────
; Build: pio run -e stm32g031f8_mxc6655xa
; Flash: pio run -e stm32g031f8_mxc6655xa -t upload
; Factory: pio run -e stm32g031f8_mxc6655xa_factory -t upload
; Demo: pio run -e stm32g031f8_mxc6655xa_demo -t upload
[platformio]
; src_dir points to the Arduino sketch folder so the project also opens
; directly in Arduino IDE without any changes.
src_dir = firmware/defcon34_washer_badge
; ── STM32 shared settings ─────────────────────────────────────────────────────
; Versions are exact so a distributed binary maps to reproducible sources.
; Adafruit NeoPixel is used instead of FastLED because FastLED's STM32
; clockless driver requires the DWT cycle counter, a Cortex-M3+ peripheral
; absent on the Cortex-M0+ STM32C0xx family. NeoPixel uses SysTick (standard
; on all Cortex-M cores) and has a significantly smaller Flash footprint.
; No USB CDC on STM32C0xx — use UART for debug serial.
[env_stm32_base]
platform = ststm32 @ 19.7.0
platform_packages =
platformio/framework-arduinoststm32 @ 4.21200.0
platformio/framework-cmsis @ 2.60300.0
platformio/framework-cmsis-dsp @ 1.16.2
platformio/toolchain-gccarmnoneeabi @ 1.120301.0
framework = arduino
lib_deps =
adafruit/Adafruit NeoPixel @ 1.15.5
build_flags =
-std=gnu++17
-DI2C_TIMEOUT_TICK=50
-DHAL_IWDG_MODULE_ENABLED
monitor_speed = 115200
monitor_port = /dev/tty.usbserial*
; Use the physical NRST line so a completed upload reliably starts the badge.
upload_flags =
-c
reset_config srst_only srst_nogate connect_assert_srst
; ── STM32G031F8 + MXC6655XA — production interactive build ───────────────────
; MCU: STM32G031F8P6, TSSOP-20, 64 KB Flash, 8 KB SRAM, 64 MHz Cortex-M0+
; ldscript ships in the variant — no post-install workaround needed.
; STM32duino support since v2.0.0 (most mature G0 option).
[env:stm32g031f8_mxc6655xa]
extends = env_stm32_base
board = genericSTM32G031F8
board_build.variant = STM32G0xx/G031F(4-6-8)P_G031Y8Y_G041F(6-8)P_G041Y8Y
build_flags =
${env_stm32_base.build_flags}
-DPROFILE_STM32G031_MXC6655XA=1
-DARDUINO_ARCH_STM32
-Os
-flto
build_src_filter = +<*> -<sensors/Lsm6dsoxMotionSensor.cpp>
; ── STM32G031F8 + MXC6655XA — long-timeout demo badge ────────────────────────
; Keeps the selected animation for three hours, then shuts off until activity.
[env:stm32g031f8_mxc6655xa_demo]
extends = env_stm32_base
board = genericSTM32G031F8
board_build.variant = STM32G0xx/G031F(4-6-8)P_G031Y8Y_G041F(6-8)P_G041Y8Y
build_flags =
${env_stm32_base.build_flags}
-DPROFILE_STM32G031_MXC6655XA=1
-DDEMO_BADGE=1
-DARDUINO_ARCH_STM32
-Os
-flto
build_src_filter = +<*> -<sensors/Lsm6dsoxMotionSensor.cpp>
; ── STM32G031F8 + MXC6655XA — factory test build ─────────────────────────────
[env:stm32g031f8_mxc6655xa_factory]
extends = env_stm32_base
board = genericSTM32G031F8
board_build.variant = STM32G0xx/G031F(4-6-8)P_G031Y8Y_G041F(6-8)P_G041Y8Y
build_flags =
${env_stm32_base.build_flags}
-DPROFILE_STM32G031_MXC6655XA=1
-DDEBUG_SERIAL_ENABLED=1
-DFACTORY_TEST=1
-DARDUINO_ARCH_STM32
-Os
-flto
build_src_filter = +<*> -<sensors/Lsm6dsoxMotionSensor.cpp>