# Help adding Seeeduino XIAO (SAMD21) to XOD supported devices (Updated, looking for @dev help)

**URL:** https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099
**Category:** Install/Upload Problems
**Created:** [June 12, 2020, 1:01am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099 "2020-06-12T01:01:14Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![loganphyve](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/loganphyve/32/2422_2.png) [@loganphyve](https://forum.xod.io/u/loganphyve)
#### Post date: [June 12, 2020, 1:01am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/1 "2020-06-12T01:01:14Z")

</div>

Hi all,

In an effort to reduce my project size and get more program storage, I’ve decided to try running my code on Seeeduino XIAO which is supposed to be based on the Amtel SAMD21. I see that XOD supports SAMD21, as I tried to install the drivers by pushing an upload to “Arduino Zero ( tried both native usb port and programming port)” and the com port the device is registered on. The compiler runs fine and compiles test code that normally runs on my Arduino Nanos (Amtel 328).

I can’t seem to find a way to upload this code to this board. XOD sees it, but I can’t find a “board model” in the drop down to choose that works.

Is this board compatible? The error I get:

Uploading compiled code to the board…  
Error: open port: Serial port busy  
Can’t perform reset via 1200bps-touch on serial port  
Upload failed  
Command Process exited with code 1  
Make sure the board is connected, the cable is working, the board model set correctly, the upload port belongs to the board, the board drivers are installed, the upload options (if any) match your board specs.

I’ve tried uploading to the board without it attached to anything just to be sure it wasn’t my wiring. No good.

Anyone have any recommendations on pushing code to this board? I’d _really_ love to use this one, it’s perfect for my needs. I’d be happy to provide log data, or whatever is needed to diagnose. I’ve tried installing the drivers from Arduino’s sketch manager, too. No dice.

Any help getting this board working would be highly appreciated, since it’s a powerhouse and tiny. Please and thanks!

Edit: More info

If I double-click-bridge the “reset” pins on the board with a looped dupont cable, it does switch over to USB mode, and I can see drive contents on the board - so I’m pretty sure USB connectivity is good and windows drivers are good. I think XOD IDE just needs to be set up to choose the right board and upload settings. Also worth noting that I get a similar error in Arduino Sketchbook when trying to upload, after adding Seeeduino XIAO M0 from the boards manager and official seeduino repo.

Sketch uses 59956 bytes (22%) of program storage space. Maximum is 262144 bytes.  
processing.app.debug.RunnerException  
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152)  
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)  
at processing.app.SketchController.upload(SketchController.java:732)  
at processing.app.SketchController.exportApplet(SketchController.java:703)  
at processing.app.Editor$UploadHandler.run(Editor.java:2047)  
at java.lang.Thread.run(Thread.java:748)  
Caused by: processing.app.SerialException: Error touching serial port ‘COM3’.  
at processing.app.Serial.touchForCDCReset(Serial.java:107)  
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136)  
… 5 more  
Caused by: jssc.SerialPortException: Port name - COM3; Method name - openPort(); Exception type - Port busy.  
at jssc.SerialPort.openPort(SerialPort.java:164)  
at processing.app.Serial.touchForCDCReset(Serial.java:101)  
… 6 more

---

<div class="post-metadata">

### Author: ![loganphyve](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/loganphyve/32/2422_2.png) [@loganphyve](https://forum.xod.io/u/loganphyve)
#### Post date: [June 12, 2020, 3:37am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/2 "2020-06-12T03:37:49Z")

</div>

Update -

This board seems to switch modes when being programmed and I can’t tell if it’s being programmed correctly. XOD now sees (both) USB modes in the menu but will only program when in one of two modes (ok, solved that one, it appears I can now upload code to the board).

I believe disabling windows driver signing by GPedit solved the connection issue but can’t confirm, as I still see the error when the board is in its alternate mode.

Of note, debug “seems” to connect but no watches or updates seem to work. I suspect this is because the USB mode changes once the chip is programmed, as once programming finishes, it seems to load the file explorer for the usb storage on the board (shows as a windows drive). I have to close the debug tab as the STOP button does not work.

