esp32/boards/ESP32_GENERIC_P4: Add board definition for ESP32P4.

Includes a base variant with LAN, and C5_WIFI and C6_WIFI variants with
LAN, WiFi and BLE.

And builds this board in the esp32 CI, to cover the P4 support.

Signed-off-by: Vincent1-python <pywei201209@163.com>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Vincent1-python
2025-08-15 17:26:05 +08:00
committed by Damien George
parent e6f1f78713
commit 50a06b6404
8 changed files with 96 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ jobs:
- esp32_build_cmod_spiram_s2
- esp32_build_s3_c3
- esp32_build_c2_c5_c6
- esp32_build_p4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

View File

@@ -0,0 +1,21 @@
{
"deploy": [
"../deploy.md"
],
"deploy_options": {
"flash_offset": "0x2000"
},
"docs": "",
"features": [
"BLE",
"WiFi"
],
"images": [
"esp32p4_devkitmini.jpg"
],
"mcu": "esp32p4",
"product": "ESP32-P4",
"thumbnail": "",
"url": "https://www.espressif.com/en/products/modules",
"vendor": "Espressif"
}

View File

@@ -0,0 +1,2 @@
The following firmware is applicable to most development boards based on ESP32-P4, and
the development boards must be equipped with at least 16 MiB external SPI Flash.

View File

@@ -0,0 +1,6 @@
set(IDF_TARGET esp32p4)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.p4
)

View File

@@ -0,0 +1,31 @@
// Both of these can be set by mpconfigboard.cmake if a BOARD_VARIANT is
// specified.
#ifndef MICROPY_HW_BOARD_NAME
#define MICROPY_HW_BOARD_NAME "Generic ESP32P4 module"
#endif
#ifndef MICROPY_HW_MCU_NAME
#define MICROPY_HW_MCU_NAME "ESP32P4"
#endif
#define MICROPY_PY_ESPNOW (0)
#define MICROPY_HW_ENABLE_SDCARD (1)
#ifndef USB_SERIAL_JTAG_PACKET_SZ_BYTES
#define USB_SERIAL_JTAG_PACKET_SZ_BYTES (64)
#endif
// Enable UART REPL for modules that have an external USB-UART and don't use native USB.
#define MICROPY_HW_ENABLE_UART_REPL (1)
#define MICROPY_PY_MACHINE_I2S (1)
// Disable Wi-Fi and Bluetooth by default, these are re-enabled in the WIFI variants
#ifndef MICROPY_PY_NETWORK_WLAN
#define MICROPY_PY_NETWORK_WLAN (0)
#endif
#ifndef MICROPY_PY_BLUETOOTH
#define MICROPY_PY_BLUETOOTH (0)
#endif

View File

@@ -0,0 +1,14 @@
set(IDF_TARGET esp32p4)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.p4
boards/sdkconfig.p4_wifi_common
boards/sdkconfig.p4_wifi_c5
)
list(APPEND MICROPY_DEF_BOARD
MICROPY_HW_BOARD_NAME="Generic ESP32P4 module with WIFI module of external ESP32C5"
MICROPY_PY_NETWORK_WLAN=1
MICROPY_PY_BLUETOOTH=1
)

View File

@@ -0,0 +1,14 @@
set(IDF_TARGET esp32p4)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.p4
boards/sdkconfig.p4_wifi_common
boards/sdkconfig.p4_wifi_c6
)
list(APPEND MICROPY_DEF_BOARD
MICROPY_HW_BOARD_NAME="Generic ESP32P4 module with WIFI module of external ESP32C6"
MICROPY_PY_NETWORK_WLAN=1
MICROPY_PY_BLUETOOTH=1
)

View File

@@ -254,6 +254,13 @@ function ci_esp32_build_c2_c5_c6 {
make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_C6
}
function ci_esp32_build_p4 {
ci_esp32_build_common
make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_P4
make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_P4 BOARD_VARIANT=C6_WIFI
}
########################################################################################
# ports/esp8266