STM32CubeIDE doesn't give error when compile mode is set to Release
Hello,
I have a C++ project on STM32CubeIDE. I noticed that IDE doesn't show any errors in Release mode when I intentionally make error. I see this behavior on files with .hpp and .cpp extensions. On the other hand, I see that IDE can generate errors on console when I make errors in files with .c extensions like main.c. There is no problem when build configuration is set to Debug. I have one ext file, one .hpp file and one .cpp file. I expect to see error I put in this .cpp file.
These are the differences between Debug and Release configurations in Project->Properties->C/C++ Build->Settings section:
MCU GCC Assembler
Debug-> Command: gcc
All options: -mcpu=cortex-m4 -g3 -DDEBUG -c -x assembler-with-cpp --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb
Release-> Command: gcc
All options: -mcpu=cortex-m4 -c -x assembler-with-cpp --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb
MCU GCC Assembler->Debugging
Debug-> Debug level: Maximum (-g3)
Release-> Debug level: None
MCU GCC Assembler->Preprocessor
Debug-> Define symbols (-D): DEBUG
Release-> Define symbols (-D): none
MCU GCC Compiler->Debugging
Debug-> Debug level: Maximum (-g3)
Release-> Debug level: None
MCU GCC Compiler->Preprocessor (This is same but I wanted to show defined symbols in both mode)
Debug-> Define symbols (-D): DEBUG
USE_FULL_ASSERT
USE_HAL_DRIVER
STM32G474xx
LITTLEENDIAN
Release-> Define symbols (-D): DEBUG
USE_FULL_ASSERT
USE_HAL_DRIVER
STM32G474xx
LITTLEENDIAN
MCU GCC Compiler->Optimisation
Debug-> Optimisation level: None(-O0)
Release-> Optimise for size: (-Os)
MCU G++ Compiler->Debugging
Debug-> Debug level: Maximum (-g3)
Release-> Debug level: None
MCU G++ Compiler->Preprocessor (This is same but I wanted to show defined symbols in both mode)
Debug-> Define symbols (-D): DEBUG
USE_FULL_ASSERT
USE_HAL_DRIVER
STM32G474xx
LITTLEENDIAN
Release-> Define symbols (-D): DEBUG
USE_FULL_ASSERT
USE_HAL_DRIVER
STM32G474xx
LITTLEENDIAN
MCU G++ Compiler->Optimisation
Debug-> Optimisation level: None(-O0)
Release-> Optimise for size: (-Os)
I will be very appriciated if you could help me. Thank you in advance.
Best Regards
