diff --git a/boards/5g_nb_iot.json b/boards/5g_nb_iot.json new file mode 100644 index 0000000..7e16fa6 --- /dev/null +++ b/boards/5g_nb_iot.json @@ -0,0 +1,60 @@ +{ + "build": { + "arduino": { + "ldscript": "flash_with_bootloader.ld" + }, + "core": "5gnbiot", + "cpu": "cortex-m0plus", + "extra_flags": "-DARDUINO_SAMD_ZERO -D__SAMD21G18A__", + "f_cpu": "48000000L", + "hwids": [ + [ + "0x2341", + "0x804D" + ], + [ + "0x2341", + "0x004D" + ], + [ + "0x2341", + "0x824D" + ] + ], + "mcu": "samd21g18a", + "usb_product": "5G-NB-IoT", + "variant": "arduino_zero" + }, + "debug": { + "jlink_device": "ATSAMD21G18", + "onboard_tools": [ + "cmsis-dap" + ], + "openocd_chipname": "at91samd21g18", + "openocd_target": "at91samdXX", + "svd_path": "ATSAMD21G18A.svd" + }, + "frameworks": [ + "arduino" + ], + "name": "5G-NB-IoT", + "upload": { + "disable_flushing": true, + "maximum_ram_size": 32768, + "maximum_size": 262144, + "native_usb": true, + "offset_address": "0x2000", + "protocol": "sam-ba", + "protocols": [ + "sam-ba", + "blackmagic", + "jlink", + "atmel-ice" + ], + "require_upload_port": true, + "use_1200bps_touch": true, + "wait_for_upload_port": true + }, + "url": "https://5ghub.us/product/lte-narrowband-internet-of-things-nb-iot-and-global-navigation-satellite-system-gnss-kit-with-ltegps-antenna-arduino-and-freertos-compatible/", + "vendor": "Arduino LLC" +} diff --git a/examples/arduino-blink/platformio.ini b/examples/arduino-blink/platformio.ini index febffa4..496f0b5 100644 --- a/examples/arduino-blink/platformio.ini +++ b/examples/arduino-blink/platformio.ini @@ -121,3 +121,8 @@ framework = arduino platform = atmelsam board = seeed_wio_lite_mg126 framework = arduino + +[env:5g_nb_iot] +platform = atmelsam +board = 5g_nb_iot +framework = arduino diff --git a/platform.json b/platform.json index 484d6b0..f00c4b8 100644 --- a/platform.json +++ b/platform.json @@ -55,6 +55,11 @@ "owner": "platformio", "version": "~1.8.14" }, + "framework-arduino-samd-5gnbiot": { + "type": "framework", + "optional": true, + "version": "https://github.com/maxgerhardt/framework-arduino-samd-5gnbiot.git" + }, "framework-arduino-samd-adafruit": { "type": "framework", "optional": true, diff --git a/platform.py b/platform.py index 3d5208f..5054d0a 100644 --- a/platform.py +++ b/platform.py @@ -69,6 +69,12 @@ def configure_default_packages(self, variables, targets): self.packages["toolchain-gccarmnoneeabi"]["version"] = "~1.90301.0" if build_core in ("adafruit", "seeed"): self.packages["framework-cmsis"]["version"] = "~2.50400.0" + if build_core in ("5gnbiot"): + self.packages["toolchain-gccarmnoneeabi"][ + "version"] = ">=1.40803.0,<1.40805.0" + self.packages["tool-bossac"]["version"] = "~1.10700.0" + self.packages["framework-cmsis"]["version"] = "~1.40500.0" + self.packages["framework-cmsis-atmel"]["version"] = "~1.1.0" if ( board.get("build.core", "") in ("adafruit", "seeed", "sparkfun")