pragma GCC optimize("O0") issue
Hello,
I use arm-cortexm4 microcontroller which is stm32f303.
The arm gcc compiler version is 5.4 2016q2.
Code development envirment is Eclipse/STM32 AC6.
I have tryed to use optimize level3(-O3) in whole project expect 1 file. Then used optimize pragma code to change optimizing level for aaaa.c file like below.
#pragma GCC push_options
#pragma GCC optimize("O0")
#includes ....
Source codes...
//End of the code
#pragma GCC pop_options
After compiling the related make file output is:
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../Menu/
OBJS += \
./Menu/
C_DEPS += \
./Menu/
# Each subdirectory must supply rules for building sources it contributes
Menu/LcdDriver/%.o: ../Menu/
@echo 'Building file: $<'
@echo 'Invoking: MCU GCC Compiler'
@echo %cd%
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DSTM32F30 -DSTM32F3 -DSTM32F303VBTx -DSTM32 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F303xC -I"E:/workspace
@echo 'Finished building: $<'
@echo ' '
As you can see here optimizing leve still -O3.
How can I change it to -O0?
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Tejas Belagod
- Solved:
- Last query:
- Last reply: