In my quest for faster code uploads to AVR4809, today I explored using an Arduino Uno and JTAG2UPDI to create an UPDI programmer. It seemed to work quite well in the Arduino IDE. So I thought I’d give it a try in Platformio, but then whilst exploring the use of JTAG2UPDI in PIO, I found
I followed the
link to an issue posted on github, but it’s unclear if the issue is resolved.
Anyone know if I can successfully configure pio to use JTAG2UPDI ?
I tried an upload using this excerpt from pio.ini
; Upload protocol for UPDI upload
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i
but although the code uploads, it doesn’t run.
The upload is very fast at 6 seconds, compared to pymcuprog which takes about 27 seconds.
Is the fix required to solve this likely to be any priority for the PIO team?
For the meantime, I’m back in the Arduino IDE if I want to upload code.
Oh I totally remember doing something similiar for platform-atmelavr.
11:50AM - 01 Nov 22 UTC
Adds all four [Move38](https://move38.com/) boards along with
… an example for them from [their core](https://github.com/bigjosh/Move38-Arduino-Platform/tree/1.3/libraries/Examples01/examples/F-ColorWheel).
The build logic of this Arduino core is quite peculiar in some places, requiring an explicit linker script and address change of the firmware in the `.hex` conversion. This is replicated in PlatformIO.
You may want to package `framework-arduino-avr-blinklib` yourself in the registry (current stable version: 1.3).
(And squash upon merge, the commit history is not clean.)
If you want to try out a fix locally, you could go to your local
and change this block
]), "Building $TARGET"),
]), "Building $TARGET"),
Actually that may be BS in this case, did you try the modification I originally wrote?
That is uhm, very weird.
That is only half the rent, the other one is merging the bootloader.hex when creating the firmware hex. Both of this requires changes in the Python code of platform-atmelmegaavr (or an addition of a
extra_script) and some knowledge of PlatformIO and SCOns.
For example, in arduino.py, at e.g. line 76, you would have to add something like
if build_core == "MegaCoreX":
and then this would have to be addapted …
Hi, as far as I am aware the issue has not been resolved.
If you look through my original postings I have detailed a work around, which means you can upload and run via UPDI, but you don’t have the full flexibility you should have.
One thing to note though is that if you set the fuses correctly you can configure it to use a “normal” FTDI which allows you to program but also serial monitor and debug a lot easier.
Thanks for replies, is using the ftdi solution easier than what Max is suggesting? I use FTDIs with my 4809s to do the serial comms.
Might you have any further info on what needs to be done ?
thanks, but on reflection, I think what you’ve described is what I was doing via FTDI and a set up as diagrammatically described in Pyupdi
here which became deprecated. I then progressed to Pymcuprog, but find that slow.