esp32: preserve non-CONFIG_ build args when using --custom-board-path#590
Open
thatbudakguy wants to merge 1 commit into
Open
Conversation
build_sdkconfig() returned an empty list whenever custom_board_path was
set, discarding all extra build args passed to compile() -- including
GEN_SCRIPT and FROZEN_MANIFEST, which are needed regardless of whether
a custom board is used. Without GEN_SCRIPT, cmake evaluates
$ENV{GEN_SCRIPT} as empty and fails to find the LVGL binding generator
script (gen/<empty>_api_gen_mpy.py instead of
gen/python_api_gen_mpy.py), breaking the ESP32 build for any project
using --custom-board-path.
Only the CONFIG_ prefixed args are meant to be skipped here, since
custom boards supply their own sdkconfig fragment via sdkconfig.board.
Collaborator
|
the only one we should have to worry about preserving is |
Author
|
Should we just hardcode it to: return ['GEN_SCRIPT']? |
Collaborator
|
I have to look at the code again to see exactly what is being done. I don't remember where the genscript is being injected and where the block is occurring at. |
Collaborator
|
ok the first location is to change here so it reads ${Python3_EXECUTABLE} ${BINDING_DIR}/gen/python_api_gen_mpy.py ${LV_CFLAGS} --output=${CMAKE_BINARY_DIR}/lv_mp.c --include=${BINDING_DIR}/lib --include=${BINDING_DIR}/lib/lvgl --board=$ENV{LV_PORT} --module_name=lvgl --module_prefix=lv --metadata=${CMAKE_BINARY_DIR}/lv_mp.c.json --header_file=${LVGL_DIR}/lvgl.h |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build_sdkconfig()inbuilder/esp32.pyreturns an empty list whenevercustom_board_pathis set, discarding all extra build args passed tocompile()-- not just theCONFIG_ones. This dropsGEN_SCRIPTandFROZEN_MANIFEST, which the rest of the build needs regardless of whether a custom board is used.Without
GEN_SCRIPT, cmake evaluates$ENV{GEN_SCRIPT}as empty when generating LVGL bindings, and looks forgen/_api_gen_mpy.pyinstead ofgen/python_api_gen_mpy.py:This breaks the ESP32 build for any project using
--custom-board-path(reproduced with a fresh custom board pointing at an M5Stack Tough).Fix
Only the
CONFIG_*args are meant to be skipped for custom boards, since those boards supply their own sdkconfig fragment viasdkconfig.board. The other build args (GEN_SCRIPT,FROZEN_MANIFEST, etc.) should still be forwarded.Test plan
--custom-board-path