Lastly can’t tell whether or not it’s the fault of the debug mapping, or the internal pin to IO mapping that may be missing for this particular board. Does anyone know how to set a board up and/or create a pin map for this board? I doubt it exists yet for XOD but I’d like to help get it added.

---

<div class="post-metadata">

### Author: ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)
#### Post date: [June 12, 2020, 4:08am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/3 "2020-06-12T04:08:56Z")

</div>

Hi, sometimes after loading, it is necessary to do a manual reset so that the similarity starts in the watches, I think that on the back it has a reset test point.

---

<div class="post-metadata">

### Author: ![loganphyve](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/loganphyve/32/2422_2.png) [@loganphyve](https://forum.xod.io/u/loganphyve)
#### Post date: [June 12, 2020, 4:10am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/4 "2020-06-12T04:10:10Z")

</div>

Just for the sake of conversation, I pulled the bootloader code from xod\<proj\>\_packages\_\arduino\hardware\samd\1.8.6\bootloaders\zero\board\_definitions\_zero.h to see what the pinmapping on another Cortex M0 controller looked like - here’s the dump. I’m pretty sure I would need to generate a new one of these, and add it along with the other menu items in these folders to get it added to XOD.

Anyone know of a way to find the virtual IO pin to hardware pin map for this board? At the very least I can stuff the settings into another board item I’m never going to use, to see if it works.

/\*  
Copyright © 2015 Arduino LLC. All right reserved.  
Copyright © 2015 Atmel Corporation/Thibaut VIARD. All right reserved.

This library is free software; you can redistribute it and/or  
modify it under the terms of the GNU Lesser General Public  
License as published by the Free Software Foundation; either  
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,  
but WITHOUT ANY WARRANTY; without even the implied warranty of  
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public  
License along with this library; if not, write to the Free Software  
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA  
\*/

#ifndef _BOARD\_DEFINITIONS\_H_  
#define _BOARD\_DEFINITIONS\_H_

/\*

- USB device definitions  
\*/  
#define STRING\_PRODUCT “Arduino Zero”  
#define USB\_VID\_HIGH 0x23  
#define USB\_VID\_LOW 0x41  
#define USB\_PID\_HIGH 0x00  
#define USB\_PID\_LOW 0x4D

/\*

- If BOOT\_DOUBLE\_TAP\_ADDRESS is defined the bootloader is started by
- quickly tapping two times on the reset button.
- BOOT\_DOUBLE\_TAP\_ADDRESS must point to a free SRAM cell that must not
- be touched from the loaded application.  
_/  
 #define BOOT\_DOUBLE\_TAP\_ADDRESS (0x20007FFCul)  
 #define BOOT\_DOUBLE\_TAP\_DATA (_((volatile uint32\_t \*) BOOT\_DOUBLE\_TAP\_ADDRESS))

/\*

- If BOOT\_LOAD\_PIN is defined the bootloader is started if the selected
- pin is tied LOW.  
\*/  
//#define BOOT\_LOAD\_PIN PIN\_PA21 // Pin 7  
//#define BOOT\_LOAD\_PIN PIN\_PA15 // Pin 5

#define BOOT\_USART\_MODULE SERCOM0  
#define BOOT\_USART\_BUS\_CLOCK\_INDEX PM\_APBCMASK\_SERCOM0  
#define BOOT\_USART\_PER\_CLOCK\_INDEX GCLK\_CLKCTRL\_ID\_SERCOM0\_CORE\_Val  
#define BOOT\_USART\_PAD\_SETTINGS UART\_RX\_PAD3\_TX\_PAD2  
#define BOOT\_USART\_PAD3 PINMUX\_PA11C\_SERCOM0\_PAD3  
#define BOOT\_USART\_PAD2 PINMUX\_PA10C\_SERCOM0\_PAD2  
#define BOOT\_USART\_PAD1 PINMUX\_UNUSED  
#define BOOT\_USART\_PAD0 PINMUX\_UNUSED

/\* Master clock frequency \*/  
#define CPU\_FREQUENCY (48000000ul)  
#define VARIANT\_MCK CPU\_FREQUENCY

