Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate common config to Kconfig options, fix CMakeLists compiler option definition #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

neggles
Copy link

@neggles neggles commented Apr 2, 2021

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 to PUBLIC 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant