Skip to content

Commit d587a0c

Browse files
zackeesclaude
andauthored
fix(board-db): sweep build.extra_flags across all enrichable boards (#298) (#312)
PR #299 unblocked FastLED CI for 3 priority nRF52840 boards by patching their JSONs manually. This is the follow-up broader sweep: re-runs enrich_boards (now with proper merge semantics) to restore build.extra_flags on every board family fbuild already shipped without the Arduino macros they need. Changes: * enrich_boards.rs: merge PIO-supplied build/upload fields into the existing fbuild JSON rather than wholesale replacing them. This preserves fbuild-only fields PIO no longer ships (e.g. legacy arduino.ldscript that PIO has moved into SCons builder scripts) while still picking up extra_flags, vid/pid, partitions, etc. * 601 board JSONs touched across 16 platforms: intel_mcs51 (264), atmelsam (81), libretiny (47), nordicnrf52 (45), microchippic32 (39), espressif32 (35), nordicnrf51 (14), timsp430 (13), freescalekinetis (12), maxim32 (9), infineonxmc (8), ststm8 (8), lgt8f (7), nxpimxrt (6), nxplpc (6), siliconlabsefm32 (5). Most gain a full extra_flags string with ARDUINO_<BOARD> / NRF52840_XXAA / etc. * tests: add test_nrf52840_sweep_arduino_macros covering the remaining Adafruit nRF52840 family (feather/clue/itsybitsy/metro/ledglasses/ circuitplay) and test_non_nrf52_sweep_arduino_macros covering SAMD (zero/mkrzero/adafruit_feather_m0), 8051 (AT89S51), and PIC32 (chipkit_uc32). Validation: * uv run python ci/validate_boards.py: 247 drift failures (down from 817 on main) -- remaining "extra in our asset" entries are intentional fbuild-only fields (e.g. build.arduino.ldscript). * soldr cargo check / clippy --workspace --all-targets -D warnings: pass * bash ./test (full workspace): 0 failures across all crates Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 651b0d7 commit d587a0c

601 files changed

Lines changed: 7688 additions & 431 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

crates/fbuild-config/assets/boards/json/4d_systems_esp32s3_gen4_r8n16.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"arduino": {
44
"ldscript": "esp32s3_out.ld",
55
"memory_type": "qio_opi",
6-
"partitions": "default_16MB.csv"
6+
"partitions": "esp_sr_16.csv"
77
},
88
"core": "esp32",
99
"extra_flags": "-DARDUINO_ESP32_S3R8N16 -DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1",

crates/fbuild-config/assets/boards/json/96b_nitrogen.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"build": {
3+
"f_cpu": "64000000L",
4+
"mcu": "nrf52832"
5+
},
26
"connectivity": [
37
"bluetooth"
48
],
@@ -19,6 +23,11 @@
1923
"platform": "nordicnrf52",
2024
"ram": 65536,
2125
"rom": 524288,
26+
"upload": {
27+
"maximum_ram_size": 65536,
28+
"maximum_size": 524288,
29+
"protocol": "jlink"
30+
},
2231
"url": "https://www.96boards.org/product/nitrogen/",
2332
"vendor": "96Boards"
2433
}

crates/fbuild-config/assets/boards/json/AT89S51.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
2+
"build": {
3+
"core": "naked",
4+
"extra_flags": "-DAT89S51 -DNAKED_ARCH_MCS51 -DNAKED_MCS51_AT89S51",
5+
"f_cpu": "11059200L",
6+
"mcu": "at89s51"
7+
},
28
"fcpu": 11059200,
39
"frameworks": [],
410
"id": "AT89S51",
@@ -7,6 +13,11 @@
713
"platform": "intel_mcs51",
814
"ram": 128,
915
"rom": 4096,
16+
"upload": {
17+
"maximum_ram_size": 128,
18+
"maximum_size": 4096,
19+
"protocol": "avrdude"
20+
},
1021
"url": "https://www.microchip.com/wwwproducts/en/AT89S51",
1122
"vendor": "Microchip & Atmel"
1223
}

crates/fbuild-config/assets/boards/json/AT89S52.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
2+
"build": {
3+
"core": "naked",
4+
"extra_flags": "-DAT89S52 -DNAKED_ARCH_MCS51 -DNAKED_MCS51_AT89S52",
5+
"f_cpu": "11059200L",
6+
"mcu": "at89s52"
7+
},
28
"fcpu": 11059200,
39
"frameworks": [],
410
"id": "AT89S52",
@@ -7,6 +13,11 @@
713
"platform": "intel_mcs51",
814
"ram": 256,
915
"rom": 8192,
16+
"upload": {
17+
"maximum_ram_size": 256,
18+
"maximum_size": 8192,
19+
"protocol": "avrdude"
20+
},
1021
"url": "https://www.microchip.com/wwwproducts/en/AT89S52",
1122
"vendor": "Microchip & Atmel"
1223
}

