platformio / platform-atmelsam

Atmel SAM: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelsam
Apache License 2.0
79 stars 105 forks source link

malloc() call when debugging SAMD21 crashes with var-create: unable to create variable object error #105

Open ASL07 opened 4 years ago

ASL07 commented 4 years ago

What kind of issue is this?


Configuration

Operating system: OS X PlatformIO Version (platformio --version): 4.3.1

Description of problem

I am debugging a Samd21 board with platformio on VScode using SWD connection on Jlink

When malloc() is called, the debugger crashes with var-create: unable to create variable object . It works with platformio 4.0.1

The code is perfectly fine and works when not in debug mode. Somewhere I have seen that downgrading pio version fixes it. I have downgraded to 4.0.1 and it works no fine

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:mkrgsm1400]
platform = atmelsam
board = mkrgsm1400
framework = arduino
lib_extra_dirs = /Users/developer/Code/common

; SWD interface
upload_protocol = jlink
debug_tool = jlink
debug_load_mode = modified
debug_init_break = break setup