/\* Frequency of the board main oscillator \*/  
#define VARIANT\_MAINOSC (32768ul)

/\* Calibration values for DFLL48 pll \*/  
#define NVM\_SW\_CALIB\_DFLL48M\_COARSE\_VAL (58)  
#define NVM\_SW\_CALIB\_DFLL48M\_FINE\_VAL (64)

/\*

- LEDs definitions  
\*/  
#define BOARD\_LED\_PORT (0)  
#define BOARD\_LED\_PIN (17)

#define BOARD\_LEDRX\_PORT (1)  
#define BOARD\_LEDRX\_PIN (3)

#define BOARD\_LEDTX\_PORT (0)  
#define BOARD\_LEDTX\_PIN (27)

#endif // _BOARD\_DEFINITIONS\_H_

---

<div class="post-metadata">

### Author: ![loganphyve](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/loganphyve/32/2422_2.png) [@loganphyve](https://forum.xod.io/u/loganphyve)
#### Post date: [June 12, 2020, 4:12am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/5 "2020-06-12T04:12:31Z")

</div>

Thanks for the reply, @cesars, but I power cycling the board doesn’t seem to do anything with a known working patch on my 328, so I suspect it’s a pin config somewhere. I can’t get the I2C OLED to connect on SDA/SCL either, which was working on the 328 as well. It does get warm, but that’s it. I have that disconnected for now.

---

<div class="post-metadata">

### Author: ![loganphyve](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/loganphyve/32/2422_2.png) [@loganphyve](https://forum.xod.io/u/loganphyve)
#### Post date: [June 12, 2020, 4:28am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/6 "2020-06-12T04:28:45Z")

</div>

I believe I’ve found the pin definition file location I’d need to add an entry to -

\_packages\_\packages\arduino\hardware\samd\1.8.6\variants\<board\> where in this case board is \<arduino\_zero\> . This is the contents of the variant.h file which looks to be the full hardware pinmap for the Arduino Zero implementation of the Cortex SAMD21.

So - one step closer, I think. Hoping someone knows more about this than I do 🙂

/\*  
Copyright © 2014-2015 Arduino LLC. All right reserved.

This library is free software; you can redistribute it and/or  
modify it under the terms of the GNU Lesser General Public  
License as published by the Free Software Foundation; either  
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,  
but WITHOUT ANY WARRANTY; without even the implied warranty of  
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public  
License along with this library; if not, write to the Free Software  
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA  
\*/

#ifndef _VARIANT\_ARDUINO\_ZERO_  
#define _VARIANT\_ARDUINO\_ZERO_

// The definitions here needs a SAMD core \>=1.6.10  
#define ARDUINO\_SAMD\_VARIANT\_COMPLIANCE 10610

/\*----------------------------------------------------------------------------

- 

```
   Definitions

```

_----------------------------------------------------------------------------_/

/\*\* Frequency of the board main oscillator \*/  
#define VARIANT\_MAINOSC (32768ul)

/\*\* Master clock frequency \*/  
#define VARIANT\_MCK (48000000ul)

/\*----------------------------------------------------------------------------

- 

```
   Headers

```

_----------------------------------------------------------------------------_/

#include “WVariant.h”

#ifdef \_\_cplusplus  
#include “SERCOM.h”  
#include “Uart.h”  
#endif // \_\_cplusplus

