Last active
May 19, 2020 10:18
-
-
Save msquirogac/9926bc47129f39fb2cae46b115f36f15 to your computer and use it in GitHub Desktop.
Platformio configuration for avr_debug integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Download lib from https://github.com/jdolinay/avr_debug | |
#include <avr8-stub.h> | |
#include <app_api.h> | |
void setup(void) | |
{ | |
debug_init(); | |
/* config here */ | |
} | |
void loop(void) | |
{ | |
breakpoint(); | |
/* code here */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[env:nanoatmega328new] | |
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 | |
end | |
define pio_reset_run_target | |
end | |
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