Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "builder/frameworks/arduino"]
path = builder/frameworks/arduino
url = https://github.com/platformio/builder-framework-arduino-nrf5.git
url = https://github.com/maxgerhardt/builder-framework-arduino-nrf5.git
60 changes: 60 additions & 0 deletions boards/xiaoble.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"build": {
"arduino": {
"ldscript": "linker_script.ld"
},
"core": "arduino",
"cpu": "cortex-m4",
"extra_flags": "-DSEEED_XIAO_NRF52840 -DARDUINO_ARCH_NRF52840",
"f_cpu": "64000000L",
"hwids": [
[
"0x2886",
"0x0045"
],
[
"0x2886",
"0x8045"
]
],
"mcu": "nrf52840",
"variant": "SEEED_XIAO_NRF52840",
"softdevice": {
"sd_flags": "-DS140",
"sd_name": "s140",
"sd_version": "7.3.0",
"sd_fwid": "0x0123"
}
},
"connectivity": [
"bluetooth"
],
"debug": {
"jlink_device": "nRF52840_xxAA",
"openocd_target": "nrf52.cfg",
"svd_path": "nrf52840.svd"
},
"frameworks": [
"arduino"
],
"name": "Seeed XIAO BLE nRF52840",
"upload": {
"maximum_ram_size": 237568,
"maximum_size": 811008,
"protocol": "nrfutil",
"speed": 115200,
"protocols": [
"jlink",
"nrfjprog",
"nrfutil",
"cmsis-dap",
"sam-ba",
"blackmagic"
],
"use_1200bps_touch": true,
"require_upload_port": true,
"wait_for_upload_port": true
},
"url": "https://wiki.seeedstudio.com/XIAO_BLE",
"vendor": "Seeed Studio"
}
60 changes: 60 additions & 0 deletions boards/xiaoblesense.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"build": {
"arduino": {
"ldscript": "linker_script.ld"
},
"core": "arduino",
"cpu": "cortex-m4",
"extra_flags": "-DSEEED_XIAO_NRF52840_SENSE -DARDUINO_ARCH_NRF52840",
"f_cpu": "64000000L",
"hwids": [
[
"0x2886",
"0x0045"
],
[
"0x2886",
"0x8045"
]
],
"mcu": "nrf52840",
"variant": "SEEED_XIAO_NRF52840_SENSE",
"softdevice": {
"sd_flags": "-DS140",
"sd_name": "s140",
"sd_version": "7.3.0",
"sd_fwid": "0x0123"
}
},
"connectivity": [
"bluetooth"
],
"debug": {
"jlink_device": "nRF52840_xxAA",
"openocd_target": "nrf52.cfg",
"svd_path": "nrf52840.svd"
},
"frameworks": [
"arduino"
],
"name": "Seeed XIAO BLE Sense",
"upload": {
"maximum_ram_size": 237568,
"maximum_size": 811008,
"protocol": "nrfutil",
"speed": 115200,
"protocols": [
"jlink",
"nrfjprog",
"nrfutil",
"cmsis-dap",
"sam-ba",
"blackmagic"
],
"use_1200bps_touch": true,
"require_upload_port": true,
"wait_for_upload_port": true
},
"url": "https://wiki.seeedstudio.com/XIAO_BLE",
"vendor": "Seeed Studio"
}
2 changes: 1 addition & 1 deletion builder/frameworks/arduino
Submodule arduino updated 2 files
+1 −1 .gitmodules
+1 −1 mbed-core
10 changes: 10 additions & 0 deletions examples/arduino-blink/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,13 @@ platform = nordicnrf52
framework = arduino
board = stct_nrf52_minidev
build_flags = -DNRF52_S132

[env:xiaoblesense]
platform = nordicnrf52
framework = arduino
board = xiaoblesense

[env:xiaoble]
platform = nordicnrf52
framework = arduino
board = xiaoble
5 changes: 5 additions & 0 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"owner": "platformio",
"version": "~3.1.1"
},
"framework-arduino-mbed-seeed": {
"type": "framework",
"optional": true,
"version": "https://github.com/maxgerhardt/framework-mbed-seeed.git"
},
"framework-cmsis": {
"type": "framework",
"optional": true,
Expand Down
8 changes: 6 additions & 2 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ def configure_default_packages(self, variables, targets):
if not IS_WINDOWS:
self.packages["tool-gperf"]["optional"] = False

if board in ("nano33ble", "nicla_sense_me"):
if board in ("nano33ble", "nicla_sense_me", "xiaoblesense", "xiaoble"):
self.packages["toolchain-gccarmnoneeabi"]["version"] = "~1.80201.0"
self.frameworks["arduino"]["package"] = "framework-arduino-mbed"
self.packages["tool-adafruit-nrfutil"]["optional"] = False
if board in ("xiaoblesense", "xiaoble"):
self.frameworks["arduino"]["package"] = "framework-arduino-mbed-seeed"
else:
self.frameworks["arduino"]["package"] = "framework-arduino-mbed"
self.frameworks["arduino"][
"script"
] = "builder/frameworks/arduino/mbed-core/arduino-core-mbed.py"
Expand Down