From 2d851cfa9648808b96dcdda41846cc552094281e Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Tue, 16 Jun 2020 03:38:58 -0700 Subject: [PATCH 01/17] PyGamer Added support for the Adafruit Pygamer, a varient of the PyBadge. --- src/machine/board_pygamer.go | 147 +++++++++++++++++++++++++++++++++++ targets/pygamer.json | 8 ++ 2 files changed, 155 insertions(+) create mode 100644 src/machine/board_pygamer.go create mode 100644 targets/pygamer.json diff --git a/src/machine/board_pygamer.go b/src/machine/board_pygamer.go new file mode 100644 index 0000000000..ec55548d64 --- /dev/null +++ b/src/machine/board_pygamer.go @@ -0,0 +1,147 @@ +// +build sam,atsamd51,pygamer + +package machine + +import "device/sam" + +// used to reset into bootloader +const RESET_MAGIC_VALUE = 0xf01669ef + +// GPIO Pins +const ( + D0 = PB17 // UART0 RX/PWM available + D1 = PB16 // UART0 TX/PWM available + D2 = PB03 + D3 = PB02 + D4 = PA14 // PWM available + D5 = PA16 // PWM available + D6 = PA18 // PWM available + D7 = PB14 // built-in SD card slot + D8 = PA15 // built-in neopixel + D9 = PA19 // PWM available + D10 = PA20 // can be used for PWM or UART1 TX + D11 = PA21 // can be used for PWM or UART1 RX + D12 = PA22 // PWM available + D13 = PA23 // PWM available +) + +// Analog pins +const ( + A0 = PA02 // ADC/AIN[0] + A1 = PA05 // ADC/AIN[2] + A2 = PB08 // ADC/AIN[3] + A3 = PB09 // ADC/AIN[4] + A4 = PA04 // ADC/AIN[5] + A5 = PA06 // ADC/AIN[6] + A6 = PB01 // ADC/AIN[12]/VMEAS + A7 = PB04 // ADC/AIN[6]/LIGHT + A8 = D2 // ADC/AIN[14] + A9 = D3 // ADC/AIN[15] +) + +const ( + LED = D13 + NEOPIXELS = D8 + + SDCS = D7 // SD card slot + + LIGHTSENSOR = A7 + + BUTTON_LATCH = PB00 + BUTTON_OUT = PB30 + BUTTON_CLK = PB31 + + JOYY = PB06 + JOYX = PB07 + + TFT_DC = PB05 + TFT_CS = PB12 + TFT_RST = PA00 + TFT_LITE = PA01 + + SPEAKER_ENABLE = PA27 +) + +const ( + BUTTON_SELECT_MASK = 16 + BUTTON_START_MASK = 32 + BUTTON_A_MASK = 64 + BUTTON_B_MASK = 128 +) + +// UART0 aka USBCDC pins +const ( + USBCDC_DM_PIN = PA24 + USBCDC_DP_PIN = PA25 +) + +// UART1 pins +const ( + UART_TX_PIN = D1 + UART_RX_PIN = D0 +) + +// UART1 var is on SERCOM3, defined in atsamd51.go + +// UART2 pins +const ( + UART2_TX_PIN = A4 + UART2_RX_PIN = A5 +) + +// UART2 var is on SERCOM0, defined in atsamd51.go + +// I2C pins +const ( + SDA_PIN = PA12 // SDA: SERCOM2/PAD[0] + SCL_PIN = PA13 // SCL: SERCOM2/PAD[1] +) + +// I2C on the ItsyBitsy M4. +var ( + I2C0 = I2C{ + Bus: sam.SERCOM2_I2CM, + SERCOM: 2, + } +) + +// SPI pins +const ( + SPI0_SCK_PIN = PA17 // SCK: SERCOM1/PAD[1] + SPI0_MOSI_PIN = PB23 // MOSI: SERCOM1/PAD[3] + SPI0_MISO_PIN = PB22 // MISO: SERCOM1/PAD[2] +) + +// SPI on the PyGamer. +var ( + SPI0 = SPI{ + Bus: sam.SERCOM1_SPIM, + SERCOM: 1, + } +) + +// TFT SPI pins +const ( + SPI1_SCK_PIN = PB13 // SCK: SERCOM4/PAD[1] + SPI1_MOSI_PIN = PB15 // MOSI: SERCOM4/PAD[3] + SPI1_MISO_PIN = NoPin +) + +// TFT SPI on the PyGamer. +var ( + SPI1 = SPI{ + Bus: sam.SERCOM4_SPIM, + SERCOM: 4, + } +) + +// USB CDC identifiers +const ( + usb_STRING_PRODUCT = "Adafruit pyGamer M4" + usb_STRING_MANUFACTURER = "Adafruit" +) + +var ( + usb_VID uint16 = 0x239A + usb_PID uint16 = 0x8033 +) diff --git a/targets/pygamer.json b/targets/pygamer.json new file mode 100644 index 0000000000..a14460d349 --- /dev/null +++ b/targets/pygamer.json @@ -0,0 +1,8 @@ +{ + "inherits": ["atsamd51j19a"], + "build-tags": ["sam", "atsamd51j19a", "pygamer"], + "flash-1200-bps-reset": "true", + "flash-method": "msd", + "msd-volume-name": "PYGAMERBOOT", + "msd-firmware-name": "arcade.uf2" +} From beb1419bfafeb72002c219e94fae35b972553c41 Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Tue, 16 Jun 2020 04:19:45 -0700 Subject: [PATCH 02/17] changed SDCS to SD_CS Revised the name of variable to be in line with others of the same type. --- .gitignore | 4 ++++ src/machine/board_pygamer.go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 81ed9b6647..e5c2bfab5d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,7 @@ src/device/stm32/*.s vendor llvm-build llvm-project +src/device/.DS_Store +src/.DS_Store +compiler/.DS_Store +.DS_Store diff --git a/src/machine/board_pygamer.go b/src/machine/board_pygamer.go index ec55548d64..26db2fca49 100644 --- a/src/machine/board_pygamer.go +++ b/src/machine/board_pygamer.go @@ -16,7 +16,7 @@ const ( D4 = PA14 // PWM available D5 = PA16 // PWM available D6 = PA18 // PWM available - D7 = PB14 // built-in SD card slot + D7 = PB14 // CS for microSD card slot D8 = PA15 // built-in neopixel D9 = PA19 // PWM available D10 = PA20 // can be used for PWM or UART1 TX @@ -43,8 +43,8 @@ const ( LED = D13 NEOPIXELS = D8 - SDCS = D7 // SD card slot - + SD_CS = D7 + LIGHTSENSOR = A7 BUTTON_LATCH = PB00 From 7e3be400b00e1edc9108149d976f5f9cda208553 Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Tue, 16 Jun 2020 04:26:55 -0700 Subject: [PATCH 03/17] Revert "changed SDCS to SD_CS" This reverts commit beb1419bfafeb72002c219e94fae35b972553c41. --- .gitignore | 4 ---- src/machine/board_pygamer.go | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index e5c2bfab5d..81ed9b6647 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,3 @@ src/device/stm32/*.s vendor llvm-build llvm-project -src/device/.DS_Store -src/.DS_Store -compiler/.DS_Store -.DS_Store diff --git a/src/machine/board_pygamer.go b/src/machine/board_pygamer.go index 26db2fca49..ec55548d64 100644 --- a/src/machine/board_pygamer.go +++ b/src/machine/board_pygamer.go @@ -16,7 +16,7 @@ const ( D4 = PA14 // PWM available D5 = PA16 // PWM available D6 = PA18 // PWM available - D7 = PB14 // CS for microSD card slot + D7 = PB14 // built-in SD card slot D8 = PA15 // built-in neopixel D9 = PA19 // PWM available D10 = PA20 // can be used for PWM or UART1 TX @@ -43,8 +43,8 @@ const ( LED = D13 NEOPIXELS = D8 - SD_CS = D7 - + SDCS = D7 // SD card slot + LIGHTSENSOR = A7 BUTTON_LATCH = PB00 From 31f8710e2d88745ded04460836198a1c589855e3 Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Tue, 16 Jun 2020 04:27:43 -0700 Subject: [PATCH 04/17] Revert "Revert "changed SDCS to SD_CS"" This reverts commit 7e3be400b00e1edc9108149d976f5f9cda208553. --- .gitignore | 4 ++++ src/machine/board_pygamer.go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 81ed9b6647..e5c2bfab5d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,7 @@ src/device/stm32/*.s vendor llvm-build llvm-project +src/device/.DS_Store +src/.DS_Store +compiler/.DS_Store +.DS_Store diff --git a/src/machine/board_pygamer.go b/src/machine/board_pygamer.go index ec55548d64..26db2fca49 100644 --- a/src/machine/board_pygamer.go +++ b/src/machine/board_pygamer.go @@ -16,7 +16,7 @@ const ( D4 = PA14 // PWM available D5 = PA16 // PWM available D6 = PA18 // PWM available - D7 = PB14 // built-in SD card slot + D7 = PB14 // CS for microSD card slot D8 = PA15 // built-in neopixel D9 = PA19 // PWM available D10 = PA20 // can be used for PWM or UART1 TX @@ -43,8 +43,8 @@ const ( LED = D13 NEOPIXELS = D8 - SDCS = D7 // SD card slot - + SD_CS = D7 + LIGHTSENSOR = A7 BUTTON_LATCH = PB00 From c6902c3106d7708f7b3dd0c01b65cb5a01f02a01 Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Tue, 16 Jun 2020 04:33:29 -0700 Subject: [PATCH 05/17] Delete .gitignore --- .gitignore | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e5c2bfab5d..0000000000 --- a/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -build -docs/_build -src/device/avr/*.go -src/device/avr/*.ld -src/device/avr/*.s -src/device/nrf/*.go -src/device/nrf/*.s -src/device/sam/*.go -src/device/sam/*.s -src/device/sifive/*.go -src/device/sifive/*.s -src/device/stm32/*.go -src/device/stm32/*.s -vendor -llvm-build -llvm-project -src/device/.DS_Store -src/.DS_Store -compiler/.DS_Store -.DS_Store From ccedd2bf15cdeb5c68edb990b1a3d41dc2d0f493 Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Tue, 16 Jun 2020 14:05:04 -0700 Subject: [PATCH 06/17] Update board_pygamer.go --- src/machine/board_pygamer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/machine/board_pygamer.go b/src/machine/board_pygamer.go index 26db2fca49..7df9e0b29a 100644 --- a/src/machine/board_pygamer.go +++ b/src/machine/board_pygamer.go @@ -42,9 +42,9 @@ const ( const ( LED = D13 NEOPIXELS = D8 - - SD_CS = D7 - + + SD_CS = D7 + LIGHTSENSOR = A7 BUTTON_LATCH = PB00 From 03ddbd00793d67e45aea899182b453b5b6b089b0 Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Wed, 17 Jun 2020 00:09:37 -0700 Subject: [PATCH 07/17] restore .github --- .gitignore | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..81ed9b6647 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +build +docs/_build +src/device/avr/*.go +src/device/avr/*.ld +src/device/avr/*.s +src/device/nrf/*.go +src/device/nrf/*.s +src/device/sam/*.go +src/device/sam/*.s +src/device/sifive/*.go +src/device/sifive/*.s +src/device/stm32/*.go +src/device/stm32/*.s +vendor +llvm-build +llvm-project From d45cf285cf46850ad92a897be867bb56b0effc2e Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Wed, 17 Jun 2020 03:51:18 -0700 Subject: [PATCH 08/17] Corrected reference to board in comment --- src/machine/board_pygamer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/board_pygamer.go b/src/machine/board_pygamer.go index 7df9e0b29a..6719f0d069 100644 --- a/src/machine/board_pygamer.go +++ b/src/machine/board_pygamer.go @@ -97,7 +97,7 @@ const ( SCL_PIN = PA13 // SCL: SERCOM2/PAD[1] ) -// I2C on the ItsyBitsy M4. +// I2C on the PyGamer. var ( I2C0 = I2C{ Bus: sam.SERCOM2_I2CM, From 6a9e1f36d8dd70bd0e89799041ae582b2da1bb0c Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Wed, 17 Jun 2020 03:58:41 -0700 Subject: [PATCH 09/17] added smoke test for pygamer --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index bacd9b5d37..88d6c3d2b5 100644 --- a/Makefile +++ b/Makefile @@ -291,6 +291,8 @@ smoketest: @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=reelboard-s140v7 examples/blinky1 @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=pygamer examples/blinky1 + @$(MD5SUM) test.hex ifneq ($(AVR), 0) $(TINYGO) build -size short -o test.hex -target=atmega1284p examples/serial @$(MD5SUM) test.hex From 8a3d7c3d5f1a3f6c739354c7e05d704523fd4ce4 Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Wed, 17 Jun 2020 04:02:07 -0700 Subject: [PATCH 10/17] Update Makefile --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index bacd9b5d37..5870ce99dd 100644 --- a/Makefile +++ b/Makefile @@ -291,6 +291,8 @@ smoketest: @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=reelboard-s140v7 examples/blinky1 @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=pyportal examples/blinky1 + @$(MD5SUM) test.hex ifneq ($(AVR), 0) $(TINYGO) build -size short -o test.hex -target=atmega1284p examples/serial @$(MD5SUM) test.hex From 1e9b9047e9f1e7920095d8d13503b258324d1148 Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Wed, 17 Jun 2020 04:05:04 -0700 Subject: [PATCH 11/17] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5870ce99dd..88d6c3d2b5 100644 --- a/Makefile +++ b/Makefile @@ -291,7 +291,7 @@ smoketest: @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=reelboard-s140v7 examples/blinky1 @$(MD5SUM) test.hex - $(TINYGO) build -size short -o test.hex -target=pyportal examples/blinky1 + $(TINYGO) build -size short -o test.hex -target=pygamer examples/blinky1 @$(MD5SUM) test.hex ifneq ($(AVR), 0) $(TINYGO) build -size short -o test.hex -target=atmega1284p examples/serial From b8d30afcd7d0660cb6137e399a55ba9b329266dc Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Wed, 17 Jun 2020 04:11:49 -0700 Subject: [PATCH 12/17] resolved conflict with dev version --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 88d6c3d2b5..e76f262e31 100644 --- a/Makefile +++ b/Makefile @@ -291,6 +291,8 @@ smoketest: @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=reelboard-s140v7 examples/blinky1 @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=wioterminal examples/blinky1 + @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=pygamer examples/blinky1 @$(MD5SUM) test.hex ifneq ($(AVR), 0) From cb504e31220ee49e53efeb4fd2fc81ca899331b1 Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Thu, 18 Jun 2020 01:58:21 -0700 Subject: [PATCH 13/17] added pygamer to smoketest --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d16d77f82c..d02079a6fa 100644 --- a/Makefile +++ b/Makefile @@ -192,7 +192,7 @@ smoketest: $(TINYGO) build -size short -o test.hex -target=pca10040 examples/blinky2 @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=pca10040 examples/button - @$(MD5SUM) test.hex + @$(MD5SUM) test. $(TINYGO) build -size short -o test.hex -target=pca10040 examples/button2 @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=pca10040 examples/echo @@ -295,6 +295,8 @@ smoketest: @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=wioterminal examples/blinky1 @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=pygamer examples/blinky1 + @$(MD5SUM) test.hex ifneq ($(AVR), 0) $(TINYGO) build -size short -o test.hex -target=atmega1284p examples/serial @$(MD5SUM) test.hex From 697cb1835a8dab2d58cd2384afda4dd65bcc47e0 Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Thu, 18 Jun 2020 02:00:54 -0700 Subject: [PATCH 14/17] added pygamer to board --- src/machine/board_pygamer.go | 147 +++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 src/machine/board_pygamer.go diff --git a/src/machine/board_pygamer.go b/src/machine/board_pygamer.go new file mode 100644 index 0000000000..6719f0d069 --- /dev/null +++ b/src/machine/board_pygamer.go @@ -0,0 +1,147 @@ +// +build sam,atsamd51,pygamer + +package machine + +import "device/sam" + +// used to reset into bootloader +const RESET_MAGIC_VALUE = 0xf01669ef + +// GPIO Pins +const ( + D0 = PB17 // UART0 RX/PWM available + D1 = PB16 // UART0 TX/PWM available + D2 = PB03 + D3 = PB02 + D4 = PA14 // PWM available + D5 = PA16 // PWM available + D6 = PA18 // PWM available + D7 = PB14 // CS for microSD card slot + D8 = PA15 // built-in neopixel + D9 = PA19 // PWM available + D10 = PA20 // can be used for PWM or UART1 TX + D11 = PA21 // can be used for PWM or UART1 RX + D12 = PA22 // PWM available + D13 = PA23 // PWM available +) + +// Analog pins +const ( + A0 = PA02 // ADC/AIN[0] + A1 = PA05 // ADC/AIN[2] + A2 = PB08 // ADC/AIN[3] + A3 = PB09 // ADC/AIN[4] + A4 = PA04 // ADC/AIN[5] + A5 = PA06 // ADC/AIN[6] + A6 = PB01 // ADC/AIN[12]/VMEAS + A7 = PB04 // ADC/AIN[6]/LIGHT + A8 = D2 // ADC/AIN[14] + A9 = D3 // ADC/AIN[15] +) + +const ( + LED = D13 + NEOPIXELS = D8 + + SD_CS = D7 + + LIGHTSENSOR = A7 + + BUTTON_LATCH = PB00 + BUTTON_OUT = PB30 + BUTTON_CLK = PB31 + + JOYY = PB06 + JOYX = PB07 + + TFT_DC = PB05 + TFT_CS = PB12 + TFT_RST = PA00 + TFT_LITE = PA01 + + SPEAKER_ENABLE = PA27 +) + +const ( + BUTTON_SELECT_MASK = 16 + BUTTON_START_MASK = 32 + BUTTON_A_MASK = 64 + BUTTON_B_MASK = 128 +) + +// UART0 aka USBCDC pins +const ( + USBCDC_DM_PIN = PA24 + USBCDC_DP_PIN = PA25 +) + +// UART1 pins +const ( + UART_TX_PIN = D1 + UART_RX_PIN = D0 +) + +// UART1 var is on SERCOM3, defined in atsamd51.go + +// UART2 pins +const ( + UART2_TX_PIN = A4 + UART2_RX_PIN = A5 +) + +// UART2 var is on SERCOM0, defined in atsamd51.go + +// I2C pins +const ( + SDA_PIN = PA12 // SDA: SERCOM2/PAD[0] + SCL_PIN = PA13 // SCL: SERCOM2/PAD[1] +) + +// I2C on the PyGamer. +var ( + I2C0 = I2C{ + Bus: sam.SERCOM2_I2CM, + SERCOM: 2, + } +) + +// SPI pins +const ( + SPI0_SCK_PIN = PA17 // SCK: SERCOM1/PAD[1] + SPI0_MOSI_PIN = PB23 // MOSI: SERCOM1/PAD[3] + SPI0_MISO_PIN = PB22 // MISO: SERCOM1/PAD[2] +) + +// SPI on the PyGamer. +var ( + SPI0 = SPI{ + Bus: sam.SERCOM1_SPIM, + SERCOM: 1, + } +) + +// TFT SPI pins +const ( + SPI1_SCK_PIN = PB13 // SCK: SERCOM4/PAD[1] + SPI1_MOSI_PIN = PB15 // MOSI: SERCOM4/PAD[3] + SPI1_MISO_PIN = NoPin +) + +// TFT SPI on the PyGamer. +var ( + SPI1 = SPI{ + Bus: sam.SERCOM4_SPIM, + SERCOM: 4, + } +) + +// USB CDC identifiers +const ( + usb_STRING_PRODUCT = "Adafruit pyGamer M4" + usb_STRING_MANUFACTURER = "Adafruit" +) + +var ( + usb_VID uint16 = 0x239A + usb_PID uint16 = 0x8033 +) From 0478dd5fc34759582af9b3eabc7b9f6ac93d2c79 Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Thu, 18 Jun 2020 02:02:48 -0700 Subject: [PATCH 15/17] Adding Board: PyGamer --- targets/pygamer.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 targets/pygamer.json diff --git a/targets/pygamer.json b/targets/pygamer.json new file mode 100644 index 0000000000..a14460d349 --- /dev/null +++ b/targets/pygamer.json @@ -0,0 +1,8 @@ +{ + "inherits": ["atsamd51j19a"], + "build-tags": ["sam", "atsamd51j19a", "pygamer"], + "flash-1200-bps-reset": "true", + "flash-method": "msd", + "msd-volume-name": "PYGAMERBOOT", + "msd-firmware-name": "arcade.uf2" +} From 45fee093b39e466c1b21e29750029cd1c206a31c Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Thu, 18 Jun 2020 02:05:20 -0700 Subject: [PATCH 16/17] resolve conflict between master and dev --- Makefile | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e76f262e31..d02079a6fa 100644 --- a/Makefile +++ b/Makefile @@ -182,7 +182,7 @@ tinygo-test: .PHONY: smoketest smoketest: $(TINYGO) version - # test all examples + # test all examples (except pwm) $(TINYGO) build -size short -o test.hex -target=pca10040 examples/blinky1 @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=pca10040 examples/adc @@ -192,7 +192,7 @@ smoketest: $(TINYGO) build -size short -o test.hex -target=pca10040 examples/blinky2 @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=pca10040 examples/button - @$(MD5SUM) test.hex + @$(MD5SUM) test. $(TINYGO) build -size short -o test.hex -target=pca10040 examples/button2 @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=pca10040 examples/echo @@ -203,7 +203,7 @@ smoketest: @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=microbit examples/microbit-blink @$(MD5SUM) test.hex - $(TINYGO) build -size short -o test.hex -target=pca10040 examples/pwm + $(TINYGO) build -size short -o test.hex -target=pca10040 examples/pininterrupt @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=pca10040 examples/serial @$(MD5SUM) test.hex @@ -231,6 +231,8 @@ smoketest: @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=microbit examples/echo @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=microbit-s110v8 examples/echo + @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=nrf52840-mdk examples/blinky1 @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=pca10031 examples/blinky1 @@ -300,6 +302,8 @@ ifneq ($(AVR), 0) @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=arduino examples/blinky1 @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=arduino examples/pwm + @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=arduino -scheduler=tasks examples/blinky1 @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=arduino-nano examples/blinky1 @@ -314,7 +318,10 @@ endif $(TINYGO) build -o wasm.wasm -target=wasm examples/wasm/export $(TINYGO) build -o wasm.wasm -target=wasm examples/wasm/main -release: tinygo gen-device wasi-libc +wasmtest: + $(GO) test ./tests/wasm + +build/release: tinygo gen-device wasi-libc @mkdir -p build/release/tinygo/bin @mkdir -p build/release/tinygo/lib/clang/include @mkdir -p build/release/tinygo/lib/CMSIS/CMSIS @@ -349,4 +356,13 @@ release: tinygo gen-device wasi-libc ./build/tinygo build-library -target=armv6m-none-eabi -o build/release/tinygo/pkg/armv6m-none-eabi/picolibc.a picolibc ./build/tinygo build-library -target=armv7m-none-eabi -o build/release/tinygo/pkg/armv7m-none-eabi/picolibc.a picolibc ./build/tinygo build-library -target=armv7em-none-eabi -o build/release/tinygo/pkg/armv7em-none-eabi/picolibc.a picolibc + +release: build/release tar -czf build/release.tar.gz -C build/release tinygo + +deb: build/release + @mkdir -p build/release-deb/usr/local/bin + @mkdir -p build/release-deb/usr/local/lib + cp -ar build/release/tinygo build/release-deb/usr/local/lib/tinygo + ln -sf ../lib/tinygo/bin/tinygo build/release-deb/usr/local/bin/tinygo + fpm -f -s dir -t deb -n tinygo -v $(shell grep "const Version = " goenv/version.go | awk '{print $$NF}') -m '@tinygo-org' --description='TinyGo is a Go compiler for small places.' --license='BSD 3-Clause' --url=https://tinygo.org/ --deb-changelog CHANGELOG.md -p build/release.deb -C ./build/release-deb From 43f1492f6f7701277f2adb59f3affdf218bfea2e Mon Sep 17 00:00:00 2001 From: APDevice <59993100+APDevice@users.noreply.github.com> Date: Thu, 18 Jun 2020 02:16:27 -0700 Subject: [PATCH 17/17] corrected missing extension --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d02079a6fa..743f0736d3 100644 --- a/Makefile +++ b/Makefile @@ -192,7 +192,7 @@ smoketest: $(TINYGO) build -size short -o test.hex -target=pca10040 examples/blinky2 @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=pca10040 examples/button - @$(MD5SUM) test. + @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=pca10040 examples/button2 @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=pca10040 examples/echo