diff --git a/crates/fbuild-config/assets/boards/json/xiaoble_adafruit.json b/crates/fbuild-config/assets/boards/json/xiaoble_adafruit.json new file mode 100644 index 00000000..88bd7d1e --- /dev/null +++ b/crates/fbuild-config/assets/boards/json/xiaoble_adafruit.json @@ -0,0 +1,31 @@ +{ + "build": { + "core": "nRF5", + "variant": "Seeed_XIAO_nRF52840", + "arduino": { + "ldscript": "nrf52840_s140_v7.ld" + } + }, + "connectivity": [ + "bluetooth" + ], + "debug": { + "tools": { + "blackmagic": {}, + "jlink": {}, + "cmsis-dap": {} + } + }, + "fcpu": 64000000, + "frameworks": [ + "arduino" + ], + "id": "xiaoble_adafruit", + "mcu": "NRF52840", + "name": "Seeed XIAO BLE nRF52840", + "platform": "nordicnrf52", + "ram": 237568, + "rom": 811008, + "url": "https://wiki.seeedstudio.com/XIAO_BLE", + "vendor": "Seeed" +} diff --git a/crates/fbuild-config/assets/boards/json/xiaoblesense_adafruit.json b/crates/fbuild-config/assets/boards/json/xiaoblesense_adafruit.json new file mode 100644 index 00000000..4f0962b8 --- /dev/null +++ b/crates/fbuild-config/assets/boards/json/xiaoblesense_adafruit.json @@ -0,0 +1,31 @@ +{ + "build": { + "core": "nRF5", + "variant": "Seeed_XIAO_nRF52840_Sense", + "arduino": { + "ldscript": "nrf52840_s140_v7.ld" + } + }, + "connectivity": [ + "bluetooth" + ], + "debug": { + "tools": { + "blackmagic": {}, + "jlink": {}, + "cmsis-dap": {} + } + }, + "fcpu": 64000000, + "frameworks": [ + "arduino" + ], + "id": "xiaoblesense_adafruit", + "mcu": "NRF52840", + "name": "Seeed XIAO BLE Sense", + "platform": "nordicnrf52", + "ram": 237568, + "rom": 811008, + "url": "https://wiki.seeedstudio.com/XIAO_BLE", + "vendor": "Seeed" +} diff --git a/crates/fbuild-config/src/board/tests.rs b/crates/fbuild-config/src/board/tests.rs index 77790405..8d2edbd7 100644 --- a/crates/fbuild-config/src/board/tests.rs +++ b/crates/fbuild-config/src/board/tests.rs @@ -494,6 +494,27 @@ fn test_nano_every_board_config() { assert_eq!(config.platform(), Some(fbuild_core::Platform::AtmelMegaAvr)); } +#[test] +fn test_xiaoble_adafruit_board_config() { + // Seeed XIAO BLE (nRF52840, no IMU); maxgerhardt platform-nordicnrf52. + // Regression for FastLED `nrf52_xiaoblesense` workflow (#293). + let config = BoardConfig::from_board_id("xiaoble_adafruit", &HashMap::new()).unwrap(); + assert_eq!(config.mcu, "nrf52840"); + assert_eq!(config.core, "nRF5"); + assert_eq!(config.variant, "Seeed_XIAO_nRF52840"); +} + +#[test] +fn test_xiaoblesense_adafruit_board_config() { + // Seeed XIAO BLE Sense (nRF52840 + IMU/mic). + // Regression for FastLED `adafruit_xiaoblesense` workflow (#293). + let config = + BoardConfig::from_board_id("xiaoblesense_adafruit", &HashMap::new()).unwrap(); + assert_eq!(config.mcu, "nrf52840"); + assert_eq!(config.core, "nRF5"); + assert_eq!(config.variant, "Seeed_XIAO_nRF52840_Sense"); +} + /// Validate that ALL megatinycore boards have the required framework-injected /// defines in extra_flags. PlatformIO's builder script injects these at build /// time, but fbuild must carry them in the board JSON since we don't run