raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.26k stars 838 forks source link

Sets PICO_DEOPTIMIZED_DEBUG to be enabled by default #1621

Open recursivenomad opened 5 months ago

recursivenomad commented 5 months ago

Optimizing a debug build with PICO_DEOPTIMIZED DEBUG disabled (the current default) results in breakpoints not being possible in certain functions. This change makes the default behaviour of PICO_DEOPTIMIZED_DEBUG to be enabled, so that debug builds will fully work as expected when no explicit value for the option is passed.

Since the cache stores the default value of PICO_DEOPTIMIZED DEBUG, you will need to delete the CMakeCache.txt previously generated in your project directory for this change to default behaviour to take effect in existing projects.

This commit is related to pull request #1620 in the primary repository.

See Issue #1618 in the primary repository for additional context.

recursivenomad commented 5 months ago

(I acknowledge that this change may be controversial as it changes the default optimization of debug builds, so please consider this pull request with caution)

kilograham commented 1 month ago

converting to draft as we likely will not doing this (still open for now)