Im using Sparkfun Pro Micro with a very simple 2 lines of code to write to the Serial Monitor. It works fine just running it. But I get an exception in Debug , Have no idea why . Can some point me in the right direction.
Platform Ini
[env:sparkfun_promicro16]
platform = atmelavr
board = sparkfun_promicro16
framework = arduino
debug_tool = simavr
Code :
#include <Arduino.h>
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello World!");
}
Running in Debug Mode I get
Reading symbols from c:\Users\Pete Rawlings\Documents\PlatformIO\Projects\Hello World\.pio\build\sparkfun_promicro16\firmware.elf...
done.
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = simavr
PlatformIO: Initializing remote target...
0x00000000 in __vectors ()
warning: Can not parse XML memory map; XML support was disabled at compile time
Temporary breakpoint 1 at 0xe76: file C:\Users\Pete Rawlings\.platformio\packages\framework-arduino-avr\cores\arduino/main.cpp, line 35.
Loading section .text, size 0x1138 lma 0x0
Loading section .data, size 0x36 lma 0x1138
Start address 0x0, load size 4462
Transfer rate: 1089 KB/sec, 185 bytes/write.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = tbreak main`
PlatformIO: More configuration options -> https://bit.ly/pio-debug
Temporary breakpoint
1, main () at C:\Users\Pete Rawlings\.platformio\packages\framework-arduino-avr\cores\arduino/main.cpp:35
35 init();
Breakpoint
2, setup () at src/main.cpp:5
5 Serial.begin(9600);
Breakpoint
3, loop () at src/main.cpp:10
10 Serial.println("Hello World!");
setWriteError () at C:\Users\Pete Rawlings\.platformio\packages\framework-arduino-avr\cores\arduino/Print.h:44
44 void setWriteError(int err = 1) { write_error = err; }
Not implemented stop reason (assuming exception): undefined
Breakpoint
3, loop () at src/main.cpp:10
10 Serial.println("Hello World!");
setWriteError () at C:\Users\Pete Rawlings\.platformio\packages\framework-arduino-avr\cores\arduino/Print.h:44
44 void setWriteError(int err = 1) { write_error = err; }
Not implemented stop reason (assuming exception): undefined
Running normally works fine.