-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Hi,
I'm using the platformIO extension in VS Code, and building a debug version of the mbed-rtos example code, using the platformio.ini below, setting extra debug flags, and unsetting the defaults.
The flags are applied to the "core" files, main.c etc, but not to the "rtos" files. As a result I cannot properly debug into these files.
In BLUEPILL_F103C8.json these files are under the "libs" element.
The same behavior occurs with the USBDevice files, which are also under "libs" (that's how i came across this problem; I was playing around with the USBDevice stack on bluepill and needed debugging on the usb files).
[env:bluepill_f103c8_debug]
platform = ststm32
framework = mbed
board = bluepill_f103c8
build_flags = -DPIO_FRAMEWORK_MBED_RTOS_PRESENT, -g3, -Og
build_unflags = -Os, -O1, -O2, -O3, -g1
excerpt from the verbose build :
arm-none-eabi-g++ -o .pioenvs/bluepill_f103c8_debug/lib7ec/rtos/ThisThread.o -c -std=gnu++98 -fno-rtti -Wvla -g3 -Og -mcpu=cortex-m3 -mthumb -c -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -MMD -fno-delete-null-pointer-checks -fomit-frame-pointer -Os -DNDEBUG -g1 -include mbed_config.h -DPLATFORMIO=30604 ...
arm-none-eabi-g++ -o .pioenvs/bluepill_f103c8_debug/lib7ec/rtos/Thread.o -c -std=gnu++98 -fno-rtti -Wvla -g3 -Og -mcpu=cortex-m3 -mthumb -c -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -MMD -fno-delete-null-pointer-checks -fomit-frame-pointer -Os -DNDEBUG -g1 -include mbed_config.h -DPLATFORMIO=30604 ...
arm-none-eabi-g++ -o .pioenvs/bluepill_f103c8_debug/src/main.o -c -std=gnu++98 -fno-rtti -Wvla -g3 -Og -mcpu=cortex-m3 -mthumb -c -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -MMD -fno-delete-null-pointer-checks -fomit-frame-pointer -DNDEBUG -include mbed_config.h -DPLATFORMIO=30604 ...