ESP32 Compilation Warnings
Posted: Sat Apr 27, 2024 9:10 pm
A little tip to make life easier.
The output from the esp32 compiler is a 'little' verbose. It is possible to turn off some of the warnings.
In your project directory/main
Edit CMakeLists.txt
At the end of the file add:
This will turn off unused variable and function warnings as well as conversion between integer types. Obviously you should aim to tidy up the code that gives these messages - but it makes spotting the error 'needle' easier in the early project haystack...
Martin
Other warnings can be disabled using similar syntax....
The output from the esp32 compiler is a 'little' verbose. It is possible to turn off some of the warnings.
In your project directory/main
Edit CMakeLists.txt
At the end of the file add:
Code: Select all
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-variable)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-function)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-int-conversion)
Martin
Other warnings can be disabled using similar syntax....