Przeglądaj źródła

Set debug_build_flags in platformio.ini

By default PlatformIO sets the debug_build_flags to "-O0 -ggdb3 -g3"
(https://docs.platformio.org/en/latest/projectconf/section_env_debug.html#debug-build-flags)

This makes the bootloader to big to fit in the space allowed.
Changing it to "-Os -ggdb -g3", like the normal build flags, shrinks
the bootloader in so it fits and allows the Visual Studio Code's
debugger to step through the code.
J. Morio Sakaguchi 3 lat temu
rodzic
commit
a38f54bb45
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      platformio.ini

+ 1 - 0
platformio.ini

@@ -41,6 +41,7 @@ platform_packages =
     toolchain-gccarmnoneeabi@1.60301.0
     framework-spl-gd32@https://github.com/CommunityGD32Cores/gd32-pio-spl-package.git
 extra_scripts = src/build_bootloader.py
+debug_build_flags = -Os -ggdb -g3
 build_flags = 
      -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
      -D__SYSTEM_CLOCK_120M_PLL_IRC8M=120000000