-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplatformio.ini
More file actions
139 lines (129 loc) · 7.15 KB
/
Copy pathplatformio.ini
File metadata and controls
139 lines (129 loc) · 7.15 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:jumperless_v5]
; Pinned to a specific maxgerhardt platform commit (v1.19.0) so local builds and
; CI use the EXACT same arduino-pico core. The platform pins the core internally
; (this commit -> earlephilhower/arduino-pico 5.x). Leaving it unpinned lets the
; platform's floating `develop` HEAD drift, which is what caused local (old core,
; __isFreeRTOS present) and CI (new core, __isFreeRTOS removed) to disagree.
; Bump this hash deliberately when you want to move to a newer core.
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#4e22a0dcdd94eead72fdf56ea59a3d7c8aa2f379
framework = arduino
board_build.core = earlephilhower
board_build.filesystem_size = 4m
build_type = debug
; --- Hardware debugging (Raspberry Pi Debug Probe / CMSIS-DAP) ---
; These live on the base env so that PlatformIO's auto-generated "PIO Debug"
; launch config (which targets env:jumperless_v5) works with F5 out of the box.
; Wiring: Probe "D" header -> Jumperless V5 SWD pads:
; SWCLK -> SWCLK, SWDIO -> SWDIO, GND -> GND. (Power the V5 over its own USB.)
; 5 MHz is unreliable over jumper wires; 2 MHz reads the RP2350 IDR cleanly.
; If you still see "cannot read IDR", drop debug_speed to 1000 and check GND.
debug_tool = cmsis-dap
debug_speed = 2000
; debug_init_break = tbreak setup
extra_scripts =
pre:scripts/lock_fs_partition.py
pre:scripts/version_from_file.py
pre:scripts/patch_windows_libs.py
; board_build.f_flash = 150000000L ; Flash clock 150MHz for faster access
; lib_ldf_mode = deep+
upload_port = /dev/cu.usbmodemJLV5port1
monitor_port = /dev/cu.usbmodemJLV5port1
;upload_port = /dev/cu.usbmodem101
board_upload.psram_length = 8388608
build_flags = -Iinclude/
-Ilib/
-Imodules/jumperless/
-Iinclude/
-Ilib/JDI_MIP_Display/
-Ilib/micropython/micropython_embed/
-DUSE_TINYUSB
-DCFG_TUSB_CONFIG_FILE=\"custom_tusb_config.h\"
-DCFG_TUD_DESC_AUTO=0
-DPICO_DEFAULT_UART_TX_PIN=0
-DPICO_DEFAULT_UART_RX_PIN=1
-DPICO_ARM=1
-DRP2350_PSRAM_CS=19
-Wl,--wrap,tud_descriptor_device_cb
-Wl,--wrap,tud_descriptor_configuration_cb
-Wl,--wrap,tud_descriptor_string_cb
-Wl,--wrap,tud_msc_inquiry_cb
-Wl,--wrap,tud_msc_test_unit_ready_cb
-Wl,--wrap,tud_msc_capacity_cb
-Wl,--wrap,tud_msc_start_stop_cb
-Wl,--wrap,tud_msc_read10_cb
-Wl,--wrap,tud_msc_write10_cb
-Wl,--wrap,tud_msc_scsi_cb
-Wl,--wrap,tud_msc_is_writable_cb
-Wl,--wrap,tud_cdc_n_connected
-Wl,--allow-multiple-definition
-Wl,--whole-archive
-Wl,--no-whole-archive
-fvisibility=default
-lm
build_src_filter = +<*> +<../lib/micropython/port/> +<../modules/jumperless/> +<../lib/micropython/micropython_embed/shared/readline/*.c> -<../lib/micropython/micropython_embed/py/> -<../lib/micropython/micropython_embed/extmod/> +<../lib/micropython/micropython_embed/extmod/machine_bitstream.c> +<../lib/micropython/micropython_embed/extmod/machine_adc.c> +<../lib/micropython/micropython_embed/extmod/machine_pwm.c> +<../lib/micropython/micropython_embed/extmod/machine_wdt.c> +<../lib/micropython/micropython_embed/extmod/machine_i2c.c> +<../lib/micropython/micropython_embed/extmod/machine_spi.c> +<../lib/micropython/micropython_embed/extmod/modselect.c> +<../lib/micropython/micropython_embed/extmod/modasyncio.c> +<../lib/micropython/micropython_embed/extmod/moddeflate.c> +<../lib/micropython/micropython_embed/extmod/modframebuf.c> +<../lib/micropython/micropython_embed/extmod/modonewire.c> +<../lib/micropython/micropython_embed/extmod/modjson.c> +<../lib/micropython/micropython_embed/extmod/modre.c> +<../lib/micropython/micropython_embed/extmod/modhashlib.c> +<../lib/micropython/micropython_embed/extmod/modrandom.c> +<../lib/micropython/micropython_embed/extmod/modheapq.c> +<../lib/micropython/micropython_embed/drivers/bus/*.c> -<../lib/micropython/micropython_embed/shared/runtime/> +<../lib/micropython/micropython_embed/shared/timeutils/*.c> -<../lib/micropython/micropython_embed/genhdr/> -<../lib/micropython/micropython_embed/port/> +<../lib/micropython/micropython_embed/port/micropython_embed.c> -<**/Adafruit_USBD_MSC.cpp> -<**/FatFSUSB.cpp> +<../lib/micropython/micropython_embed/shared/runtime/gchelper_generic.c> +<../lib/micropython/micropython_embed/shared/runtime/sys_stdio_mphal.c> +<../lib/micropython/micropython_embed/shared/runtime/mpirq.c>
; arduino-pico 5.x bundles Adafruit_TinyUSB_Arduino in the core itself (pulled in
; by -DUSE_TINYUSB). It is removed from lib_deps below so a second copy of the
; TinyUSB headers isn't placed on the include path (which caused "redefinition"
; errors). Do NOT lib_ignore it by name: the bundled copy shares the same library
; name, so ignoring it would remove TinyUSB entirely and break Wire/SPI.
lib_ignore = FatFSUSB, FatFS
lib_deps =
bblanchon/ArduinoJson
robtillaart/INA219
adafruit/Adafruit SSD1306
adafruit/Adafruit GFX Library
adafruit/Adafruit MCP4728
adafruit/Adafruit SPIFlash
adafruit/SdFat - Adafruit Fork
tobozo/YAMLDuino@^1.5.0
jostlowe/Pico-DMX@^3.0.1
powerbroker2/SafeString
board = jumperless_v5
; Same firmware as [env:jumperless_v5], but flashes OVER the SWD probe
; instead of UF2/BOOTSEL. Use this env's "Upload" when you want the probe to
; load the binary (e.g. `pio run -e jumperless_v5_debug -t upload`).
; Plain debugging (F5) does NOT need this env -- it uses the base env above.
[env:jumperless_v5_debug]
extends = env:jumperless_v5
upload_protocol = cmsis-dap
; Full DWARF for SWD fault capture (PC/LR/CFSR/HFSR/BFAR). To isolate the
; EEPROM.commit() fault: flash this env over the probe, `pio debug`, trigger a
; DAC calibration save, and on a drop inspect both cores + the fault registers.
; NOTE: -O0 gives the cleanest stepping but materially changes flash/USB timing
; (which can mask the very race we're chasing) - add it only if -Og stepping is
; ambiguous. Leaving it off by default keeps timing representative.
build_flags =
${env:jumperless_v5.build_flags}
-DDEBUG
-ggdb3
; -O0 ; uncomment only if needed; alters timing
; One-shot wipe-on-flash env. Builds the SAME firmware as
; [env:jumperless_v5] (no #ifdefs, no special binary), but inserts a
; pre-upload action that runs `picotool erase` on the FatFS partition
; while the device is in BOOTSEL, immediately before the normal firmware
; load. Net effect: `pio run -e jumperless_v5_erase -t upload` flashes
; firmware AND wipes user data; subsequent flashes of [env:jumperless_v5]
; preserve user data as usual.
;
; Erase bounds are taken from FS_START / FS_END as pinned by
; scripts/lock_fs_partition.py, so the erase can never escape the
; 4 MB FatFS partition into the sketch or EEPROM regions.
;
; NOTE: PlatformIO's `extends` REPLACES list-valued options rather than
; merging them, so we re-interpolate the parent's extra_scripts to keep
; lock_fs_partition.py / version_from_file.py / patch_windows_libs.py
; active.
[env:jumperless_v5_erase]
extends = env:jumperless_v5
extra_scripts =
${env:jumperless_v5.extra_scripts}
post:scripts/erase_fs_partition.py