Skip to content

Commit

Permalink
esp32/boards/GENERIC: Merge with GENERIC_{SPIRAM,OTA,D2WD,UNICORE}.
Browse files Browse the repository at this point in the history
These are now variants of the GENERIC board.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
  • Loading branch information
jimmo committed Aug 15, 2023
1 parent 9573d31 commit 2fbf42d
Show file tree
Hide file tree
Showing 22 changed files with 69 additions and 118 deletions.
8 changes: 6 additions & 2 deletions ports/esp32/boards/GENERIC/board.json
Expand Up @@ -13,11 +13,15 @@
"esp32_devkitc.jpg"
],
"mcu": "esp32",
"product": "ESP32",
"product": "ESP32 / WROOM",
"thumbnail": "",
"url": "https://www.espressif.com/en/products/modules",
"variants": {
"idf3": "Compiled with IDF 3.x"
"idf3": "Compiled with IDF 3.x",
"d2wd": "ESP32 D2WD",
"spiram": "Support for SPIRAM / WROVER",
"unicore": "ESP32 Unicore",
"ota": "Support for OTA"
},
"vendor": "Espressif"
}
10 changes: 9 additions & 1 deletion ports/esp32/boards/GENERIC/board.md
@@ -1 +1,9 @@
The following files are firmware for ESP32-based boards without external SPIRAM.
The following files are firmware that should work on most ESP32-based boards
with 4MiB of flash, including WROOM WROVER, SOLO, PICO, and MINI modules.

If your board is based on a WROVER module, or otherwise has SPIRAM (also known
as PSRAM), then use the "spiram" variant.

The "d2wd" variant is for ESP32-D2WD chips (with 2MiB flash), and "unicore" is
for single-core ESP32 chips (e.g. the "SOLO" modules). The "ota" variant sets
up the partition table to allow for Over-the-Air updates.
44 changes: 44 additions & 0 deletions ports/esp32/boards/GENERIC/mpconfigboard.cmake
Expand Up @@ -2,3 +2,47 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.ble
)

if(MICROPY_BOARD_VARIANT STREQUAL "d2wd")
set(SDKCONFIG_DEFAULTS
${SDKCONFIG_DEFAULTS}
boards/GENERIC/sdkconfig.d2wd
)

list(APPEND MICROPY_DEF_BOARD
MICROPY_HW_MCU_NAME="ESP32-D2WD"
)
endif()

if(MICROPY_BOARD_VARIANT STREQUAL "ota")
set(SDKCONFIG_DEFAULTS
${SDKCONFIG_DEFAULTS}
boards/GENERIC/sdkconfig.ota
)

list(APPEND MICROPY_DEF_BOARD
MICROPY_HW_BOARD_NAME="Generic ESP32 module with OTA"
)
endif()

if(MICROPY_BOARD_VARIANT STREQUAL "spiram")
set(SDKCONFIG_DEFAULTS
${SDKCONFIG_DEFAULTS}
boards/sdkconfig.spiram
)

list(APPEND MICROPY_DEF_BOARD
MICROPY_HW_BOARD_NAME="Generic ESP32 module with SPIRAM"
)
endif()

if(MICROPY_BOARD_VARIANT STREQUAL "unicore")
set(SDKCONFIG_DEFAULTS
${SDKCONFIG_DEFAULTS}
boards/GENERIC/sdkconfig.unicore
)

list(APPEND MICROPY_DEF_BOARD
MICROPY_HW_MCU_NAME="ESP32-UNICORE"
)
endif()
10 changes: 9 additions & 1 deletion ports/esp32/boards/GENERIC/mpconfigboard.h
@@ -1,2 +1,10 @@
#define MICROPY_HW_BOARD_NAME "ESP32 module"
// 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 ESP32 module"
#endif

#ifndef MICROPY_HW_MCU_NAME
#define MICROPY_HW_MCU_NAME "ESP32"
#endif
File renamed without changes.
File renamed without changes.
20 changes: 0 additions & 20 deletions ports/esp32/boards/GENERIC_D2WD/board.json

This file was deleted.

5 changes: 0 additions & 5 deletions ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions ports/esp32/boards/GENERIC_D2WD/mpconfigboard.h

This file was deleted.

20 changes: 0 additions & 20 deletions ports/esp32/boards/GENERIC_OTA/board.json

This file was deleted.

5 changes: 0 additions & 5 deletions ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions ports/esp32/boards/GENERIC_OTA/mpconfigboard.h

This file was deleted.

24 changes: 0 additions & 24 deletions ports/esp32/boards/GENERIC_SPIRAM/board.json

This file was deleted.

1 change: 0 additions & 1 deletion ports/esp32/boards/GENERIC_SPIRAM/board.md

This file was deleted.

5 changes: 0 additions & 5 deletions ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.h

This file was deleted.

20 changes: 0 additions & 20 deletions ports/esp32/boards/GENERIC_UNICORE/board.json

This file was deleted.

1 change: 0 additions & 1 deletion ports/esp32/boards/GENERIC_UNICORE/board.md

This file was deleted.

5 changes: 0 additions & 5 deletions ports/esp32/boards/GENERIC_UNICORE/mpconfigboard.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions ports/esp32/boards/GENERIC_UNICORE/mpconfigboard.h

This file was deleted.

1 change: 1 addition & 0 deletions ports/esp32/esp32_common.cmake
Expand Up @@ -170,6 +170,7 @@ set(MICROPY_CROSS_FLAGS -march=xtensawin)
# Set compile options for this port.
target_compile_definitions(${MICROPY_TARGET} PUBLIC
${MICROPY_DEF_CORE}
${MICROPY_DEF_BOARD}
MICROPY_ESP_IDF_4=1
MICROPY_VFS_FAT=1
MICROPY_VFS_LFS2=1
Expand Down

0 comments on commit 2fbf42d

Please sign in to comment.