Skip to content
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

Add CryptoAuth Trust Platform to the target list #3527

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ The following 94 microcontroller boards are currently supported:
* [BBC micro:bit](https://microbit.org/)
* [BBC micro:bit v2](https://microbit.org/new-microbit/)
* [blues wireless Swan](https://blues.io/products/swan/)
* [CryptoAuth Trust Platform](https://www.microchip.com/en-us/development-tool/DM320118)
* [Digispark](http://digistump.com/products/1)
* [Dragino LoRaWAN GPS Tracker LGT-92](http://www.dragino.com/products/lora-lorawan-end-node/item/142-lgt-92.html)
* [ESP32 - Core board](https://www.espressif.com/en/products/socs/esp32)
Expand Down
48 changes: 48 additions & 0 deletions src/machine/board_cryptoauth.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package machine
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file needs to have the following build tag in order to work correctly:

//go:build sam && atsamd21 && cryptoauth


const (
LED Pin = PA02
)

const (
SPI0_SCK_PIN = PA19
SPI0_SDO_PIN = PA16
SPI0_SDI_PIN = PA18
)

const (
UART_TX_PIN = PA22
UART_RX_PIN = PA23
)

var (
DefaultUART = &sercomUSART0
)

var (
I2C0 = sercomI2CM0
I2C1 = sercomI2CM1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably remove I2C1 thru I2C3 and just leave I2C0.

I2C2 = sercomI2CM2
I2C3 = sercomI2CM3
)

const (
SDA_PIN = PA08
SCL_PIN = PA09
I2S_SCK_PIN = PA13
I2S_WS_PIN = NoPin
I2S_SD_PIN = PA11
resetMagicValue = 0xf01669ef
)

const (
USBCDC_DM_PIN = PA24
USBCDC_DP_PIN = PA25
usb_STRING_PRODUCT = "CryptoAuth Trust Platform"
usb_STRING_MANUFACTURER = "Microchip"
)

var (
usb_VID uint16 = 0x03eb
usb_PID uint16 = 0x2175
)
10 changes: 10 additions & 0 deletions targets/cryptoauth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"inherits": [
"atsamd21e18a"
],
"build-tags": ["cryptoauth"],
"serial-port": ["03eb:2175"],
"serial": "usb",
"flash-method": "openocd",
"openocd-interface": "cmsis-dap"
}