@TimO said in Sensebender Gateway (SAMD21):
Yes, I do have a sensebender gateway
It's great to hear that. Given that VS Code with PlatformIO is already running:
- install "Atmel SAM" from PlatformIO -> Home -> Platforms. Then you should have .platformio/packages/framework-arduino-samd/ in your users directory.
- download https://github.com/mysensors/ArduinoBoards/blob/master/boards/mysensors-samd-1.0.6.tar.bz2 and unzip it
- integrate the unzipped data from inside mysensors-samd-1.0.6 into the according folders in .platformio/packages/framework-arduino-samd/, that means
- the content from mysensors-samd-1.0.6/bootloaders into .platformio/packages/framework-arduino-samd/bootloaders/
- the content from mysensors-samd-1.0.6/driver into .platformio/packages/framework-arduino-samd/driver/
- the content from mysensors-samd-1.0.6/variants into .platformio/packages/framework-arduino-samd/variants/
- append the active part from mysensors-samd-1.0.6/boards.txt to .platformio/packages/framework-arduino-samd/boards.txt
- create .platformio/platforms/atmelsam/boards/sensebender_gw.json. I took the mkrzero.json from that folder and adjusted it to the Sensebender. So the content of .platformio/platforms/atmelsam/boards/sensebender_gw.json is:
{
"build": {
"arduino": {
"ldscript": "flash_with_bootloader.ld"
},
"core": "arduino",
"cpu": "cortex-m0plus",
"extra_flags": "-D__SAMD21G18A__",
"f_cpu": "48000000L",
"hwids": [
[
"0x1209",
"0x6949"
],
[
"0x1209",
"0x6948"
]
],
"mcu": "samd21g18a",
"usb_product": "Sensebender Gateway",
"variant": "mysensors_gw"
},
"debug": {
"jlink_device": "ATSAMD21G18",
"openocd_chipname": "at91samd21g18",
"openocd_target": "at91samdXX",
"svd_path": "ATSAMD21G18A.svd"
},
"frameworks": [
"arduino"
],
"name": "Sensebender Gateway",
"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://www.arduino.cc/en/Main/ArduinoBoardMKRZero",
"vendor": "Arduino"
}
It's not a perfect solution as it's integrated into the already existing Atmel SAM package, but it's enough for testing imo. I'l keep trying to figure out how to make a dedicated package for the Sensebender.
It would be great if you could follow these steps and create a new project and select the sensebender as board. Please tell me whether it worked or not.