Skip to content

Commit 39b3536

Browse files
esp32 :Fix
1 parent 9e959cf commit 39b3536

8 files changed

Lines changed: 28 additions & 38 deletions

File tree

ports/esp32/boards/ESP32_GENERIC_P4/sdkconfig.board

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ CONFIG_SOC_ULP_SUPPORTED=n
2525
CONFIG_ULP_COPROC_ENABLED=n
2626
CONFIG_ULP_COPROC_TYPE_FSM=n
2727

28-
# Touchpad : not fixed
29-
CONFIG_SOC_TOUCH_SENSOR_SUPPORTED=y
30-
SOC_TOUCH_SENSOR_SUPPORTED=y
31-
CONFIG_SOC_TOUCH_SENSOR_SUPPORTED=y
32-
3328

3429
# Wifi
3530
#CONFIG_ESP_HOSTED_ENABLED=n

ports/esp32/boards/FireBeetle_2_ESP32_P4/board.json renamed to ports/esp32/boards/ESP32_GENERIC_P4_WIFI/board.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
""
1616
],
1717
"mcu": "esp32p4",
18-
"product": "M5STACK TAB5",
18+
"product": "Expressif ESP32P4",
1919
"thumbnail": "",
20-
"url": "https://docs.m5stack.com/en/core/Tab5",
20+
"url": "https://www.espressif.com/en/products/modules",
2121
"variants": {
2222
},
2323
"vendor": "Espressif"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
The following files are firmware that should work on most ESP32-based boards
2+
with 4MiB of flash, including WROOM WROVER, SOLO, PICO, and MINI modules.
3+
4+
This board has multiple variants available:
5+
6+
* If your board is based on a WROVER module, or otherwise has SPIRAM (also known
7+
as PSRAM) then it's recommended to use the "spiram" variant. Look for heading
8+
**Support for SPIRAM / WROVER)**.
9+
* If your board has a ESP32-D2WD chip (with only 2MiB flash) then use the "d2wd"
10+
variant. Look for heading **ESP32 D2WD**.
11+
* If your board has a single-core ESP32 (e.g. the "SOLO" modules) then choose
12+
the "unicore" variant. Look for heading **ESP32 Unicore**.
13+
* If you'd like to perform Over-the-Air updates of the MicroPython firmware,
14+
then choose the "ota" variant. This variant has less room in the flash for
15+
Python files as a result of supporting OTA. Look for heading **Support for
16+
OTA**.
17+
18+
Otherwise, download the generic variant (under the first heading below).

ports/esp32/boards/FireBeetle_2_ESP32_P4/mpconfigboard.cmake renamed to ports/esp32/boards/ESP32_GENERIC_P4_WIFI/mpconfigboard.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ set(IDF_TARGET esp32p4)
22

33
set(SDKCONFIG_DEFAULTS
44
boards/sdkconfig.base
5-
boards/sdkconfig.p4usb
6-
boards/FireBeetle_2_ESP32_P4/sdkconfig.board
5+
boards/ESP32_GENERIC_P4/sdkconfig.board
76
)

ports/esp32/boards/FireBeetle_2_ESP32_P4/mpconfigboard.h renamed to ports/esp32/boards/ESP32_GENERIC_P4_WIFI/mpconfigboard.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
// specified.
33

44
#ifndef MICROPY_HW_BOARD_NAME
5-
#define MICROPY_HW_BOARD_NAME "FireBeetle 2 ESP32 P4"
5+
#define MICROPY_HW_BOARD_NAME "Generic ESP32P4 module"
66
#endif
77

88
#ifndef MICROPY_HW_MCU_NAME
99
#define MICROPY_HW_MCU_NAME "ESP32P4"
1010
#endif
1111

12-
#define MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE (1)
13-
#define MICROPY_HW_ENABLE_USBDEV (1)
1412
#define MICROPY_PY_ESPNOW (0)
15-
#define MP_SD_LDO (1)
13+
14+
1615
#ifndef USB_SERIAL_JTAG_PACKET_SZ_BYTES
1716
#define USB_SERIAL_JTAG_PACKET_SZ_BYTES (64)
1817
#endif

ports/esp32/boards/FireBeetle_2_ESP32_P4/sdkconfig.board renamed to ports/esp32/boards/ESP32_GENERIC_P4_WIFI/sdkconfig.board

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ CONFIG_ESPTOOLPY_AFTER_NORESET=y
88
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=
99
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=
1010
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
11-
#CONFIG_PARTITION_TABLE_CUSTOM=y
12-
#CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MiB_espdl.csv"
1311

1412
# Memory
1513
CONFIG_SPIRAM=y
@@ -27,10 +25,6 @@ CONFIG_SOC_ULP_SUPPORTED=n
2725
CONFIG_ULP_COPROC_ENABLED=n
2826
CONFIG_ULP_COPROC_TYPE_FSM=n
2927

30-
# Touchpad : not fixed
31-
CONFIG_SOC_TOUCH_SENSOR_SUPPORTED=n
32-
SOC_TOUCH_SENSOR_SUPPORTED=n
33-
CONFIG_SOC_TOUCH_SENSOR_SUPPORTED=n
3428

3529

3630
# Wifi

ports/esp32/boards/FireBeetle_2_ESP32_P4/board.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

ports/esp32/machine_i2c.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@
5454
#endif
5555

5656
#if SOC_I2C_SUPPORT_XTAL
57-
#define I2C_SCLK_FREQ XTAL_CLK_FREQ
57+
#if CONFIG_XTAL_FREQ > 0
58+
#define I2C_SCLK_FREQ (CONFIG_XTAL_FREQ * 1000000)
59+
#error "I2C uses XTAL but no configured freq"
60+
#endif // CONFIG_XTAL_FREQ
5861
#elif SOC_I2C_SUPPORT_APB
5962
#define I2C_SCLK_FREQ APB_CLK_FREQ
6063
#else

0 commit comments

Comments
 (0)