-
Notifications
You must be signed in to change notification settings - Fork 996
Seeed XIAO support #1170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seeed XIAO support #1170
Conversation
src/machine/board_xiao.go
Outdated
| LED = PA17 | ||
| PIN_LED_13 = PA17 | ||
| PIN_LED = PA17 | ||
| LED_BUILTIN = PA17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LED_BUILTIN is used in the Arduino environment. I think we should only define LED here (not the other three definitions), as that is the convention for other boards within TinyGo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed at 14d9484
src/machine/board_xiao.go
Outdated
| PIN_LED_RXL = PA18 | ||
| PIN_LED_TXL = PA19 | ||
| PIN_LED2 = PIN_LED_RXL | ||
| PIN_LED3 = PIN_LED_TXL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you match the TinyGo convention here?
| PIN_LED_RXL = PA18 | |
| PIN_LED_TXL = PA19 | |
| PIN_LED2 = PIN_LED_RXL | |
| PIN_LED3 = PIN_LED_TXL | |
| LED_RXL = PA18 | |
| LED_TXL = PA19 | |
| LED1 = LED | |
| LED2 = LED_RXL | |
| LED3 = LED_TXL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed at 14d9484
src/machine/board_xiao.go
Outdated
| const ( | ||
| SWDIO = PA31 | ||
| SWCLK = PA30 | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These cannot normally be used from the firmware so there isn't a good reason to define these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed at af11b38
targets/xiao.json
Outdated
| "build-tags": ["sam", "atsamd21g18a", "xiao"], | ||
| "flash-1200-bps-reset": "true", | ||
| "flash-method": "msd", | ||
| "msd-volume-name": "ITSYBOOT", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like they just copied the ItsyBitsy-M0 bootloader, which is unfortunate. But we'll have to match that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Created #1174 to add some ADC pin settings. |
|
Basic testing was done.
|
|
Completed. |
|
Hello @sago35 can you please resolve the merge conflict? Thank you. |
|
@deadprogram I want to merge this PR and then merge #1180. |
|
Thank you very much for another great contribution @sago35 now squash/merging. |


I added Seeed XIAO (Seeeduino XIAO) support to TinyGo.
The SEEED Seeeduino XIAO is a minimal, low-cost board that uses the Atmel ATSAMD21G18,
a 32-bit ARM Cortex-M0+ processor with 256KB flash and 32KB SRAM running at 48MHz.
The board is 20 x 17.5mm, and uses a USB-C connector.
The price is only $4.9.
It's more expensive than bluepill but considerably cheaper than trinket-m0 ($8.95).
It doesn't have external flash, but it's SAMD21, so it's a good first step for TinyGo.
https://wiki.seeedstudio.com/Seeeduino-XIAO/
ATSAMD2x datasheet: https://files.seeedstudio.com/wiki/Seeeduino-XIAO/res/ATSAMD21G18A-MU-Datasheet.pdf
PinOut: https://files.seeedstudio.com/wiki/Seeeduino-XIAO/img/Seeeduino-XIAO-pinout.jpg
Schematics: https://files.seeedstudio.com/wiki/Seeeduino-XIAO/res/Seeeduino-XIAO-v1.0-SCH-191112.pdf
Feature
TODO