Use -g2 or -g3 for debug builds
yconst opened this issue · 3 comments
yconst commented
It appears that -g2
or -g3
are incompatible with __attribute__((section(".data")))
in newer gcc builds, as is discussed here.
In order to use these flags for improved debug insights, we need to conditionally move functions to RAM only in release builds. This will probably need replacing the PAC5XXX_RAMFUNC macro with one that is defined in an if block.
yconst commented
However this will conflict with NVM functions that need to be placed in RAM anyway.
yconst commented
NVM functions could be left in flash for debug builds, issuing a warning that use thereof is discouraged in debug. In any case, the incompatibility between debug flags and RAM functions seems like a pretty important issue in general.