crates/fbuild-config/assets/boards/json/CH559.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"build": {
3+
"f_cpu": "12000000L",
4+
"mcu": "ch559"
5+
},
26
"fcpu": 12000000,
37
"frameworks": [],
48
"id": "CH559",
@@ -7,6 +11,11 @@
711
"platform": "intel_mcs51",
812
"ram": 6400,
913
"rom": 65536,
14+
"upload": {
15+
"maximum_ram_size": 6400,
16+
"maximum_size": 65536,
17+
"protocol": "ch55x"
18+
},
1019
"url": "http://www.wch-ic.com/products/CH559.html",
1120
"vendor": "WCH"
1221
}

crates/fbuild-config/assets/boards/json/Generic8051.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
2+
"build": {
3+
"core": "naked",
4+
"extra_flags": "-DGeneric8051 -DNAKED_ARCH_MCS51 -DNAKED_MCS51_Generic8051",
5+
"f_cpu": "11059200L",
6+
"mcu": "8051"
7+
},
28
"fcpu": 11059200,
39
"frameworks": [],
410
"id": "Generic8051",
@@ -7,6 +13,10 @@
713
"platform": "intel_mcs51",
814
"ram": 128,
915
"rom": 4096,
16+
"upload": {
17+
"maximum_ram_size": 128,
18+
"maximum_size": 4096
19+
},
1020
"url": "https://en.wikipedia.org/wiki/Intel_8051",
1121
"vendor": "Intel & Licensees"
1222
}

crates/fbuild-config/assets/boards/json/Generic8052.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
2+
"build": {
3+
"core": "naked",
4+
"extra_flags": "-DGeneric8052 -DNAKED_ARCH_MCS51 -DNAKED_MCS51_Generic8052",
5+
"f_cpu": "11059200L",
6+
"mcu": "8052"
7+
},
28
"fcpu": 11059200,
39
"frameworks": [],
410
"id": "Generic8052",
@@ -7,6 +13,10 @@
713
"platform": "intel_mcs51",
814
"ram": 256,
915
"rom": 8192,
16+
"upload": {
17+
"maximum_ram_size": 256,
18+
"maximum_size": 8192
19+
},
1020
"url": "https://en.wikipedia.org/wiki/Intel_8051",
1121
"vendor": "Intel & licensees"
1222
}

crates/fbuild-config/assets/boards/json/IAP12C5A62S2.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
2+
"build": {
3+
"core": "naked",
4+
"extra_flags": "-DSTC12C5AXXS2 -DIAP12C5A62S2 -DNAKED_ARCH_MCS51 -DNAKED_MCS51_STC12C5AXXS2",
5+
"f_cpu": "11059200L",
6+
"mcu": "iap12c5a62s2",
7+
"variant": "stc12c5axxS2"
8+
},
29
"fcpu": 11059200,
310
"frameworks": [],
411
"id": "IAP12C5A62S2",
@@ -7,6 +14,11 @@
714
"platform": "intel_mcs51",
815
"ram": 1280,
916
"rom": 63488,
17+
"upload": {
18+
"maximum_ram_size": 1280,
19+
"maximum_size": 63488,
20+
"protocol": "stcgal"
21+
},
1022
"url": "http://www.stcmicro.com/stc/stc12c5a32s2.html",
1123
"vendor": "STC"
1224
}

crates/fbuild-config/assets/boards/json/IAP15F106.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
2+
"build": {
3+
"core": "naked",
4+
"extra_flags": "-DSTC15F10X -DIAP15F106 -DNAKED_ARCH_MCS51 -DNAKED_MCS51_STC15F10X",
5+
"f_cpu": "11059200L",
6+
"mcu": "iap15f106",
7+
"variant": "stc15f10x"
8+
},
29
"fcpu": 11059200,
310
"frameworks": [],
411
"id": "IAP15F106",
@@ -7,6 +14,11 @@
714
"platform": "intel_mcs51",
815
"ram": 128,
916
"rom": 6144,
17+
"upload": {
18+
"maximum_ram_size": 128,
19+
"maximum_size": 6144,
20+
"protocol": "stcgal"
21+
},
1022
"url": "http://www.stcmicro.com/STC/STC15F100.html",
1123
"vendor": "STC"
1224
}

crates/fbuild-config/assets/boards/json/IAP15F206A.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
2+
"build": {
3+
"core": "naked",
4+
"extra_flags": "-DSTC15F20XA -DIAP15F206A -DNAKED_ARCH_MCS51 -DNAKED_MCS51_STC15F20XA",
5+
"f_cpu": "11059200L",
6+
"mcu": "iap15f206a",
7+
"variant": "stc15f20xa"
8+
},
29
"fcpu": 11059200,
310
"frameworks": [],
411
"id": "IAP15F206A",
@@ -7,6 +14,11 @@
714
"platform": "intel_mcs51",
815
"ram": 256,
916
"rom": 6144,
17+
"upload": {
18+
"maximum_ram_size": 256,
19+
"maximum_size": 6144,
20+
"protocol": "stcgal"
21+
},
1022
"url": "https://www.stcmicro.com/STC/STC15F204EA.html",
1123
"vendor": "STC"
1224
}

0 commit comments

Comments
 (0)