FastLED-idf icon indicating copy to clipboard operation
FastLED-idf copied to clipboard

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

Open neggles opened this issue 4 years ago • 0 comments

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!

neggles avatar Apr 02 '21 05:04 neggles