Hi,
I am at whits end trying to fix this and I am getting nowhere.
I have a Link EDU Mini connected to a MKRWAN 1310 via the pads on the bottom, both connected to my Mac via separate USB cables and I can’t get debug to work. I say I can’t get it to work, that is not quite right, it gets so far and then just stops, no explanation, no error, just nothing.
So far I have removed Arduino IDE completely, installed a fresh version of VSCode, PlatformIO, installed the GCC toolchain, tried various settings, different applications etc and I get to the same point every time.
I start debug, and after a short time of compiling, I get to a code showing the debug controls and sitting at the function init(). I click on the over to progress debugging and it moves forward and opens setup(), at which point it just stops. This suggests the debugger is working and connected to the Segger, but as to how to progress, I have no idea.
Below are the configuration files:
here is my c_cpp_properties file:-
{
"configurations": [
{
"name": "!!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE [docs.platformio.org/page/proje…nv_build.html#build-flags](https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags)"
},
{
"name": "Mac",
"macFrameworkPath": [],
"includePath": [
"/Users/matthew/Documents/PlatformIO/Projects/arduino_jlink/include",
"/Users/matthew/Documents/PlatformIO/Projects/arduino_jlink/src",
"/Users/matthew/.platformio/packages/framework-cmsis@1.40500.0/CMSIS/Include",
"/Users/matthew/.platformio/packages/framework-cmsis-atmel/CMSIS/Device/ATMEL",
"/Users/matthew/.platformio/packages/framework-arduino-samd/cores/arduino",
"/Users/matthew/.platformio/packages/framework-arduino-samd/variants/mkrwan1300",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/HID",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/I2S/src",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/SAMD_AnalogCorrection/src",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/SAMD_BootloaderUpdater/src",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/SDU/src",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/SPI",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/USBHost/src",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/Wire",
"/Users/matthew/.platformio/packages/tool-unity",
""
],
"browse": {
"limitSymbolsToIncludedHeaders": true,
"path": [
"/Users/matthew/Documents/PlatformIO/Projects/arduino_jlink/include",
"/Users/matthew/Documents/PlatformIO/Projects/arduino_jlink/src",
"/Users/matthew/.platformio/packages/framework-cmsis@1.40500.0/CMSIS/Include",
"/Users/matthew/.platformio/packages/framework-cmsis-atmel/CMSIS/Device/ATMEL",
"/Users/matthew/.platformio/packages/framework-arduino-samd/cores/arduino",
"/Users/matthew/.platformio/packages/framework-arduino-samd/variants/mkrwan1300",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/HID",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/I2S/src",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/SAMD_AnalogCorrection/src",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/SAMD_BootloaderUpdater/src",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/SDU/src",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/SPI",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/USBHost/src",
"/Users/matthew/.platformio/packages/framework-arduino-samd/libraries/Wire",
"/Users/matthew/.platformio/packages/tool-unity",
""
]
},
"defines": [
"PLATFORMIO=50003",
"ARDUINO_SAMD_MKRWAN1310",
"__SAMD21G18A__",
"USE_ARDUINO_MKR_PIN_LAYOUT",
"USE_BQ24195L_PMIC",
"VERY_LOW_POWER",
"ARDUINO=10805",
"F_CPU=48000000L",
"USBCON",
"USB_VID=0x2341",
"USB_PID=0x8059",
"USB_PRODUCT=\"Arduino MKR WAN 1310\"",
"USB_MANUFACTURER=\"Arduino\"",
"ARDUINO_ARCH_SAMD",
""
],
"intelliSenseMode": "gcc-x64",
"cStandard": "c11",
"cppStandard": "c++11",
"compilerPath": "/Users/matthew/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/arm-none-eabi-gcc",
"compilerArgs": [
"-mcpu=cortex-m0plus",
"-mthumb",
""
]
],
"version": 4
My platformio.ini file
[env:mkrwan1310]
platform = atmelsam
board = mkrwan1310
framework = arduino
debug_tool = jlink
upload_protocol = jlink
My launch.json:
// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY
// PIO Unified Debugger
//
// Documentation: [docs.platformio.org/page/plus/debugging.html](https://docs.platformio.org/page/plus/debugging.html)
// Configuration: [docs.platformio.org/page/projectconf/section_env_debug.html](https://docs.platformio.org/page/projectconf/section_env_debug.html)
{
"version": "0.2.0",
"configurations": [
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug",
"executable": "/Users/matthew/Documents/PlatformIO/Projects/arduino_jlink/.pio/build/mkrwan1310/firmware.elf",
"projectEnvName": "mkrwan1310",
"toolchainBinDir": "/Users/matthew/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin",
"svdPath": "/Users/matthew/.platformio/platforms/atmelsam/misc/svd/ATSAMD21G18A.svd",
"preLaunchTask": {
"type": "PlatformIO",
"task": "Pre-Debug"
},
"internalConsoleOptions": "openOnSessionStart"
},
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug (skip Pre-Debug)",
"executable": "/Users/matthew/Documents/PlatformIO/Projects/arduino_jlink/.pio/build/mkrwan1310/firmware.elf",
"projectEnvName": "mkrwan1310",
"toolchainBinDir": "/Users/matthew/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin",
"svdPath": "/Users/matthew/.platformio/platforms/atmelsam/misc/svd/ATSAMD21G18A.svd",
"internalConsoleOptions": "openOnSessionStart"
}
]