Skip to content

Commit 50a06b6

Browse files
Vincent1-pythondpgeorge
authored andcommitted
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 <[email protected]> Signed-off-by: Angus Gratton <[email protected]> Signed-off-by: Damien George <[email protected]>
1 parent e6f1f78 commit 50a06b6

File tree

8 files changed

+96
-0
lines changed

8 files changed

+96
-0
lines changed

.github/workflows/ports_esp32.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- esp32_build_cmod_spiram_s2
3131
- esp32_build_s3_c3
3232
- esp32_build_c2_c5_c6
33+
- esp32_build_p4
3334
runs-on: ubuntu-latest
3435
steps:
3536
- uses: actions/checkout@v6
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"deploy": [
3+
"../deploy.md"
4+
],
5+
"deploy_options": {
6+
"flash_offset": "0x2000"
7+
},
8+
"docs": "",
9+
"features": [
10+
"BLE",
11+
"WiFi"
12+
],
13+
"images": [
14+
"esp32p4_devkitmini.jpg"
15+
],
16+
"mcu": "esp32p4",
17+
"product": "ESP32-P4",
18+
"thumbnail": "",
19+
"url": "https://www.espressif.com/en/products/modules",
20+
"vendor": "Espressif"
21+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The following firmware is applicable to most development boards based on ESP32-P4, and
2+
the development boards must be equipped with at least 16 MiB external SPI Flash.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
set(IDF_TARGET esp32p4)
2+
3+
set(SDKCONFIG_DEFAULTS
4+
boards/sdkconfig.base
5+
boards/sdkconfig.p4
6+
)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Both of these can be set by mpconfigboard.cmake if a BOARD_VARIANT is
2+
// specified.
3+
4+
#ifndef MICROPY_HW_BOARD_NAME
5+
#define MICROPY_HW_BOARD_NAME "Generic ESP32P4 module"
6+
#endif
7+
8+
#ifndef MICROPY_HW_MCU_NAME
9+
#define MICROPY_HW_MCU_NAME "ESP32P4"
10+
#endif
11+
12+
#define MICROPY_PY_ESPNOW (0)
13+
14+
#define MICROPY_HW_ENABLE_SDCARD (1)
15+
16+
#ifndef USB_SERIAL_JTAG_PACKET_SZ_BYTES
17+
#define USB_SERIAL_JTAG_PACKET_SZ_BYTES (64)
18+
#endif
19+
20+
// Enable UART REPL for modules that have an external USB-UART and don't use native USB.
21+
#define MICROPY_HW_ENABLE_UART_REPL (1)
22+
23+
#define MICROPY_PY_MACHINE_I2S (1)
24+
25+
// Disable Wi-Fi and Bluetooth by default, these are re-enabled in the WIFI variants
26+
#ifndef MICROPY_PY_NETWORK_WLAN
27+
#define MICROPY_PY_NETWORK_WLAN (0)
28+
#endif
29+
#ifndef MICROPY_PY_BLUETOOTH
30+
#define MICROPY_PY_BLUETOOTH (0)
31+
#endif
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
set(IDF_TARGET esp32p4)
2+
3+
set(SDKCONFIG_DEFAULTS
4+
boards/sdkconfig.base
5+
boards/sdkconfig.p4
6+
boards/sdkconfig.p4_wifi_common
7+
boards/sdkconfig.p4_wifi_c5
8+
)
9+
10+
list(APPEND MICROPY_DEF_BOARD
11+
MICROPY_HW_BOARD_NAME="Generic ESP32P4 module with WIFI module of external ESP32C5"
12+
MICROPY_PY_NETWORK_WLAN=1
13+
MICROPY_PY_BLUETOOTH=1
14+
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
set(IDF_TARGET esp32p4)
2+
3+
set(SDKCONFIG_DEFAULTS
4+
boards/sdkconfig.base
5+
boards/sdkconfig.p4
6+
boards/sdkconfig.p4_wifi_common
7+
boards/sdkconfig.p4_wifi_c6
8+
)
9+
10+
list(APPEND MICROPY_DEF_BOARD
11+
MICROPY_HW_BOARD_NAME="Generic ESP32P4 module with WIFI module of external ESP32C6"
12+
MICROPY_PY_NETWORK_WLAN=1
13+
MICROPY_PY_BLUETOOTH=1
14+
)

tools/ci.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,13 @@ function ci_esp32_build_c2_c5_c6 {
254254
make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_C6
255255
}
256256

257+
function ci_esp32_build_p4 {
258+
ci_esp32_build_common
259+
260+
make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_P4
261+
make ${MAKEOPTS} -C ports/esp32 BOARD=ESP32_GENERIC_P4 BOARD_VARIANT=C6_WIFI
262+
}
263+
257264
########################################################################################
258265
# ports/esp8266
259266

0 commit comments

Comments
 (0)