8000 esp32/boards/GENERIC: Merge with GENERIC_{SPIRAM,OTA,D2WD,UNICORE}. · micropython/micropython@2fbf42d · GitHub
[go: up one dir, main page]

Skip to content

Commit 2fbf42d

Browse files
committed
esp32/boards/GENERIC: Merge with GENERIC_{SPIRAM,OTA,D2WD,UNICORE}.
These are now variants of the GENERIC board. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
1 parent 9573d31 commit 2fbf42d

22 files changed

+69
-118
lines changed

ports/esp32/boards/GENERIC/board.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@
1313
"esp32_devkitc.jpg"
1414
],
1515
"mcu": "esp32",
16-
"product": "ESP32",
16+
"product": "ESP32 / WROOM",
1717
"thumbnail": "",
1818
"url": "https://www.espressif.com/en/products/modules",
1919
"variants": {
20-
"idf3": "Compiled with IDF 3.x"
20+
"idf3": "Compiled with IDF 3.x",
21+
"d2wd": "ESP32 D2WD",
22+
"spiram": "Support for SPIRAM / WROVER",
23+
"unicore": "ESP32 Unicore",
24+
"ota": "Support for OTA"
2125
},
2226
"vendor": "Espressif"
2327
}

ports/esp32/boards/GENERIC/board.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
The following files are firmware for ESP32-based boards without external SPIRAM.
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+
If your board is based on a WROVER module, or otherwise has SPIRAM (also known
5+
as PSRAM), then use the "spiram" variant.
6+
7+
The "d2wd" variant is for ESP32-D2WD chips (with 2MiB flash), and "unicore" is
8+
for single-core ESP32 chips (e.g. the "SOLO" modules). The "ota" variant sets
9+
up the partition table to allow for Over-the-Air updates.

ports/esp32/boards/GENERIC/mpconfigboard.cmake

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,47 @@ set(SDKCONFIG_DEFAULTS
22
boards/sdkconfig.base
33
boards/sdkconfig.ble
44
)
5+
6+
if(MICROPY_BOARD_VARIANT STREQUAL "d2wd")
7+
set(SDKCONFIG_DEFAULTS
8+
${SDKCONFIG_DEFAULTS}
9+
boards/GENERIC/sdkconfig.d2wd
10+
)
11+
12+
list(APPEND MICROPY_DEF_BOARD
13+
MICROPY_HW_MCU_NAME="ESP32-D2WD"
14+
)
15+
endif()
16+
17+
if(MICROPY_BOARD_VARIANT STREQUAL "ota")
18+
set(SDKCONFIG_DEFAULTS
19+
${SDKCONFIG_DEFAULTS}
20+
boards/GENERIC/sdkconfig.ota
21+
)
22+
23+
list(APPEND MICROPY_DEF_BOARD
24+
MICROPY_HW_BOARD_NAME="Generic ESP32 module with OTA"
25+
)
26+
endif()
27+
28+
if(MICROPY_BOARD_VARIANT STREQUAL "spiram")
29+
set(SDKCONFIG_DEFAULTS
30+
${SDKCONFIG_DEFAULTS}
31+
boards/sdkconfig.spiram
32+
)
33+
34+
list(APPEND MICROPY_DEF_BOARD
35+
MICROPY_HW_BOARD_NAME="Generic ESP32 module with SPIRAM"
36+
)
37+
endif()
38+
39+
if(MICROPY_BOARD_VARIANT STREQUAL "unicore")
40+
set(SDKCONFIG_DEFAULTS
41+
${SDKCONFIG_DEFAULTS}
42+
boards/GENERIC/sdkconfig.unicore
43+
)
44+
45+
list(APPEND MICROPY_DEF_BOARD
46+
MICROPY_HW_MCU_NAME="ESP32-UNICORE"
47+
)
48+
endif()
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
#define MICROPY_HW_BOARD_NAME "ESP32 module"
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 ESP32 module"
6+
#endif
7+
8+
#ifndef MICROPY_HW_MCU_NAME
29
#define MICROPY_HW_MCU_NAME "ESP32"
10+
#endif

ports/esp32/boards/GENERIC_D2WD/board.json

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

ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake

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

ports/esp32/boards/GENERIC_D2WD/mpconfigboard.h

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

ports/esp32/boards/GENERIC_OTA/board.json

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

ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake

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

ports/esp32/boards/GENERIC_OTA/mpconfigboard.h

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

ports/esp32/boards/GENERIC_SPIRAM/board.json

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

ports/esp32/boards/GENERIC_SPIRAM/board.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake

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

ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.h

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

ports/esp32/boards/GENERIC_UNICORE/board.json

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

ports/esp32/boards/GENERIC_UNICORE/board.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

ports/esp32/boards/GENERIC_UNICORE/mpconfigboard.cmake

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

ports/esp32/boards/GENERIC_UNICORE/mpconfigboard.h

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

ports/esp32/esp32_common.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ set(MICROPY_CROSS_FLAGS -march=xtensawin)
170170
# Set compile options for this port.
171171
target_compile_definitions(${MICROPY_TARGET} PUBLIC
172172
${MICROPY_DEF_CORE}
173+
${MICROPY_DEF_BOARD}
173174
MICROPY_ESP_IDF_4=1
174175
MICROPY_VFS_FAT=1
175176
MICROPY_VFS_LFS2=1

0 commit comments

Comments
 (0)
0