diff --git a/ports/rp2/boards/PIMORONI_TINY2040/board.json b/ports/rp2/boards/PIMORONI_TINY2040/board.json index 207647f6b..19aad2d11 100644 --- a/ports/rp2/boards/PIMORONI_TINY2040/board.json +++ b/ports/rp2/boards/PIMORONI_TINY2040/board.json @@ -16,5 +16,8 @@ "product": "Tiny2040", "thumbnail": "", "url": "https://shop.pimoroni.com/products/tiny-2040", + "variants": { + "FLASH_8M": "8 MiB Flash" + }, "vendor": "Pimoroni" } diff --git a/ports/rp2/boards/PIMORONI_TINY2040/mpconfigboard.h b/ports/rp2/boards/PIMORONI_TINY2040/mpconfigboard.h index ea40a8071..a38e09aca 100644 --- a/ports/rp2/boards/PIMORONI_TINY2040/mpconfigboard.h +++ b/ports/rp2/boards/PIMORONI_TINY2040/mpconfigboard.h @@ -1,7 +1,9 @@ // https://shop.pimoroni.com/products/tiny-2040 -#define MICROPY_HW_BOARD_NAME "Pimoroni Tiny 2040" -#define MICROPY_HW_FLASH_STORAGE_BYTES (7 * 1024 * 1024) +#ifndef MICROPY_HW_BOARD_NAME +#define MICROPY_HW_BOARD_NAME "Pimoroni Tiny 2040 8MB" +#endif +#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - (1 * 1024 * 1024)) #define MICROPY_HW_USB_VID (0x16D0) #define MICROPY_HW_USB_PID (0x08C7) @@ -9,10 +11,3 @@ // I2C0 (non-default) #define MICROPY_HW_I2C0_SCL (4) #define MICROPY_HW_I2C0_SDA (5) - -// RGB LED, active low -// Red LED 18 -// Green LED 19 -// Blue LED 20 - -// Boot button GPIO23 diff --git a/ports/rp2/boards/PIMORONI_TINY2040/mpconfigvariant.cmake b/ports/rp2/boards/PIMORONI_TINY2040/mpconfigvariant.cmake new file mode 100644 index 000000000..f7e122613 --- /dev/null +++ b/ports/rp2/boards/PIMORONI_TINY2040/mpconfigvariant.cmake @@ -0,0 +1,6 @@ +set(PICO_BOARD "pimoroni_tiny2040_2mb") + +# Override the MicroPython board name +list(APPEND MICROPY_DEF_BOARD + MICROPY_HW_BOARD_NAME="Pimoroni Tiny 2040 2MB" +) \ No newline at end of file diff --git a/ports/rp2/boards/PIMORONI_TINY2040/mpconfigvariant_FLASH_8M.cmake b/ports/rp2/boards/PIMORONI_TINY2040/mpconfigvariant_FLASH_8M.cmake new file mode 100644 index 000000000..dd35f8f0a --- /dev/null +++ b/ports/rp2/boards/PIMORONI_TINY2040/mpconfigvariant_FLASH_8M.cmake @@ -0,0 +1,6 @@ +set(PICO_BOARD "pimoroni_tiny2040") + +# Override the MicroPython board name +list(APPEND MICROPY_DEF_BOARD + MICROPY_HW_BOARD_NAME="Pimoroni Tiny 2040 8MB" +) \ No newline at end of file diff --git a/ports/rp2/boards/PIMORONI_TINY2040/pins.csv b/ports/rp2/boards/PIMORONI_TINY2040/pins.csv index e4add1b0b..4f3874307 100644 --- a/ports/rp2/boards/PIMORONI_TINY2040/pins.csv +++ b/ports/rp2/boards/PIMORONI_TINY2040/pins.csv @@ -1 +1,17 @@ +GP0,GPIO0 +GP1,GPIO1 +GP2,GPIO2 +GP3,GPIO3 +GP4,GPIO4 +GP5,GPIO5 +GP6,GPIO6 +GP7,GPIO7 +LED_RED,GPIO18 +LED_GREEN,GPIO19 +LED_BLUE,GPIO20 +BOOT,GPIO23 +GP26,GPIO26 +GP27,GPIO27 +GP28,GPIO28 +GP29,GPIO29 LED,GPIO19