From 9817f612ebde262c5785c94868e624b403329cc7 Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Wed, 4 Dec 2024 12:54:55 +0000 Subject: [PATCH] Split out builds. --- .github/workflows/micropython.yml | 6 ++-- .../manifest.py | 0 .../manifest.txt | 0 .../mpconfigboard.cmake | 0 .../mpconfigboard.h | 4 +-- .../pins.csv | 0 boards/pico2_w_galactic/usermodules.cmake | 3 ++ boards/pico2_w_unicorn/usermodules.cmake | 7 ----- .../manifest.py | 0 .../manifest.txt | 0 .../mpconfigboard.cmake | 0 .../mpconfigboard.h | 4 +-- .../pins.csv | 0 .../usermodules.cmake | 2 +- boards/pico_w_galactic/manifest.py | 2 ++ boards/pico_w_galactic/manifest.txt | 3 ++ boards/pico_w_galactic/mpconfigboard.cmake | 17 +++++++++++ boards/pico_w_galactic/mpconfigboard.h | 14 +++++++++ boards/pico_w_galactic/pins.csv | 30 +++++++++++++++++++ boards/pico_w_galactic/usermodules.cmake | 3 ++ boards/pico_w_stellar/manifest.py | 2 ++ boards/pico_w_stellar/manifest.txt | 3 ++ boards/pico_w_stellar/mpconfigboard.cmake | 17 +++++++++++ boards/pico_w_stellar/mpconfigboard.h | 14 +++++++++ boards/pico_w_stellar/pins.csv | 30 +++++++++++++++++++ boards/pico_w_stellar/usermodules.cmake | 3 ++ boards/usermod-common.cmake | 4 +-- 27 files changed, 151 insertions(+), 17 deletions(-) rename boards/{pico2_w_unicorn => pico2_w_galactic}/manifest.py (100%) rename boards/{pico2_w_unicorn => pico2_w_galactic}/manifest.txt (100%) rename boards/{pico2_w_unicorn => pico2_w_galactic}/mpconfigboard.cmake (100%) rename boards/{pico2_w_unicorn => pico2_w_galactic}/mpconfigboard.h (84%) rename boards/{pico2_w_unicorn => pico2_w_galactic}/pins.csv (100%) create mode 100644 boards/pico2_w_galactic/usermodules.cmake delete mode 100644 boards/pico2_w_unicorn/usermodules.cmake rename boards/{pico_w_unicorn => pico_w_cosmic}/manifest.py (100%) rename boards/{pico_w_unicorn => pico_w_cosmic}/manifest.txt (100%) rename boards/{pico_w_unicorn => pico_w_cosmic}/mpconfigboard.cmake (100%) rename boards/{pico_w_unicorn => pico_w_cosmic}/mpconfigboard.h (84%) rename boards/{pico_w_unicorn => pico_w_cosmic}/pins.csv (100%) rename boards/{pico_w_unicorn => pico_w_cosmic}/usermodules.cmake (79%) create mode 100644 boards/pico_w_galactic/manifest.py create mode 100644 boards/pico_w_galactic/manifest.txt create mode 100644 boards/pico_w_galactic/mpconfigboard.cmake create mode 100644 boards/pico_w_galactic/mpconfigboard.h create mode 100644 boards/pico_w_galactic/pins.csv create mode 100644 boards/pico_w_galactic/usermodules.cmake create mode 100644 boards/pico_w_stellar/manifest.py create mode 100644 boards/pico_w_stellar/manifest.txt create mode 100644 boards/pico_w_stellar/mpconfigboard.cmake create mode 100644 boards/pico_w_stellar/mpconfigboard.h create mode 100644 boards/pico_w_stellar/pins.csv create mode 100644 boards/pico_w_stellar/usermodules.cmake diff --git a/.github/workflows/micropython.yml b/.github/workflows/micropython.yml index fe64f7d..6fcd90c 100644 --- a/.github/workflows/micropython.yml +++ b/.github/workflows/micropython.yml @@ -14,8 +14,10 @@ jobs: strategy: matrix: include: - - name: pico_w_unicorn - - name: pico2_w_unicorn + - name: pico_w_galactic + - name: pico_w_cosmic + - name: pico_w_stellar + - name: pico2_w_galactic env: # MicroPython version will be contained in github.event.release.tag_name for releases diff --git a/boards/pico2_w_unicorn/manifest.py b/boards/pico2_w_galactic/manifest.py similarity index 100% rename from boards/pico2_w_unicorn/manifest.py rename to boards/pico2_w_galactic/manifest.py diff --git a/boards/pico2_w_unicorn/manifest.txt b/boards/pico2_w_galactic/manifest.txt similarity index 100% rename from boards/pico2_w_unicorn/manifest.txt rename to boards/pico2_w_galactic/manifest.txt diff --git a/boards/pico2_w_unicorn/mpconfigboard.cmake b/boards/pico2_w_galactic/mpconfigboard.cmake similarity index 100% rename from boards/pico2_w_unicorn/mpconfigboard.cmake rename to boards/pico2_w_galactic/mpconfigboard.cmake diff --git a/boards/pico2_w_unicorn/mpconfigboard.h b/boards/pico2_w_galactic/mpconfigboard.h similarity index 84% rename from boards/pico2_w_unicorn/mpconfigboard.h rename to boards/pico2_w_galactic/mpconfigboard.h index b0b9a63..67ab2ac 100644 --- a/boards/pico2_w_unicorn/mpconfigboard.h +++ b/boards/pico2_w_galactic/mpconfigboard.h @@ -1,12 +1,12 @@ // Board and hardware specific configuration -#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico2 W (Unicorn)" +#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico2 W (Galactic Unicorn)" // Leave 50/50 split - 2MB firmware, 2MB user filesystem #define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - (2 * 1024 * 1024)) // Enable networking. #define MICROPY_PY_NETWORK_PPP_LWIP (1) -#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "Unicorn2W" +#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "GalacticUnicorn2W" #include "enable_cyw43.h" // For debugging mbedtls - also set diff --git a/boards/pico2_w_unicorn/pins.csv b/boards/pico2_w_galactic/pins.csv similarity index 100% rename from boards/pico2_w_unicorn/pins.csv rename to boards/pico2_w_galactic/pins.csv diff --git a/boards/pico2_w_galactic/usermodules.cmake b/boards/pico2_w_galactic/usermodules.cmake new file mode 100644 index 0000000..57ecac5 --- /dev/null +++ b/boards/pico2_w_galactic/usermodules.cmake @@ -0,0 +1,3 @@ +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../") +set(UNICORN "galactic") +include(usermod-common) \ No newline at end of file diff --git a/boards/pico2_w_unicorn/usermodules.cmake b/boards/pico2_w_unicorn/usermodules.cmake deleted file mode 100644 index dd61004..0000000 --- a/boards/pico2_w_unicorn/usermodules.cmake +++ /dev/null @@ -1,7 +0,0 @@ -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../") - -include(galactic_unicorn/micropython) -include(cosmic_unicorn/micropython) -include(stellar_unicorn/micropython) - -include(usermod-common) \ No newline at end of file diff --git a/boards/pico_w_unicorn/manifest.py b/boards/pico_w_cosmic/manifest.py similarity index 100% rename from boards/pico_w_unicorn/manifest.py rename to boards/pico_w_cosmic/manifest.py diff --git a/boards/pico_w_unicorn/manifest.txt b/boards/pico_w_cosmic/manifest.txt similarity index 100% rename from boards/pico_w_unicorn/manifest.txt rename to boards/pico_w_cosmic/manifest.txt diff --git a/boards/pico_w_unicorn/mpconfigboard.cmake b/boards/pico_w_cosmic/mpconfigboard.cmake similarity index 100% rename from boards/pico_w_unicorn/mpconfigboard.cmake rename to boards/pico_w_cosmic/mpconfigboard.cmake diff --git a/boards/pico_w_unicorn/mpconfigboard.h b/boards/pico_w_cosmic/mpconfigboard.h similarity index 84% rename from boards/pico_w_unicorn/mpconfigboard.h rename to boards/pico_w_cosmic/mpconfigboard.h index 07df8fd..7c23dc7 100644 --- a/boards/pico_w_unicorn/mpconfigboard.h +++ b/boards/pico_w_cosmic/mpconfigboard.h @@ -1,12 +1,12 @@ // Board and hardware specific configuration -#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico W (Unicorn)" +#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico W (Cosmic Unicorn)" // Leave 848k for user filesystem #define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - (1200 * 1024)) // Enable networking. #define MICROPY_PY_NETWORK_PPP_LWIP (1) -#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "Unicorn" +#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "CosmicUnicorn" #include "enable_cyw43.h" // For debugging mbedtls - also set diff --git a/boards/pico_w_unicorn/pins.csv b/boards/pico_w_cosmic/pins.csv similarity index 100% rename from boards/pico_w_unicorn/pins.csv rename to boards/pico_w_cosmic/pins.csv diff --git a/boards/pico_w_unicorn/usermodules.cmake b/boards/pico_w_cosmic/usermodules.cmake similarity index 79% rename from boards/pico_w_unicorn/usermodules.cmake rename to boards/pico_w_cosmic/usermodules.cmake index 591fa5e..a4e2261 100644 --- a/boards/pico_w_unicorn/usermodules.cmake +++ b/boards/pico_w_cosmic/usermodules.cmake @@ -1,3 +1,3 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../") - +set(UNICORN "cosmic") include(usermod-common) diff --git a/boards/pico_w_galactic/manifest.py b/boards/pico_w_galactic/manifest.py new file mode 100644 index 0000000..b3fede1 --- /dev/null +++ b/boards/pico_w_galactic/manifest.py @@ -0,0 +1,2 @@ +include("$(PORT_DIR)/boards/manifest.py") +include("../manifest-common.py") \ No newline at end of file diff --git a/boards/pico_w_galactic/manifest.txt b/boards/pico_w_galactic/manifest.txt new file mode 100644 index 0000000..05cb090 --- /dev/null +++ b/boards/pico_w_galactic/manifest.txt @@ -0,0 +1,3 @@ +*.py +lib/* +lib/*/* \ No newline at end of file diff --git a/boards/pico_w_galactic/mpconfigboard.cmake b/boards/pico_w_galactic/mpconfigboard.cmake new file mode 100644 index 0000000..7feece0 --- /dev/null +++ b/boards/pico_w_galactic/mpconfigboard.cmake @@ -0,0 +1,17 @@ +# cmake file for Pimoroni Inky with Raspberry Pi Pico W +set(MICROPY_BOARD RPI_PICO_W) +set(PICO_BOARD "pico_w") + +# The C malloc is needed by cyw43-driver Bluetooth and Pimoroni Pico modules +set(MICROPY_C_HEAP_SIZE 4096) + +set(MICROPY_PY_LWIP ON) +set(MICROPY_PY_NETWORK_CYW43 ON) + +# Bluetooth +set(MICROPY_PY_BLUETOOTH ON) +set(MICROPY_BLUETOOTH_BTSTACK ON) +set(MICROPY_PY_BLUETOOTH_CYW43 ON) + +# Board specific version of the frozen manifest +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) \ No newline at end of file diff --git a/boards/pico_w_galactic/mpconfigboard.h b/boards/pico_w_galactic/mpconfigboard.h new file mode 100644 index 0000000..6272dcc --- /dev/null +++ b/boards/pico_w_galactic/mpconfigboard.h @@ -0,0 +1,14 @@ +// Board and hardware specific configuration +#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico W (Galactic Unicorn)" + +// Leave 848k for user filesystem +#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - (1200 * 1024)) + +// Enable networking. +#define MICROPY_PY_NETWORK_PPP_LWIP (1) +#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "GalacticUnicorn" +#include "enable_cyw43.h" + +// For debugging mbedtls - also set +// Debug level (0-4) 1=warning, 2=info, 3=debug, 4=verbose +// #define MODUSSL_MBEDTLS_DEBUG_LEVEL 1 diff --git a/boards/pico_w_galactic/pins.csv b/boards/pico_w_galactic/pins.csv new file mode 100644 index 0000000..8debb63 --- /dev/null +++ b/boards/pico_w_galactic/pins.csv @@ -0,0 +1,30 @@ +GP0,GPIO0 +GP1,GPIO1 +GP2,GPIO2 +GP3,GPIO3 +GP4,GPIO4 +GP5,GPIO5 +GP6,GPIO6 +GP7,GPIO7 +GP8,GPIO8 +GP9,GPIO9 +GP10,GPIO10 +GP11,GPIO11 +GP12,GPIO12 +GP13,GPIO13 +GP14,GPIO14 +GP15,GPIO15 +GP16,GPIO16 +GP17,GPIO17 +GP18,GPIO18 +GP19,GPIO19 +GP20,GPIO20 +GP21,GPIO21 +GP22,GPIO22 +GP26,GPIO26 +GP27,GPIO27 +GP28,GPIO28 +WL_GPIO0,EXT_GPIO0 +WL_GPIO1,EXT_GPIO1 +WL_GPIO2,EXT_GPIO2 +LED,EXT_GPIO0 diff --git a/boards/pico_w_galactic/usermodules.cmake b/boards/pico_w_galactic/usermodules.cmake new file mode 100644 index 0000000..49df3aa --- /dev/null +++ b/boards/pico_w_galactic/usermodules.cmake @@ -0,0 +1,3 @@ +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../") +set(UNICORN "galactic") +include(usermod-common) diff --git a/boards/pico_w_stellar/manifest.py b/boards/pico_w_stellar/manifest.py new file mode 100644 index 0000000..b3fede1 --- /dev/null +++ b/boards/pico_w_stellar/manifest.py @@ -0,0 +1,2 @@ +include("$(PORT_DIR)/boards/manifest.py") +include("../manifest-common.py") \ No newline at end of file diff --git a/boards/pico_w_stellar/manifest.txt b/boards/pico_w_stellar/manifest.txt new file mode 100644 index 0000000..05cb090 --- /dev/null +++ b/boards/pico_w_stellar/manifest.txt @@ -0,0 +1,3 @@ +*.py +lib/* +lib/*/* \ No newline at end of file diff --git a/boards/pico_w_stellar/mpconfigboard.cmake b/boards/pico_w_stellar/mpconfigboard.cmake new file mode 100644 index 0000000..7feece0 --- /dev/null +++ b/boards/pico_w_stellar/mpconfigboard.cmake @@ -0,0 +1,17 @@ +# cmake file for Pimoroni Inky with Raspberry Pi Pico W +set(MICROPY_BOARD RPI_PICO_W) +set(PICO_BOARD "pico_w") + +# The C malloc is needed by cyw43-driver Bluetooth and Pimoroni Pico modules +set(MICROPY_C_HEAP_SIZE 4096) + +set(MICROPY_PY_LWIP ON) +set(MICROPY_PY_NETWORK_CYW43 ON) + +# Bluetooth +set(MICROPY_PY_BLUETOOTH ON) +set(MICROPY_BLUETOOTH_BTSTACK ON) +set(MICROPY_PY_BLUETOOTH_CYW43 ON) + +# Board specific version of the frozen manifest +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) \ No newline at end of file diff --git a/boards/pico_w_stellar/mpconfigboard.h b/boards/pico_w_stellar/mpconfigboard.h new file mode 100644 index 0000000..a6c8de9 --- /dev/null +++ b/boards/pico_w_stellar/mpconfigboard.h @@ -0,0 +1,14 @@ +// Board and hardware specific configuration +#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico W (Stellar Unicorn)" + +// Leave 848k for user filesystem +#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - (1200 * 1024)) + +// Enable networking. +#define MICROPY_PY_NETWORK_PPP_LWIP (1) +#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "StellarUnicorn" +#include "enable_cyw43.h" + +// For debugging mbedtls - also set +// Debug level (0-4) 1=warning, 2=info, 3=debug, 4=verbose +// #define MODUSSL_MBEDTLS_DEBUG_LEVEL 1 diff --git a/boards/pico_w_stellar/pins.csv b/boards/pico_w_stellar/pins.csv new file mode 100644 index 0000000..8debb63 --- /dev/null +++ b/boards/pico_w_stellar/pins.csv @@ -0,0 +1,30 @@ +GP0,GPIO0 +GP1,GPIO1 +GP2,GPIO2 +GP3,GPIO3 +GP4,GPIO4 +GP5,GPIO5 +GP6,GPIO6 +GP7,GPIO7 +GP8,GPIO8 +GP9,GPIO9 +GP10,GPIO10 +GP11,GPIO11 +GP12,GPIO12 +GP13,GPIO13 +GP14,GPIO14 +GP15,GPIO15 +GP16,GPIO16 +GP17,GPIO17 +GP18,GPIO18 +GP19,GPIO19 +GP20,GPIO20 +GP21,GPIO21 +GP22,GPIO22 +GP26,GPIO26 +GP27,GPIO27 +GP28,GPIO28 +WL_GPIO0,EXT_GPIO0 +WL_GPIO1,EXT_GPIO1 +WL_GPIO2,EXT_GPIO2 +LED,EXT_GPIO0 diff --git a/boards/pico_w_stellar/usermodules.cmake b/boards/pico_w_stellar/usermodules.cmake new file mode 100644 index 0000000..fe5d56f --- /dev/null +++ b/boards/pico_w_stellar/usermodules.cmake @@ -0,0 +1,3 @@ +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../") +set(UNICORN "stellar") +include(usermod-common) diff --git a/boards/usermod-common.cmake b/boards/usermod-common.cmake index 5bd7ec4..a8a58aa 100644 --- a/boards/usermod-common.cmake +++ b/boards/usermod-common.cmake @@ -38,9 +38,7 @@ include(adcfft/micropython) # LEDs & Matrices include(plasma/micropython) -include(galactic_unicorn/micropython) -include(cosmic_unicorn/micropython) -include(stellar_unicorn/micropython) +include(${UNICORN}_unicorn/micropython) # Servos & Motors include(pwm/micropython)