Skip to content

Instantly share code, notes, and snippets.

@msquirogac msquirogac/main.cpp

Last active May 19, 2020
What would you like to do?
Platformio configuration for avr_debug integration
// Download lib from
#include <avr8-stub.h>
#include <app_api.h>
void setup(void)
/* config here */
void loop(void)
/* code here */
platform = atmelavr
board = nanoatmega328new
framework = arduino
lib_deps = avr-debugger ; Optional parameter, PlatformIO should auto include all dependencies
debug_tool = custom ; Defines a custom configuration to use with avr-gdb
debug_load_cmds = preload ; Always upload firmware before debugging, this uses the regular upload mechanism (bootloader)
debug_port = /dev/ttyUSB0 ; Serial port where the board is connected
debug_init_cmds =
define pio_reset_halt_target
define pio_reset_run_target
file "$PROG_PATH"
set serial baud 115200
target remote $DEBUG_PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.