kopia lustrzana https://github.com/pimoroni/pimoroni-pico
MicroPython: Add picow_enviro build.
rodzic
a4b6d86ac7
commit
fb246441bd
|
@ -68,6 +68,8 @@ jobs:
|
||||||
include:
|
include:
|
||||||
- name: picow
|
- name: picow
|
||||||
board: PICO_W
|
board: PICO_W
|
||||||
|
- name: picow_enviro
|
||||||
|
board: PICO_W_ENVIRO
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# MicroPython version will be contained in github.event.release.tag_name for releases
|
# MicroPython version will be contained in github.event.release.tag_name for releases
|
||||||
|
|
|
@ -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,8 @@
|
||||||
|
include("../manifest.py")
|
||||||
|
|
||||||
|
freeze("$(MPY_DIR)/tools", "upip.py")
|
||||||
|
freeze("$(MPY_DIR)/tools", "upip_utarfile.py")
|
||||||
|
|
||||||
|
if os.path.isdir(convert_path("$(MPY_LIB_DIR)")):
|
||||||
|
freeze("$(MPY_LIB_DIR)/python-ecosys/urequests", "urequests.py")
|
||||||
|
freeze("$(MPY_LIB_DIR)/micropython/umqtt.simple", "umqtt")
|
|
@ -0,0 +1,8 @@
|
||||||
|
# cmake file for Raspberry Pi Pico W
|
||||||
|
set(MICROPY_BOARD PICO_W)
|
||||||
|
|
||||||
|
set(MICROPY_PY_LWIP ON)
|
||||||
|
set(MICROPY_PY_NETWORK_CYW43 ON)
|
||||||
|
|
||||||
|
# Board specific version of the frozen manifest
|
||||||
|
set(MICROPY_FROZEN_MANIFEST ${CMAKE_SOURCE_DIR}/boards/PICO_W_ENVIRO/manifest.py)
|
|
@ -0,0 +1,25 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// 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_CYW43_COUNT CYW43_WL_GPIO_COUNT
|
||||||
|
#ifdef CYW43_WL_GPIO_LED_PIN
|
||||||
|
#define MICROPY_HW_PIN_CYW43_LED_PIN_NUM CYW43_WL_GPIO_LED_PIN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MICROPY_HW_PIN_RESERVED(i) ((i) == CYW43_PIN_WL_HOST_WAKE || (i) == CYW43_PIN_WL_REG_ON)
|
|
@ -0,0 +1,102 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Raspberry Pi (Trading) Ltd.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
// -----------------------------------------------------
|
||||||
|
// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO
|
||||||
|
// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES
|
||||||
|
// -----------------------------------------------------
|
||||||
|
|
||||||
|
// This header may be included by other board headers as "boards/pico.h"
|
||||||
|
|
||||||
|
#ifndef _BOARDS_PICO_W_H
|
||||||
|
#define _BOARDS_PICO_W_H
|
||||||
|
|
||||||
|
// For board detection
|
||||||
|
#define RASPBERRYPI_PICO_W
|
||||||
|
|
||||||
|
// --- UART ---
|
||||||
|
#ifndef PICO_DEFAULT_UART
|
||||||
|
#define PICO_DEFAULT_UART 0
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_UART_TX_PIN
|
||||||
|
#define PICO_DEFAULT_UART_TX_PIN 0
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_UART_RX_PIN
|
||||||
|
#define PICO_DEFAULT_UART_RX_PIN 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// --- LED ---
|
||||||
|
// no PICO_DEFAULT_LED_PIN - LED is on Wireless chip
|
||||||
|
// no PICO_DEFAULT_WS2812_PIN
|
||||||
|
|
||||||
|
// --- I2C ---
|
||||||
|
#ifndef PICO_DEFAULT_I2C
|
||||||
|
#define PICO_DEFAULT_I2C 0
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_I2C_SDA_PIN
|
||||||
|
#define PICO_DEFAULT_I2C_SDA_PIN 4
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_I2C_SCL_PIN
|
||||||
|
#define PICO_DEFAULT_I2C_SCL_PIN 5
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// --- SPI ---
|
||||||
|
#ifndef PICO_DEFAULT_SPI
|
||||||
|
#define PICO_DEFAULT_SPI 0
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_SPI_SCK_PIN
|
||||||
|
#define PICO_DEFAULT_SPI_SCK_PIN 18
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_SPI_TX_PIN
|
||||||
|
#define PICO_DEFAULT_SPI_TX_PIN 19
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_SPI_RX_PIN
|
||||||
|
#define PICO_DEFAULT_SPI_RX_PIN 16
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_SPI_CSN_PIN
|
||||||
|
#define PICO_DEFAULT_SPI_CSN_PIN 17
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// --- FLASH ---
|
||||||
|
|
||||||
|
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
|
||||||
|
|
||||||
|
#ifndef PICO_FLASH_SPI_CLKDIV
|
||||||
|
#define PICO_FLASH_SPI_CLKDIV 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PICO_FLASH_SIZE_BYTES
|
||||||
|
#define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// note the SMSP mode pin is on WL_GPIO1
|
||||||
|
// #define PICO_SMPS_MODE_PIN
|
||||||
|
|
||||||
|
#ifndef PICO_RP2040_B0_SUPPORTED
|
||||||
|
#define PICO_RP2040_B0_SUPPORTED 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PICO_RP2040_B1_SUPPORTED
|
||||||
|
#define PICO_RP2040_B1_SUPPORTED 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CYW43_PIN_WL_HOST_WAKE
|
||||||
|
#define CYW43_PIN_WL_HOST_WAKE 24
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CYW43_PIN_WL_REG_ON
|
||||||
|
#define CYW43_PIN_WL_REG_ON 23
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CYW43_WL_GPIO_COUNT
|
||||||
|
#define CYW43_WL_GPIO_COUNT 3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CYW43_WL_GPIO_LED_PIN
|
||||||
|
#define CYW43_WL_GPIO_LED_PIN 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -43,7 +43,6 @@ include(pcf85063a/micropython)
|
||||||
|
|
||||||
# Utility
|
# Utility
|
||||||
include(adcfft/micropython)
|
include(adcfft/micropython)
|
||||||
include(wakeup/micropython)
|
|
||||||
|
|
||||||
# LEDs & Matrices
|
# LEDs & Matrices
|
||||||
include(plasma/micropython)
|
include(plasma/micropython)
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
include_directories(${CMAKE_CURRENT_LIST_DIR}/../../)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../")
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../")
|
||||||
|
|
||||||
|
# Essential
|
||||||
|
include(pimoroni_i2c/micropython)
|
||||||
|
include(pimoroni_bus/micropython)
|
||||||
|
|
||||||
|
# Pico Graphics Essential
|
||||||
|
include(hershey_fonts/micropython)
|
||||||
|
include(bitmap_fonts/micropython)
|
||||||
|
include(picographics/micropython)
|
||||||
|
|
||||||
|
# Pico Graphics Extra
|
||||||
|
include(jpegdec/micropython)
|
||||||
|
include(qrcode/micropython/micropython)
|
||||||
|
|
||||||
|
# Sensors & Breakouts
|
||||||
|
include(breakout_dotmatrix/micropython)
|
||||||
|
include(breakout_encoder/micropython)
|
||||||
|
include(breakout_ioexpander/micropython)
|
||||||
|
include(breakout_ltr559/micropython)
|
||||||
|
include(breakout_as7262/micropython)
|
||||||
|
include(breakout_rgbmatrix5x5/micropython)
|
||||||
|
include(breakout_matrix11x7/micropython)
|
||||||
|
include(breakout_msa301/micropython)
|
||||||
|
include(breakout_pmw3901/micropython)
|
||||||
|
include(breakout_mics6814/micropython)
|
||||||
|
include(breakout_potentiometer/micropython)
|
||||||
|
include(breakout_rtc/micropython)
|
||||||
|
include(breakout_trackball/micropython)
|
||||||
|
include(breakout_sgp30/micropython)
|
||||||
|
include(breakout_bh1745/micropython)
|
||||||
|
include(breakout_bme68x/micropython)
|
||||||
|
include(breakout_bme280/micropython)
|
||||||
|
include(breakout_bmp280/micropython)
|
||||||
|
include(breakout_icp10125/micropython)
|
||||||
|
include(breakout_scd41/micropython)
|
||||||
|
include(breakout_vl53l5cx/micropython)
|
||||||
|
include(pcf85063a/micropython)
|
||||||
|
|
||||||
|
# Utility
|
||||||
|
include(adcfft/micropython)
|
||||||
|
include(wakeup/micropython)
|
||||||
|
|
||||||
|
# LEDs & Matrices
|
||||||
|
include(plasma/micropython)
|
||||||
|
|
||||||
|
# Servos & Motors
|
||||||
|
include(pwm/micropython)
|
||||||
|
include(servo/micropython)
|
||||||
|
include(encoder/micropython)
|
||||||
|
include(motor/micropython)
|
||||||
|
|
||||||
|
# include(micropython-common)
|
||||||
|
|
||||||
|
include(modules_py/modules_py)
|
Ładowanie…
Reference in New Issue