kopia lustrzana https://github.com/pimoroni/pimoroni-pico
CI: All MicroPython builds use local board dirs.
Simplify the build to use *only* local (to pimoroni-pico) copies of MicroPython board config dirs. This allows us to specify MICROPY_C_HEAP_SIZE (and potentially other options) in board config rather than at build-time.pull/764/head
rodzic
dd4347dac3
commit
e90ae33a99
|
@ -78,10 +78,8 @@ jobs:
|
|||
board: PIMORONI_PICOLIPO_16MB
|
||||
- name: tufty2040
|
||||
board: PIMORONI_TUFTY2040
|
||||
local_board_dir: true
|
||||
- name: enviro
|
||||
board: PICO_W_ENVIRO
|
||||
local_board_dir: true
|
||||
patch: true
|
||||
- name: galactic_unicorn
|
||||
board: PICO_W
|
||||
|
@ -89,7 +87,6 @@ jobs:
|
|||
board: PICO_W
|
||||
- name: inky_frame
|
||||
board: PICO_W_INKY
|
||||
local_board_dir: true
|
||||
patch: true
|
||||
|
||||
env:
|
||||
|
@ -145,20 +142,12 @@ jobs:
|
|||
run: |
|
||||
$GITHUB_WORKSPACE/pimoroni-pico-${{ github.sha }}/micropython/board/pico-sdk-patch.sh ${{matrix.board}}
|
||||
|
||||
- name: Configure MicroPython (Local Board Dir)
|
||||
if: matrix.local_board_dir == true
|
||||
- name: Configure MicroPython
|
||||
shell: bash
|
||||
working-directory: micropython/ports/rp2
|
||||
run: |
|
||||
cmake -S . -B build-${{matrix.name}} -DPICO_BUILD_DOCS=0 -DUSER_C_MODULES=${{env.USER_C_MODULES}} -DMICROPY_BOARD_DIR=${{env.MICROPY_BOARD_DIR}} -DMICROPY_C_HEAP_SIZE=4096 -DMICROPY_BOARD=${{matrix.board}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Configure MicroPython (Upstream Board Dir)
|
||||
if: matrix.local_board_dir != true
|
||||
shell: bash
|
||||
working-directory: micropython/ports/rp2
|
||||
run: |
|
||||
cmake -S . -B build-${{matrix.name}} -DPICO_BUILD_DOCS=0 -DUSER_C_MODULES=${{env.USER_C_MODULES}} -DMICROPY_C_HEAP_SIZE=4096 -DMICROPY_BOARD=${{matrix.board}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
cmake -S . -B build-${{matrix.name}} -DPICO_BUILD_DOCS=0 -DUSER_C_MODULES=${{env.USER_C_MODULES}} -DMICROPY_BOARD_DIR=${{env.MICROPY_BOARD_DIR}} -DMICROPY_BOARD=${{matrix.board}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build MicroPython # Multiple simultaneous jobs trigger https://github.com/pimoroni/pimoroni-pico/issues/761
|
||||
shell: bash
|
||||
working-directory: micropython/ports/rp2
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"deploy": [
|
||||
"../deploy.md"
|
||||
],
|
||||
"docs": "",
|
||||
"features": [
|
||||
"Breadboard friendly",
|
||||
"Castellated Pads",
|
||||
"Micro USB"
|
||||
],
|
||||
"id": "rp2-pico",
|
||||
"images": [
|
||||
"rp2-pico.jpg"
|
||||
],
|
||||
"mcu": "rp2040",
|
||||
"product": "Pico",
|
||||
"thumbnail": "",
|
||||
"url": "https://www.raspberrypi.com/products/raspberry-pi-pico/",
|
||||
"vendor": "Raspberry Pi"
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
# cmake file for Raspberry Pi Pico
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
|
@ -0,0 +1,3 @@
|
|||
// Board and hardware specific configuration
|
||||
#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico"
|
||||
#define MICROPY_HW_FLASH_STORAGE_BYTES (1408 * 1024)
|
|
@ -0,0 +1,28 @@
|
|||
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
|
||||
GP25,GPIO25
|
||||
GP26,GPIO26
|
||||
GP27,GPIO27
|
||||
GP28,GPIO28
|
||||
LED,GPIO25
|
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"deploy": [
|
||||
"../deploy.md"
|
||||
],
|
||||
"docs": "",
|
||||
"features": [
|
||||
"Breadboard friendly",
|
||||
"Castellated Pads",
|
||||
"Micro USB",
|
||||
"WiFi"
|
||||
],
|
||||
"id": "rp2-pico-w",
|
||||
"images": [
|
||||
"rp2-pico-w.jpg"
|
||||
],
|
||||
"mcu": "rp2040",
|
||||
"product": "Pico W",
|
||||
"thumbnail": "",
|
||||
"url": "https://www.raspberrypi.com/products/raspberry-pi-pico/",
|
||||
"vendor": "Raspberry Pi"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
|
||||
require("bundle-networking")
|
|
@ -0,0 +1,8 @@
|
|||
# cmake file for Raspberry Pi Pico W
|
||||
set(MICROPY_PY_LWIP ON)
|
||||
set(MICROPY_PY_NETWORK_CYW43 ON)
|
||||
|
||||
# Board specific version of the frozen manifest
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
|
@ -0,0 +1,23 @@
|
|||
// Board and hardware specific configuration
|
||||
#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico W"
|
||||
|
||||
// todo: We need something to check our binary size
|
||||
#define MICROPY_HW_FLASH_STORAGE_BYTES (848 * 1024)
|
||||
|
||||
// Enable networking.
|
||||
#define MICROPY_PY_NETWORK 1
|
||||
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "PicoW"
|
||||
|
||||
// CYW43 driver configuration.
|
||||
#define CYW43_USE_SPI (1)
|
||||
#define CYW43_LWIP (1)
|
||||
#define CYW43_GPIO (1)
|
||||
#define CYW43_SPI_PIO (1)
|
||||
|
||||
// For debugging mbedtls - also set
|
||||
// Debug level (0-4) 1=warning, 2=info, 3=debug, 4=verbose
|
||||
// #define MODUSSL_MBEDTLS_DEBUG_LEVEL 1
|
||||
|
||||
#define MICROPY_HW_PIN_EXT_COUNT CYW43_WL_GPIO_COUNT
|
||||
|
||||
#define MICROPY_HW_PIN_RESERVED(i) ((i) == CYW43_PIN_WL_HOST_WAKE || (i) == CYW43_PIN_WL_REG_ON)
|
|
@ -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
|
|
|
@ -1,6 +1,5 @@
|
|||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
|
||||
require("mip")
|
||||
require("ntptime")
|
||||
require("urequests")
|
||||
require("umqtt.simple")
|
||||
# https://github.com/micropython/micropython-lib/blob/master/micropython/bundles/bundle-networking/manifest.py
|
||||
require("bundle-networking")
|
||||
require("umqtt.simple")
|
||||
|
|
|
@ -5,3 +5,5 @@ set(MICROPY_PY_LWIP ON)
|
|||
set(MICROPY_PY_NETWORK_CYW43 ON)
|
||||
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
|
@ -1,7 +1,6 @@
|
|||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
|
||||
require("mip")
|
||||
require("ntptime")
|
||||
require("urequests")
|
||||
# https://github.com/micropython/micropython-lib/blob/master/micropython/bundles/bundle-networking/manifest.py
|
||||
require("bundle-networking")
|
||||
require("urllib.urequest")
|
||||
require("umqtt.simple")
|
|
@ -5,3 +5,5 @@ set(MICROPY_PY_LWIP ON)
|
|||
set(MICROPY_PY_NETWORK_CYW43 ON)
|
||||
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"deploy": [
|
||||
"../deploy.md"
|
||||
],
|
||||
"docs": "",
|
||||
"features": [
|
||||
"Battery Charging",
|
||||
"Breadboard Friendly",
|
||||
"Castellated Pads",
|
||||
"SPI Flash",
|
||||
"STEMMA QT/QWIIC",
|
||||
"USB-C"
|
||||
],
|
||||
"images": [
|
||||
"PimoroniPicoLipo_1of3_1024x1024.jpg"
|
||||
],
|
||||
"mcu": "rp2040",
|
||||
"product": "Pico LiPo (16MiB)",
|
||||
"thumbnail": "",
|
||||
"url": "https://shop.pimoroni.com/products/pimoroni-pico-lipo",
|
||||
"vendor": "Pimoroni"
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
# cmake file for Pimoroni Pico LiPo 16MB
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
|
@ -0,0 +1,20 @@
|
|||
// https://shop.pimoroni.com/products/pimoroni-pico-lipo?variant=39335427080275
|
||||
|
||||
#define MICROPY_HW_BOARD_NAME "Pimoroni Pico LiPo 16MB"
|
||||
#define MICROPY_HW_FLASH_STORAGE_BYTES (15 * 1024 * 1024)
|
||||
|
||||
#define MICROPY_HW_USB_VID (0x2E8A)
|
||||
#define MICROPY_HW_USB_PID (0x1003)
|
||||
|
||||
#define MICROPY_HW_UART1_TX (8)
|
||||
#define MICROPY_HW_UART1_RX (9)
|
||||
#define MICROPY_HW_UART1_CTS (10)
|
||||
#define MICROPY_HW_UART1_RTS (11)
|
||||
|
||||
// User LED GPIO25
|
||||
|
||||
// VBUS_SENSE GPIO24
|
||||
|
||||
// BAT_SENSE GPIO29
|
||||
|
||||
// Boot button GPIO23
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"deploy": [
|
||||
"../deploy.md"
|
||||
],
|
||||
"docs": "",
|
||||
"features": [
|
||||
"Battery Charging",
|
||||
"Breadboard Friendly",
|
||||
"Castellated Pads",
|
||||
"SPI Flash",
|
||||
"STEMMA QT/QWIIC",
|
||||
"USB-C"
|
||||
],
|
||||
"images": [
|
||||
"PimoroniPicoLipo_1of3_1024x1024.jpg"
|
||||
],
|
||||
"mcu": "rp2040",
|
||||
"product": "Pico LiPo (4MiB)",
|
||||
"thumbnail": "",
|
||||
"url": "https://shop.pimoroni.com/products/pimoroni-pico-lipo",
|
||||
"vendor": "Pimoroni"
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
# cmake file for Pimoroni Pico LiPo 4MB
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
|
@ -0,0 +1,20 @@
|
|||
// https://shop.pimoroni.com/products/pimoroni-pico-lipo?variant=39386149093459
|
||||
|
||||
#define MICROPY_HW_BOARD_NAME "Pimoroni Pico LiPo 4MB"
|
||||
#define MICROPY_HW_FLASH_STORAGE_BYTES (3 * 1024 * 1024)
|
||||
|
||||
#define MICROPY_HW_USB_VID (0x2E8A)
|
||||
#define MICROPY_HW_USB_PID (0x1002)
|
||||
|
||||
#define MICROPY_HW_UART1_TX (8)
|
||||
#define MICROPY_HW_UART1_RX (9)
|
||||
#define MICROPY_HW_UART1_CTS (10)
|
||||
#define MICROPY_HW_UART1_RTS (11)
|
||||
|
||||
// User LED GPIO25
|
||||
|
||||
// VBUS_SENSE GPIO24
|
||||
|
||||
// BAT_SENSE GPIO29
|
||||
|
||||
// Boot button GPIO23
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"deploy": [
|
||||
"../deploy.md"
|
||||
],
|
||||
"docs": "",
|
||||
"features": [
|
||||
"Breadboard Friendly",
|
||||
"Castellated Pads",
|
||||
"RGB LED",
|
||||
"USB-C"
|
||||
],
|
||||
"images": [
|
||||
"tiny-2040-on-white-1_1024x1024.jpg"
|
||||
],
|
||||
"mcu": "rp2040",
|
||||
"product": "Tiny2040",
|
||||
"thumbnail": "",
|
||||
"url": "https://shop.pimoroni.com/products/tiny-2040",
|
||||
"vendor": "Pimoroni"
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
# cmake file for Pimoroni Tiny 2040
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
|
@ -0,0 +1,18 @@
|
|||
// https://shop.pimoroni.com/products/tiny-2040
|
||||
|
||||
#define MICROPY_HW_BOARD_NAME "Pimoroni Tiny 2040"
|
||||
#define MICROPY_HW_FLASH_STORAGE_BYTES (7 * 1024 * 1024)
|
||||
|
||||
#define MICROPY_HW_USB_VID (0x16D0)
|
||||
#define MICROPY_HW_USB_PID (0x08C7)
|
||||
|
||||
// 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
|
|
@ -3,3 +3,5 @@ set(PICO_BOARD "pimoroni_tufty2040")
|
|||
|
||||
# Allow Pico SDK to locate "pimoroni_tufty2040.h" in this directory.
|
||||
list(APPEND PICO_BOARD_HEADER_DIRS "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
Ładowanie…
Reference in New Issue