Open fernando-excelsense opened 1 year ago
Hi, sorry for late reply. The error message does not say much, the gdb on your computer is not able to communicate with the stub in your board. There may be many reasons.
First, I'd like to say you should be able to use the debugger without changing the bootloader. New bootloader is only needed for the "flash breakpoints" configuration. Even if you want to use this configuration it will be easier to first get it running with the default "RAM breakpoints", and this is completely independent of the bootloader.
The baud rate for the bootloader is not related to the baud rate for the debugger. For the debugger you can select baudrate using the AVR8_USER_BAUDRATE compile option. Default is 115200 but I suspect if you use 8 MHz clock for the CPU, then the baudrate is 57600.
You could try to set the baudrate in you platform.ini file using the debug_build_flags. Something like this:
debug_build_flags =
-Og
-g2
-DDEBUG
-DAVR8_USER_BAUDRATE=57600
Another problem may be how to tell gdb to use this baudrate. Probably this is in this section in custom.json: "avr-stub": { "speed": 115200 } where you can change it to 57600.
Hi, thank you for the help, it is working now!
Hi, I am trying to use your debugger in a simple code using a custom board with and Atmega1284p, but I am not able to get it to work. I tried getting the optiboot bootloader and changing the Make file to set the following information.
What I changed:
After compiling and loading this new bootloader to my device, I am able to program it, but the debugger is not working.
main.cpp
platformio.ini
custom.json
The error I am getting...
I also tried following the bootloader flash instructions in avr_debug/bootloader/optiboot/readme_platformio.txt, but I cannot make it work.
Could you please let me know what I might be doing wrong and how to fix this issue?
Thanks!