smittytone / RP2040-FreeRTOS

Raspberry Pi RP2040 FreeRTOS baseline development project
https://blog.smittytone.net/2022/02/24/how-to-use-freertos-with-the-raspberry-pi-pico/
MIT License
110 stars 40 forks source link

Debug build does not enable -g flag #3

Closed kapacuk closed 1 year ago

kapacuk commented 1 year ago

Steps to reproduce:

$ cmake -B debug -DCMAKE_BUILD_TYPE=Debug -DPICO_DEOPTIMIZED_DEBUG=1
$ grep C_FLAGS debug/*/*/*/flags.make
debug/App-IRQs/CMakeFiles/IRQS_DEMO.dir/flags.make:C_FLAGS = -mcpu=cortex-m0plus -mthumb  -DTSDEBUG -ffunction-sections -fdata-sections
debug/App-Scheduling/CMakeFiles/SCHEDULING_DEMO.dir/flags.make:C_FLAGS = -mcpu=cortex-m0plus -mthumb  -DTSDEBUG -ffunction-sections -fdata-sections
debug/App-Template/CMakeFiles/TEMPLATE.dir/flags.make:C_FLAGS = -mcpu=cortex-m0plus -mthumb  -DTSDEBUG -ffunction-sections -fdata-sections
debug/App-Timers/CMakeFiles/TIMERS_DEMO.dir/flags.make:C_FLAGS = -mcpu=cortex-m0plus -mthumb  -DTSDEBUG -ffunction-sections -fdata-sections

I would expect to see -O0 -g in C_FLAGS

smittytone commented 1 year ago

Will take a look, but will likely update this using the methodology from Depot (which I'd have got round to eventually, but not soon, so thanks for the prompt).