Custom json file for SAMD21

Hi,

I’m working on a board similar to the Adafruit QT Py - SAMD21.

Where can I find more info on what the contents of the json file mean?

For example:

"core": "adafruit",
"extra_flags": "-DARDUINO_QTPY_M0 -DCRYSTALLESS -DADAFRUIT_QTPY_M0 -D__SAMD21E18A__ -DARM_MATH_CM0PLUS",
"variant": "qtpy_m0" 

How do I change the assignments of the SERCOM pins?

See https://learn.adafruit.com/using-atsamd21-sercom-to-add-more-spi-i2c-serial-ports?view=all and redirect to a new variant; For the usage of the attributes within the JSON file, see the platform + builder code and docs.

https://github.com/platformio/platform-atmelsam/blob/develop/builder/frameworks/arduino/arduino-samd.py

https://github.com/platformio/platform-atmelsam/blob/develop/platform.py

https://docs.platformio.org/en/latest/platforms/creating_board.html

Note that the builder script gives you the possibility of redirecting the variant folder, so, you won’t need to touch any files within the package itself (C:\Users\<user>\.platformio\packages):

https://github.com/platformio/platform-atmelsam/blob/1c15f3aa8595fa707f510221611ee051ab928efa/builder/frameworks/arduino/arduino-samd.py#L181-L183

https://github.com/maxgerhardt/pio-custom-samd21e17a-board