This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How can I enable all Warnings for an NCS project?

Dear All,
I am trying to compile a project from the command line and I want to enable all the warnings possible for the files that I have created.I am using the NCS v1.2.0.
I have tried different things, but none seems to work:
  1. In the proj.conf I added: CONFIG_COMPILER_OPT="-Wall", this command seems to get ovewritten by Zephyr's scripts that are creating the compiler flags used.
  2. I have used the following command west build -p auto -b reel_board samples/hello_world -DW=3, but this one produces thousands of warning lines and I cannot find the warnings of my own main.c.
  3. I tried adding one of those two lines in the CMakeLists.txt file: set_source_files_properties(src/main.c PROPERTIES COMPILE_FLAGS -Wall) and set_target_properties(app PROPERTIES COMPILE_FLAGS -Wall), but they had no effect to the result of the west build command.
In order to verify that the warnings level has changed I am declaring a variable that I am not using, but I do not get a warning for that.
Thank you very much
Parents Reply Children
No Data
Related