platformio / platform-atmelsam

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

SAME5X patch for openocd #43

Closed Timvrakas closed 5 years ago

Timvrakas commented 5 years ago

Boards based on SAMD51, SAME51, SAME54, etc. need OpenOCD with this patch http://openocd.zylin.com/#/c/4272/ in order for atmel-ice uploading and debugging to work. I just compiled and it all works as expected.

ivankravets commented 5 years ago

I see that the patch was merged into the upstream branch. Currently, we use openOCD binaries for ARM provided by @ilg-ul in https://github.com/gnu-mcu-eclipse/openocd

We can wait when Liviu release next binaries where this patch is included or you can file a feature request in this repository https://github.com/gnu-mcu-eclipse/openocd/issues

Timvrakas commented 5 years ago

Oh man, what are the chances of that timing? I didn't see that it was merged. I'll bring it up there.

ilg-ul commented 5 years ago

Could you test v0.10.0-12 from https://github.com/gnu-mcu-eclipse/openocd/releases ?

ivankravets commented 5 years ago

Please re-test with upstream version http://docs.platformio.org/en/latest/platforms/atmelsam.html#upstream

coolio986 commented 5 years ago

I have just tried the upstream version for the SAMD51 on windows 10. Still the same issue, no uploading or debugging working.

Error: error during select: Unknown error .pioinit:12: Error in sourced command file: Remote communication error. Target disconnected.: No error

Request re-open the issue

ivankravets commented 5 years ago

Could you provide more details? What is your debug tool/adapter?

coolio986 commented 5 years ago

I made a duplicate issue here: /issues/59

Using an atmel-ice

[env:adafruit_metro_m4] platform = atmelsam board = adafruit_metro_m4 framework = arduino

debug_tool = atmel-ice upload_protocol = atmel-ice

coolio986 commented 5 years ago

j-link works as expected, just not the ice

ivankravets commented 5 years ago

Let's move to this issue https://github.com/platformio/platform-atmelsam/issues/59