AVR32DD14 support

Is the AVR32DD14 supported by platformio? Can I use instead the AVR64DD14 entry in platformio.ini?

Seems to be not supported. I have selected AVR32DB28 and AVR64DB28 respectively even though I don’t need the additional peripherals and pins. Compilation run was successful.

So this is about adding support for that in https://github.com/platformio/platform-atmelmegaavr/.

Board support is added in the form of JSON files in the boards/ folder of the platform. We already have AVR32DA28.json and similiar. The AVR32DD14 was once mentioned in https://github.com/platformio/platform-atmelmegaavr/pull/36. It also supported in the SpenceKondeDxCode:

So judging from that, we can just create a AVR32DD14.json file like this

Sadly this also needs a newer toolchain version with AVR32DD14 support. Taking the exact same one from https://drazzy.com/package_drazzy.com_index.json, we need version 7.3.0-atmel3.6.1-azduino6, the downlink URLs being

URLS
          "name": "avr-gcc",
          "version": "7.3.0-atmel3.6.1-azduino6",
          "systems": [
            {
              "size": "38098458",
              "checksum": "SHA-256:75b9740cf47d41177aff14f9674e25ad378e29fae7633920cdcc7b056e8e9fbe",
              "host": "aarch64-pc-linux-gnu",
              "archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-azduino6-aarch64-pc-linux-gnu.tar.bz2",
              "url": "https://spencekondetoolchains.s3.amazonaws.com/avr-gcc-7.3.0-atmel3.6.1-azduino6-aarch64-pc-linux-gnu.tar.bz2"
            },
            {
              "size": "34520389",
              "checksum": "SHA-256:b41a827e92f6a87c45f2e37029865b6bbd57e0eeadb639be66416b89e8f77b78",
              "host": "arm-linux-gnueabihf",
              "archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-azduino6-arm-linux-gnueabihf.tar.bz2",
              "url": "https://spencekondetoolchains.s3.amazonaws.com/avr-gcc-7.3.0-atmel3.6.1-azduino6-arm-linux-gnueabihf.tar.bz2"
            },
            {
              "size": "37148876",
              "checksum": "SHA-256:24fc6bcd0786d3015346342a2fea5701a0ce11eeea178bac1c1d2b6a9e6d6d03",
              "host": "i686-pc-linux-gnu",
              "archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-azduino6-i686-pc-linux-gnu.tar.bz2",
              "url": "https://spencekondetoolchains.s3.amazonaws.com/avr-gcc-7.3.0-atmel3.6.1-azduino6-i686-pc-linux-gnu.tar.bz2"
            },
            {
              "size": "37715121",
              "checksum": "SHA-256:7c4cc781343cbae77328e7d69433458c105d1efca87a56863947cb73966fe821",
              "host": "x86_64-apple-darwin14",
              "archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-azduino6-x86_64-apple-darwin14.tar.bz2",
              "url": "https://spencekondetoolchains.s3.amazonaws.com/avr-gcc-7.3.0-atmel3.6.1-azduino6-x86_64-apple-darwin14.tar.bz2"
            },
            {
              "size": "37714803",
              "checksum": "SHA-256:3a4be4dde46b9ee5af1d89fb50512dea0a1c49fca5f2b18357bd5fd12d6c330d",
              "host": "x86_64-pc-linux-gnu",
              "archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-azduino6-x86_64-pc-linux-gnu.tar.bz2",
              "url": "https://github.com/SpenceKonde/DxCore/raw/gh-pages/avr-gcc-7.3.0-atmel3.6.1-azduino6-x86_64-pc-linux-gnu.tar.bz2"
            },
            {
              "size": "44740781",
              "checksum": "SHA-256:4b4a25ca7935402998b27befd9439300ad642c4e21b0becb3f945748090c7c74",
              "host": "i686-w64-mingw32",
              "archiveFileName": "avr-gcc-7.3.0-atmel3.6.1-azduino6-i686-w64-mingw32.tar.bz2",
              "url": "https://spencekondetoolchains.s3.amazonaws.com/avr-gcc-7.3.0-atmel3.6.1-azduino6-i686-w64-mingw32.tar.bz2"
            }
          ]

So, if you want to test this out, you can download this repo and try to build + upload.

For setting the uploader (default: jtag2updi), please also see here.

1 Like

Hello Maximilian, thanks for your reply and the effort you spent. Sorry for the late reply. I was busy with my current job.
I can confirm proper compilation of your test repo. How can I set the atmel tool chain to another location?

toolchain-atmelavr@symlink://custom_packages/toolchain-atmelavr-windows

So basically, the folder custom_packages is almost 280MByte and I want to place it in a dedicated place that all projects can use it. I’m not aware how this symlink stuff is working. The folder will not be part of one project but somewhere upper level.

Next issue: I would like to use the AVR32DD20 as well. I have tried with your test repo but no success. Could you please advice the requiered steps to update for this device?

Many thanks.
Regards Andreas

As documented, you can use relative and absolute filepaths here. Just think of it as symlink://<path>.

So, to point it e.g. “one directory above the project directory, and then custom_packages/toolchain-atmelavr-windows”, we would use ../ to go one directory up

  toolchain-atmelavr@symlink://../custom_packages/toolchain-atmelavr-windows

Or using a full path

  toolchain-atmelavr@symlink://C:/custom_packages/toolchain-atmelavr-windows

to piont to C:/custom_packages/toolchain-atmelavr-windows.

I didn’t encounter any issue when I added the AVR32DD20.json file. Check the updated repository from above.

Thanks for your hints and link to pkg install documentation.
Regarding support of AVR32DD20, the JSON File in boards was the key to success.

@maxgerhardt Thanks a lot for this implementation!
Is there any chance this could get merged upstream? I’m thinking about using a AVR32DD20 for a new project of mine and it would be amazing to have upstream PlatformIO support for this :slight_smile:

Clara

I opened the issue

some time ago, but no reaction yet. The problem here is that I can’t create a self-contained pull-request for platform-atmelmegaavr because this chip needs the custom toolchain (otherwise -mcu=avr32dd14 is just unrecognized), and that must (or strongly should be) be uploaded into PlatformIO’s package repository under the PlatformIO owner.

But I can get the ball rolling by just submitting the board definitions at least.

1 Like

It’s posted at https://github.com/platformio/platform-atmelmegaavr/pull/73 now, but as said, this will need manual intervention by the PlatformIO team.

1 Like

This is great, thanks you so much for your effort! Let’s hope there will be feedback.

Clara

Thanks for the link, you made my day :slight_smile:

.

Expanding AVR32DD14 support in PlatformIO is a great idea! Adding high-efficiency MOSFETs like PN7092 could enhance power handling in custom AVR projects, ensuring better switching performance. Are you working on a specific application that needs optimized power control?