Variables optimized out when remote debugging arm-none-eabi-gcc application

I'm remote debugging an application compiled with arm-none-eabi-gcc using JLinkGDBServer. Using either -O0 or -Og, some variables are displayed as optimized out.

Flags verified in flags.cmake:

# compile C with /usr/local/bin/arm-none-eabi-gcc
C_FLAGS = --std=gnu99 -Wall -Wno-attributes -Wno-format -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -Og -g3   -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DDEBUG=1 -DMAX_NUM_CONNECTIONS=1 -DTARGET_ATSHARED_COMPONENTS -DCONFIG_GPIO_AS_PINRESET -Wno-unknown-pragmas -std=gnu99

0

Please sign in to leave a comment.