Migrate common config to Kconfig options, fix CMakeLists compiler option definition #25
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.
Hey,
I've made some improvements to the configuration of this project, migrated several of the common options into Kconfig/menuconfig, and fixed up the CMakeLists
target_compile_definitions()
to remove the header #define hack;target_compile_definitions(${COMPONENT_LIB} PUBLIC -DESP32)
^ This has to be placed after
idf_component_register()
in the CMakeLists.txt file, and set toPUBLIC
so that it's available/defined in the whole project.I've renamed a few definitions to cover the CONFIG_x format that menuconfig options are declared in, and added the missing
#include "sdkconfig.h"
to main.cpp, as well as adding an sdkconfig.defaults.esp32 file so the default sdkconfig built by ESP-IDF (in recent versions, anyway) should have the required options set. Some other changes would be needed to make this work on the ESP32-S2 and C3 (differences in pinout, etc).I don't have an ESP32 to test on at the moment - the project I'm working on uses S2s for their USB-OTG - but it compiles just fine and as far as I can tell I've not altered the behaviour in any meaningful way.
Feel free to tell me if I've done something stupid!