#ifdef \_\_cplusplus  
extern “C”  
{  
#endif // \_\_cplusplus

/\*----------------------------------------------------------------------------

- 

```
   Pins

```

_----------------------------------------------------------------------------_/

// Number of pins defined in PinDescription array  
#ifdef \_\_cplusplus  
extern “C” unsigned int PINCOUNT\_fn();  
#endif  
#define PINS\_COUNT (PINCOUNT\_fn())  
#define NUM\_DIGITAL\_PINS (20u)  
#define NUM\_ANALOG\_INPUTS (6u)  
#define NUM\_ANALOG\_OUTPUTS (1u)  
#define analogInputToDigitalPin§ ((p \< 6u) ? § + 14u : -1)

#define digitalPinToPort§ ( &(PORT-\>Group[g\_APinDescription[P].ulPort]) )  
#define digitalPinToBitMask§ ( 1 \<\< g\_APinDescription[P].ulPin )  
//#define analogInPinToBit§ ( )  
#define portOutputRegister(port) ( &(port-\>OUT.reg) )  
#define portInputRegister(port) ( &(port-\>IN.reg) )  
#define portModeRegister(port) ( &(port-\>DIR.reg) )  
#define digitalPinHasPWM§ ( g\_APinDescription[P].ulPWMChannel != NOT\_ON\_PWM || g\_APinDescription[P].ulTCChannel != NOT\_ON\_TIMER )

/\*

- digitalPinToTimer(…) is AVR-specific and is not defined for SAMD
- architecture. If you need to check if a pin supports PWM you must
- use digitalPinHasPWM(…).
- 
- [https://github.com/arduino/Arduino/issues/1833](https://github.com/arduino/Arduino/issues/1833)  
\*/  
// #define digitalPinToTimer§

// LEDs  
#define PIN\_LED\_13 (13u)  
#define PIN\_LED\_RXL (25u)  
#define PIN\_LED\_TXL (26u)  
#define PIN\_LED PIN\_LED\_13  
#define PIN\_LED2 PIN\_LED\_RXL  
#define PIN\_LED3 PIN\_LED\_TXL  
#define LED\_BUILTIN PIN\_LED\_13

/\*

- Analog pins  
\*/  
#define PIN\_A0 (14ul)  
#define PIN\_A1 (15ul)  
#define PIN\_A2 (16ul)  
#define PIN\_A3 (17ul)  
#define PIN\_A4 (18ul)  
#define PIN\_A5 (19ul)  
#define PIN\_DAC0 (14ul)

static const uint8\_t A0 = PIN\_A0;  
static const uint8\_t A1 = PIN\_A1;  
static const uint8\_t A2 = PIN\_A2;  
static const uint8\_t A3 = PIN\_A3;  
static const uint8\_t A4 = PIN\_A4;  
static const uint8\_t A5 = PIN\_A5;  
static const uint8\_t DAC0 = PIN\_DAC0;  
#define ADC\_RESOLUTION 12

// Other pins  
#define PIN\_ATN (38ul)  
static const uint8\_t ATN = PIN\_ATN;

/\*

- Serial interfaces  
\*/  
// Serial (EDBG)  
#define PIN\_SERIAL\_RX (31ul)  
#define PIN\_SERIAL\_TX (30ul)  
#define PAD\_SERIAL\_TX (UART\_TX\_PAD\_2)  
#define PAD\_SERIAL\_RX (SERCOM\_RX\_PAD\_3)

// Serial1  
#define PIN\_SERIAL1\_RX (0ul)  
#define PIN\_SERIAL1\_TX (1ul)  
#define PAD\_SERIAL1\_TX (UART\_TX\_PAD\_2)  
#define PAD\_SERIAL1\_RX (SERCOM\_RX\_PAD\_3)

/\*

- SPI Interfaces  
\*/  
#define SPI\_INTERFACES\_COUNT 1

#define PIN\_SPI\_MISO (22u)  
#define PIN\_SPI\_MOSI (23u)  
#define PIN\_SPI\_SCK (24u)  
#define PERIPH\_SPI sercom4  
#define PAD\_SPI\_TX SPI\_PAD\_2\_SCK\_3  
#define PAD\_SPI\_RX SERCOM\_RX\_PAD\_0

static const uint8\_t SS = PIN\_A2 ; // SERCOM4 last PAD is present on A2 but HW SS isn’t used. Set here only for reference.  
static const uint8\_t MOSI = PIN\_SPI\_MOSI ;  
static const uint8\_t MISO = PIN\_SPI\_MISO ;  
static const uint8\_t SCK = PIN\_SPI\_SCK ;

/\*

- Wire Interfaces  
\*/  
#define WIRE\_INTERFACES\_COUNT 1

#define PIN\_WIRE\_SDA (20u)  
#define PIN\_WIRE\_SCL (21u)  
#define PERIPH\_WIRE sercom3  
#define WIRE\_IT\_HANDLER SERCOM3\_Handler

static const uint8\_t SDA = PIN\_WIRE\_SDA;  
static const uint8\_t SCL = PIN\_WIRE\_SCL;

/\*

- USB  
\*/  
#define PIN\_USB\_HOST\_ENABLE (27ul)  
#define PIN\_USB\_DM (28ul)  
#define PIN\_USB\_DP (29ul)

/\*

- I2S Interfaces  
\*/  
#define I2S\_INTERFACES\_COUNT 1

#define I2S\_DEVICE 0  
#define I2S\_CLOCK\_GENERATOR 3  
#define PIN\_I2S\_SD (9u)  
#define PIN\_I2S\_SCK (1u)  
#define PIN\_I2S\_FS (0u)

#ifdef \_\_cplusplus  
}  
#endif

/\*----------------------------------------------------------------------------

- 

```
   Arduino objects - C++ only

```

_----------------------------------------------------------------------------_/

#ifdef \_\_cplusplus

/\* =========================

- ===== SERCOM DEFINITION
- =========================  
\*/  
extern SERCOM sercom0;  
extern SERCOM sercom1;  
extern SERCOM sercom2;  
extern SERCOM sercom3;  
extern SERCOM sercom4;  
extern SERCOM sercom5;

extern Uart Serial;  
extern Uart Serial1;

#endif

#ifdef \_\_cplusplus  
extern “C” {  
#endif  
unsigned int PINCOUNT\_fn();  
#ifdef \_\_cplusplus  
}  
#endif

// These serial port names are intended to allow libraries and architecture-neutral  
// sketches to automatically default to the correct port name for a particular type  
// of use. For example, a GPS module would normally connect to SERIAL\_PORT\_HARDWARE\_OPEN,  
// the first hardware serial port whose RX/TX pins are not dedicated to another use.  
//  
// SERIAL\_PORT\_MONITOR Port which normally prints to the Arduino Serial Monitor  
//  
// SERIAL\_PORT\_USBVIRTUAL Port which is USB virtual serial  
//  
// SERIAL\_PORT\_LINUXBRIDGE Port which connects to a Linux system via Bridge library  
//  
// SERIAL\_PORT\_HARDWARE Hardware serial port, physical RX & TX pins.  
//  
// SERIAL\_PORT\_HARDWARE\_OPEN Hardware serial ports which are open for use. Their RX & TX  
// pins are NOT connected to anything by default.  
#define SERIAL\_PORT\_USBVIRTUAL SerialUSB  
#define SERIAL\_PORT\_MONITOR Serial  
// Serial has no physical pins broken out, so it’s not listed as HARDWARE port  
#define SERIAL\_PORT\_HARDWARE Serial1  
#define SERIAL\_PORT\_HARDWARE\_OPEN Serial1

#endif /\* _VARIANT\_ARDUINO\_ZERO_ \*/

---

<div class="post-metadata">

### Author: ![loganphyve](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/loganphyve/32/2422_2.png) [@loganphyve](https://forum.xod.io/u/loganphyve)
#### Post date: [June 12, 2020, 4:53am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/7 "2020-06-12T04:53:24Z")

</div>

Alright, I found the exact variants folder I need in my Arduino install that includes the official Seeeduino XIAO M0 variant package.

c:\users\<user\>\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.7.6\variants\XIAO\_m0

Anyone know how to add this whole thing to XOD? It looks like all of the dirty work is done, and I should be able to copy/paste these assets into the XOD folder structure to add and use them appropriately. Anyone done this before? I’m still winging it.

---

<div class="post-metadata">

### Author: ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)
#### Post date: [June 12, 2020, 5:08am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/8 "2020-06-12T05:08:10Z")

</div>

well I think I understand what it refers to, I made a node for ESP8266, which addresses the port.  
It would have to see if I can make one for SAMD21.

The node is in library `cesars/utils`

---

<div class="post-metadata">

### Author: ![loganphyve](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/loganphyve/32/2422_2.png) [@loganphyve](https://forum.xod.io/u/loganphyve)
#### Post date: [June 12, 2020, 5:12am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/9 "2020-06-12T05:12:30Z")

</div>

This isn’t an add-on module for an arduino board, it’s a full dev board like a lilypad or nano or any one of the other micro dev boards. It’s got similar stats to the Amtel Mega2650 but it’s got a lot more horsepower. This XIAO board is a super-tiny dev board for wearables and other high-performance projects. I don’t think it needs a node implementation like the ESP boards do, as it’s not an add-on.

> **[Seeeduino XIAO - Arduino Microcontroller - SAMD21 Cortex M0+](https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html)**
>
> Seeeduino XIAO is the smallest Arduino compatible board in Seeeduino Family. It is an Arduino microcontroller that is embedded with the SAMD21 microchip. The interfaces of Seeeduino XIAO is rich enough in such a tiny Dev. Board as well.

It’s like a beefed up 2650 with just a few pins and a super compact package.

The way XOD appears to define each board ‘variant’, I’d need to add the variant data to XOD’s hardware definitions to get this board working properly.

---

<div class="post-metadata">

### Author: ![loganphyve](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/loganphyve/32/2422_2.png) [@loganphyve](https://forum.xod.io/u/loganphyve)
#### Post date: [June 12, 2020, 5:19am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/10 "2020-06-12T05:19:53Z")

</div>

In comparing the 2 variant.h files, there are definitely big differences in the pin mapping. I’ll probably need to spend some serious time evaluating the variant definitions to try and get this board working. I’ll keep picking away at it…

---

<div class="post-metadata">

### Author: ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)
#### Post date: [June 12, 2020, 6:19am UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/11 "2020-06-12T06:19:19Z")

</div>

It occurs to me that you could do a mapping manually, for example connect a led to a pin and send a pulse as you raise the port value, list up to 17 or more, if you create a table I can help you

As you say it is very different, and I don’t have the hardware to try something

---

<div class="post-metadata">

### Author: ![loganphyve](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/loganphyve/32/2422_2.png) [@loganphyve](https://forum.xod.io/u/loganphyve)
#### Post date: [June 12, 2020, 2:02pm UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/12 "2020-06-12T14:02:16Z")

</div>

The mapping is already done in the variants.h file for the Seeeduinio XIAO M0 official Arduino install. It’s a matter of translating the variant.h files and configs from the Arduino official hardware definitions over to a set that XOD can ingest, then dumping them into the right locations in the XOD app directories to populate them into the “upload” menu.

---

<div class="post-metadata">

### Author: ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)
#### Post date: [June 12, 2020, 3:15pm UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/13 "2020-06-12T15:15:32Z")

</div>

you have not understood me, if it is in variant.h but I xod does not take those values. The same was true with ESP taking D5 when actually assigning D1.

So I tell him that he has to send a high pin-by-pin and see which one he assigns and which sends a signal.

---

<div class="post-metadata">

### Author: ![loganphyve](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/loganphyve/32/2422_2.png) [@loganphyve](https://forum.xod.io/u/loganphyve)
#### Post date: [June 12, 2020, 3:23pm UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/14 "2020-06-12T15:23:20Z")

</div>

There is no variant.h for a XOD implemenation of this XIAO board yet, and I think that’s why we’re mis-communicating. The Variant.h for XIAO belongs to the Arduino implementation and is supplied by the vendor. I have not tried the values in the XIAO Arduino implementation in XOD yet so the XIAO pin values are untested in XOD.

edit to further clarify: I was able to upload code to the board using the Arduino Zero profile in XOD, and the upload seemed to take, so I know XOD can talk to the XIAO now - just a matter of mapping the device and generating the proper XOD variant files for it 🙂

I understand what you mean by doing the pin testing, but wouldn’t this already be done? Considering there is a working variants.h file for Arduino we can then use the vendor provided mapped values from in XOD, or does XOD use different internal pin values and names? If XOD maps the pins differently than Arduino all I’d need is that map.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)
#### Post date: [July 12, 2020, 3:23pm UTC](https://forum.xod.io/t/help-adding-seeeduino-xiao-samd21-to-xod-supported-devices-updated-looking-for-dev-help/4099/15 "2020-07-12T15:23:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
