Wiz-IO / platform-sam-lora

Microchip Atmel SAM34/35 platform for PlatformIO
26 stars 6 forks source link

Modify the builder / uploader for alternative programmers #4

Closed Jakub-Nagy closed 3 years ago

Jakub-Nagy commented 3 years ago

Hello everyone, I have tried various cores for the SAM R34, but I like this very much because it supports PlatformIO, which is great.

A large disadvantage is that it only works with the EDBG chip found on the Xplained Pro board, but not on most custom implementations of the chip.

The question is, what would it take to modify the uploader script to make this work with either Jlink or with a UF2 bootloader? I'm assuming that the compilation wouldn't need to be changed. Can you point me to any resources that guide on how to do this? I'm willing to do this and also have other developers to do this, but we're struggling to find the resources. Thanks.

Wiz-IO commented 3 years ago

Hi https://github.com/Wiz-IO/platform-sam-lora/blob/master/builder/frameworks/arduino-samr34.py#L14 is PIO uploading entry point

https://github.com/Wiz-IO/platform-sam-lora/blob/master/builder/frameworks/arduino-samr34.py#L20 call EDBG uploader

https://github.com/Wiz-IO/platform-sam-lora/blob/master/builder/frameworks/arduino-samr34.py#L16 call custom boot load

Jakub-Nagy commented 3 years ago

Thank you for the info.

This should be the definition of the EDBG uploader, correct?

I was looking at platform-atmelsam to find a similar definition. I found this jlink uploader here. Could that be implemented instead of the current atprogram?

Wiz-IO commented 3 years ago

yep... edit and test
platform files is in C:\Users\USER_NAME.platformio\platforms\sam-lora\builder\frameworks

Wiz-IO commented 3 years ago

soon - Pickit4 and CMSIS-DAP & OpenOCD https://www.youtube.com/watch?v=bB29z8-Modg&ab_channel=GeorgiAngelov