Thanks for your quick answer!
Yeah the launch.json got generated. Skip pre-debug gives me some kind of gdb error.
You can see both tasks running here: https://imgur.com/a/0PCzeUx
Yeah got the expected results of openocd.
CURRENT: upload_protocol = atmel-ice
Uploading .pio\build\control\firmware.bin
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.10.0+dev-00378-ge5be992df (2020-06-26-09:29)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
at91samd21e17
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00005230 msp: 0x20004000
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked
My platformio.ini
[platformio]
default_envs = control
[common]
monitor_speed = 9600
extra_scripts = pio/name-firmware.py
build_flags = -D MON_SPEED=${common.monitor_speed}
[env:control]
platform = atmelsam
board_build.variants_dir = customBoards
board = control_board
framework = arduino
monitor_speed = ${common.monitor_speed}
build_flags = ${common.build_flags}
extra_scripts = ${common.extra_scripts}
src_filter = +<*> -<counter.cpp> -<function_gen.cpp>
upload_protocol = atmel-ice
debug_tool = atmel-ice
control_board.json
{
"build": {
"arduino": {
"ldscript": "flash_without_bootloader.ld"
},
"core": "arduino",
"cpu": "cortex-m0plus",
"extra_flags": [
"-DARDUINO_QWIIC_MICRO",
"-DCRYSTALLESS",
"-D__SAMD21E17A__",
"-DARM_MATH_CM0PLUS"
],
"f_cpu": "48000000L",
"hwids": [
[
"0x1B4F",
"0x0019"
],
[
"0x1B4F",
"0xF019"
]
],
"mcu": "samd21e17a",
"usb_product": "Custom ATSAMD21E17A Board",
"variant": "control_board"
},
"debug": {
"jlink_device": "ATSAMD21E17",
"openocd_chipname": "at91samd21e17",
"openocd_target": "at91samdXX",
"svd_path": "ATSAMD21E174.svd"
},
"frameworks": [
"arduino"
],
"name": "Custom ATSAMD21E17A Board",
"upload": {
"disable_flushing": true,
"maximum_ram_size": 16384,
"maximum_size": 131072,
"native_usb": true,
"offset_address": "0x0000",
"protocol": "atmel-ice",
"protocols": [
"sam-ba",
"blackmagic",
"jlink",
"atmel-ice"
],
"require_upload_port": true,
"use_1200bps_touch": true,
"wait_for_upload_port": true
},
"url": "https://mc8051.de/",
"vendor": "mc8051"
}