STMicroelectronics / STM32CubeWB

Full Firmware Package for the STM32WB series: HAL+LL drivers, CMSIS, BSP, MW, plus a set of Projects (examples and demos) running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits).
https://www.st.com/en/embedded-software/stm32cubewb.html
Other
225 stars 138 forks source link

Compiling a generated CMake project unchanged results in 33 warnings #107

Closed JayToltTech closed 2 weeks ago

JayToltTech commented 2 weeks ago

Describe the set-up

Describe the bug

33 warnings are generated using the default compiler settings set in the generated CMake file (which are set pretty conservatively).

I attempted to see if there is a 'template' directory in this repo that I could use to submit patches that would fix the generated code, but I didn't find such. Is there a way I can help get CubeMX to generate code that compiles clean without warnings? It's important to me as I am making a medical device and I would like to be able to leverage CubeMX without having to go through a hefty patch list any time I regenerate code.


Copy of the warnings produced by VSCode performing the CMake build

[{ "resource": "/Users/jay/Code/JustCubeMX/CMakeLists.txt", "owner": "cmake-configure-diags", "severity": 4, "message": "CMake Warning (dev) at CMakeLists.txt:31 (enable_language):project() should be called prior to this enable_language() call.", "source": "CMake (enable_language)", "startLineNumber": 31, "startColumn": 1, "endLineNumber": 31, "endColumn": 10000 },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/app_debug.c", "owner": "cmake-build-diags", "severity": 4, "message": "missing initializer for field 'STBY_DebugGpioaPinList' of 'SHCI_C2_DEBUG_GeneralConfig_t' [-Wmissing-field-initializers]", "source": "GCC", "startLineNumber": 75, "startColumn": 1, "endLineNumber": 75, "endColumn": 1000, "relatedInformation": [ { "startLineNumber": 709, "startColumn": 16, "endLineNumber": 709, "endColumn": 1000, "message": "'STBY_DebugGpioaPinList' declared here", "resource": "/Users/jay/Code/JustCubeMX/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h" } ] },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/app_debug.c", "owner": "cmake-build-diags", "severity": 4, "message": "case label is not an integer constant expression [-Wpedantic]", "source": "GCC", "startLineNumber": 269, "startColumn": 9, "endLineNumber": 269, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/app_debug.c", "owner": "cmake-build-diags", "severity": 4, "message": "case label is not an integer constant expression [-Wpedantic]", "source": "GCC", "startLineNumber": 272, "startColumn": 9, "endLineNumber": 272, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/app_debug.c", "owner": "cmake-build-diags", "severity": 4, "message": "case label is not an integer constant expression [-Wpedantic]", "source": "GCC", "startLineNumber": 275, "startColumn": 9, "endLineNumber": 275, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/app_entry.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'task_id_bm' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 575, "startColumn": 37, "endLineNumber": 575, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/app_entry.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'evt_waited_bm' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 575, "startColumn": 63, "endLineNumber": 575, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/app_entry.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'pdata' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 581, "startColumn": 35, "endLineNumber": 581, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/app_entry.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'flag' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 587, "startColumn": 37, "endLineNumber": 587, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/app_entry.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'timeout' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 593, "startColumn": 34, "endLineNumber": 593, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/hw_timerserver.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'phrtc' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 589, "startColumn": 68, "endLineNumber": 589, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/hw_timerserver.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'TimerProcessID' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 883, "startColumn": 43, "endLineNumber": 883, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Core/Src/hw_timerserver.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'TimerID' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 883, "startColumn": 67, "endLineNumber": 883, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'hipcc' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 418, "startColumn": 85, "endLineNumber": 418, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c", "owner": "cmake-build-diags", "severity": 4, "message": "embedding a directive within macro arguments is not portable", "source": "GCC", "startLineNumber": 132, "startColumn": 1, "endLineNumber": 132, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c", "owner": "cmake-build-diags", "severity": 4, "message": "embedding a directive within macro arguments is not portable", "source": "GCC", "startLineNumber": 135, "startColumn": 1, "endLineNumber": 135, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c", "owner": "cmake-build-diags", "severity": 4, "message": "embedding a directive within macro arguments is not portable", "source": "GCC", "startLineNumber": 137, "startColumn": 1, "endLineNumber": 137, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c", "owner": "cmake-build-diags", "severity": 4, "message": "embedding a directive within macro arguments is not portable", "source": "GCC", "startLineNumber": 140, "startColumn": 1, "endLineNumber": 140, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'CPU' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 618, "startColumn": 34, "endLineNumber": 618, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'CPU' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 633, "startColumn": 37, "endLineNumber": 633, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'RTC_TimeStampPin' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 194, "startColumn": 100, "endLineNumber": 194, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'RTC_TimeStampPin' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 256, "startColumn": 103, "endLineNumber": 256, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Middlewares/ST/STM32_WPAN/utilities/stm_queue.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'q' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 245, "startColumn": 45, "endLineNumber": 245, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Middlewares/ST/STM32_WPAN/utilities/stm_queue.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'elementSize' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 245, "startColumn": 58, "endLineNumber": 245, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Middlewares/ST/STM32_WPAN/utilities/stm_queue.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'buffer' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 245, "startColumn": 80, "endLineNumber": 245, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Middlewares/ST/STM32_WPAN/utilities/stm_queue.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'q' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 315, "startColumn": 44, "endLineNumber": 315, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Middlewares/ST/STM32_WPAN/utilities/stm_queue.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'elementSize' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 315, "startColumn": 57, "endLineNumber": 315, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/Middlewares/ST/STM32_WPAN/utilities/stm_queue.c", "owner": "cmake-build-diags", "severity": 4, "message": "unused parameter 'buffer' [-Wunused-parameter]", "source": "GCC", "startLineNumber": 315, "startColumn": 79, "endLineNumber": 315, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/STM32_WPAN/Target/hw_ipcc.c", "owner": "cmake-build-diags", "severity": 4, "message": "ISO C does not allow extra ';' outside of a function [-Wpedantic]", "source": "GCC", "startLineNumber": 267, "startColumn": 48, "endLineNumber": 267, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/STM32_WPAN/Target/hw_ipcc.c", "owner": "cmake-build-diags", "severity": 4, "message": "ISO C does not allow extra ';' outside of a function [-Wpedantic]", "source": "GCC", "startLineNumber": 268, "startColumn": 43, "endLineNumber": 268, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/STM32_WPAN/Target/hw_ipcc.c", "owner": "cmake-build-diags", "severity": 4, "message": "ISO C does not allow extra ';' outside of a function [-Wpedantic]", "source": "GCC", "startLineNumber": 306, "startColumn": 44, "endLineNumber": 306, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/STM32_WPAN/Target/hw_ipcc.c", "owner": "cmake-build-diags", "severity": 4, "message": "ISO C does not allow extra ';' outside of a function [-Wpedantic]", "source": "GCC", "startLineNumber": 307, "startColumn": 41, "endLineNumber": 307, "endColumn": 1000 },{ "resource": "/Users/jay/Code/JustCubeMX/STM32_WPAN/Target/hw_ipcc.c", "owner": "cmake-build-diags", "severity": 4, "message": "ISO C does not allow extra ';' outside of a function [-Wpedantic]", "source": "GCC", "startLineNumber": 669, "startColumn": 44, "endLineNumber": 669, "endColumn": 1000 }]

ALABSTM commented 2 weeks ago

Hi @JayToltTech,

Thank for this report. However, as indicated in the CONTRIBUTING.md, aspects related to the tools, please submit your reporte here.

Please allow me to close this thread. Thank you for your comprehension.

With regards,