diff --git a/Firmware/platformio.ini b/Firmware/platformio.ini index 3f8713d..7f2e8ae 100644 --- a/Firmware/platformio.ini +++ b/Firmware/platformio.ini @@ -4,15 +4,11 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -default_envs = release +default_envs = debug libdeps_dir = depends [env] -platform = atmelavr - -; solves avr-debugger issue https://github.com/jdolinay/avr_debug/issues/19 -platform_packages = - toolchain-atmelavr@~1.70300.0 ; use GCC AVR 7.3.0+ +platform = atmelavr @ ^3.3.0 board = emgdmm_v3 monitor_speed = 9600 @@ -25,21 +21,23 @@ lib_deps = [env:release] ; for flash via bootloader ; keep defaults, see board definitions for programming support + [env:debug] ; for debugging using avr-stub, see documentation build_type = debug build_flags = -D DEBUG - -D GDBSTUB + -D GDBSTUB ; program should disable any own UART use if this is defined -D AVR8_BREAKPOINT_MODE=2 - ;-D __AVR_ATmega1284P__ ; required by avr8-stub.c debug_tool = avr-stub +debug_port = /dev/ttyUSB0 ; TODO: this should be infered automagically -; GDB stub implementation +; add GDB stub implementation lib_deps = ${env.lib_deps} jdolinay/avr-debugger @ ^1.3 + [env:jtag] ; for JTAG bootloader flashing and potentialy debugging once supported build_type = debug build_flags =