Skip to content

Commit 5682595

Browse files
iabdalkaderdpgeorge
authored andcommitted
esp32: Allow overriding cmake frozen manifest from the command line.
If MICROPY_FROZEN_MANIFEST is set from the cmake command line, then it will override the default and any manifest set by the board.
1 parent 86e6744 commit 5682595

File tree

19 files changed

+18
-63
lines changed

19 files changed

+18
-63
lines changed

ports/esp32/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,20 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
2424
# Define the output sdkconfig so it goes in the build directory.
2525
set(SDKCONFIG ${CMAKE_BINARY_DIR}/sdkconfig)
2626

27+
# Save the manifest file set from the cmake command line.
28+
set(MICROPY_USER_FROZEN_MANIFEST ${MICROPY_FROZEN_MANIFEST})
29+
2730
# Include board config; this is expected to set SDKCONFIG_DEFAULTS (among other options).
2831
include(${MICROPY_BOARD_DIR}/mpconfigboard.cmake)
2932

33+
# Set the frozen manifest file. Note if MICROPY_FROZEN_MANIFEST is set from the cmake
34+
# command line, then it will override the default and any manifest set by the board.
35+
if (MICROPY_USER_FROZEN_MANIFEST)
36+
set(MICROPY_FROZEN_MANIFEST ${MICROPY_USER_FROZEN_MANIFEST})
37+
elseif (NOT MICROPY_FROZEN_MANIFEST)
38+
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
39+
endif()
40+
3041
# Add sdkconfig fragments that depend on the IDF version.
3142
if(IDF_VERSION_MAJOR EQUAL 4 AND IDF_VERSION_MINOR LESS 2)
3243
set(SDKCONFIG_DEFAULTS ${SDKCONFIG_DEFAULTS} boards/sdkconfig.nimble_core0)

ports/esp32/boards/ESP32_S2_WROVER/mpconfigboard.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@ set(SDKCONFIG_DEFAULTS
66
boards/sdkconfig.usb
77
boards/ESP32_S2_WROVER/sdkconfig.board
88
)
9-
10-
if(NOT MICROPY_FROZEN_MANIFEST)
11-
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
12-
endif()

ports/esp32/boards/GENERIC/mpconfigboard.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@ set(SDKCONFIG_DEFAULTS
22
boards/sdkconfig.base
33
boards/sdkconfig.ble
44
)
5-
if(NOT MICROPY_FROZEN_MANIFEST)
6-
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
7-
endif()

ports/esp32/boards/GENERIC_C3/mpconfigboard.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,3 @@ set(SDKCONFIG_DEFAULTS
44
boards/sdkconfig.base
55
boards/sdkconfig.ble
66
)
7-
8-
if(NOT MICROPY_FROZEN_MANIFEST)
9-
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
10-
endif()

ports/esp32/boards/GENERIC_C3_USB/mpconfigboard.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,3 @@ set(SDKCONFIG_DEFAULTS
55
boards/sdkconfig.ble
66
boards/GENERIC_C3_USB/sdkconfig.board
77
)
8-
9-
if(NOT MICROPY_FROZEN_MANIFEST)
10-
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
11-
endif()

ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@ set(SDKCONFIG_DEFAULTS
33
boards/sdkconfig.ble
44
boards/GENERIC_D2WD/sdkconfig.board
55
)
6-
7-
if(NOT MICROPY_FROZEN_MANIFEST)
8-
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
9-
endif()

ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@ set(SDKCONFIG_DEFAULTS
33
boards/sdkconfig.ble
44
boards/GENERIC_OTA/sdkconfig.board
55
)
6-
7-
if(NOT MICROPY_FROZEN_MANIFEST)
8-
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
9-
endif()

ports/esp32/boards/GENERIC_S2/mpconfigboard.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,3 @@ set(SDKCONFIG_DEFAULTS
44
boards/sdkconfig.base
55
boards/sdkconfig.usb
66
)
7-
8-
if(NOT MICROPY_FROZEN_MANIFEST)
9-
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
10-
endif()

ports/esp32/boards/GENERIC_S3/mpconfigboard.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@ set(SDKCONFIG_DEFAULTS
66
boards/sdkconfig.ble
77
boards/GENERIC_S3/sdkconfig.board
88
)
9-
10-
if(NOT MICROPY_FROZEN_MANIFEST)
11-
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
12-
endif()

ports/esp32/boards/GENERIC_S3_SPIRAM/mpconfigboard.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@ set(SDKCONFIG_DEFAULTS
66
boards/sdkconfig.spiram_sx
77
boards/GENERIC_S3_SPIRAM/sdkconfig.board
88
)
9-
10-
if(NOT MICROPY_FROZEN_MANIFEST)
11-
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
12-
endif()

0 commit comments

Comments
 (0)