Information:
I got a custom board (without much information). It has a USB-C Port and a 6pin-ISP-Interface.
It seems to imitate a Ardunio Micro since Arduino IDE 2 automatically detects it as that.
The uC is an Atmega32u4.
I managed to flash it via MPLAP-IPE (Got a .hex-File from another developer).
It’s also possible to flash it via USB (COM port in Arduino IDE 2).
The source-code is written in “Arduino C++” => .ino files.
I wanna use PlatformIO on VSCode.
Question:
My goal is to flash and debug it via Atmel-ICE (on the ISP-Interface).
Basic question: Is that possible with PlatformIO? Since it isn’t possible with the Arduino IDE 2.
I’ve tried different things, but didn’t get it to work.
My platformio.ini:
[env:micro]
platform = atmelavr
framework = arduino
debug_build_flags = -Os
debug_tool = atmel-ice
debug_init_break = tbreak setup
board = micro
upload_protocol = atmel-ice
DebugInvalidOptionsError: Unknown debug tool
atmel-ice
.
Please use one ofsimavr
orcustom
I think the problem is, that the micro board doesn’t support atmel-ice by default.
I also tried adding a custom board, but I couldn’t figure out how to manipulate the JSON.
I copied the original from GitHub and modified these parts:
"debug": {
"tools": {
"atmel-ice": {
"onboard": false
}
},
"simavr_target": "atmega32u4"
},
"name": "microice",
(also changed the board to microice)
.pioinit:13: Error in sourced command file:
:3333: The system tried to join a drive to a directory on a joined drive.
I guess either it is not possible at all or my custom board JSON is wrong.