Support for Arduino DxCore

Can you add support for the Arduino DxCore for the AVR DA/DB series? Maybe it is similar to MegaCoreX.


I’m assuming that there isn’t specific AVR DB support yet, but is there maybe a framework I could choose for AVRxm compilation support? According to the AVR datasheet AVRxm includes instructions that aren’t on the 328P such as LAC/LAS/LAT/XCH, and the timing is also changed for quite a few instructions compared to the AVRe+. Best I can tell it’s been available since around Nov 2019. EDIT: Maybe AVRxm was actually 2016? In that case, maybe the compiler I have is fine? I’ll look more closely at the SpenceKonde offering. It may be enough.

I ordered the 24MHz AVR128DB28. I don’t have a real goal in mind for it, but it’s breadboardable, has 128K SRAM, but is smaller than the 1284 and seems like a great chip to play around with.

Would this be considered a new framework? Is there a general approach when adding a framework, and is it something I can do without recompiling the PlatformIO stuff like the plugin? I’ve only been a PlatformIO user (inside vscode), so the most I’ve really done is dig around in headers and such. As such, I might not be the best person for the job, but I’m willing to give it a try to see what I can come up with. Any positive guidance is welcome.

This is being tracked in support for AVR Dx series / DxCore · Issue #11 · platformio/platform-atmelmegaavr · GitHub.

A PR is already made which implements the integration of the core into PlatformIO, see Add support for AVR-DA and AVR-DB series by MCUdude · Pull Request #18 · platformio/platform-atmelmegaavr · GitHub. There was quite some activity a month ago there and talks about about getting it in after the next realease (which is supposed to happen this week).

Edit: Oh wow, looking at Pull requests · platformio/platform-atmelmegaavr · GitHub there are 3 pull requests for the same goal: Integrating that core. I’m sure something will happen there soon.

1 Like

PlatformIO is meanwhile only annoying. Sorry, I used it for many years but there is no user friendly development. For DxCore I use the Arduino Pro IDE, for Mbed I use Mbed Studio.
PIO have to rethink about their build system. Arduino and Mbed have CLI support which allows to be more user friendly. I don’t want to wait for updates and support of 3rd party cores when I can get them immediately.

I use Visual Studio Code for my IDE, so if the need arises I can fully customize the way in which it compiles and uploads my project to circumvent PIO. However, for me, PlatformIO pretty much “just works”, and as a programmer, I can really appreciate the massive amount of effort required to make something like that happen. And AFAIK, vscode isn’t really their primary focus, either, but I still see updates come in regularly.

If I can help out in some small way, I will. In this case, I’m glad I asked before I dove in, because it turns out that support will be coming very soon. In the meantime I can read the datasheet and dream up project ideas for my shiny new chip. :grinning: EDIT: BTW, thanks for asking for this support back in November. In a way, you helped kick things off for me!

Not much here recently. I have a custom board with a AVR128DA28 chip that I have no way to efficiently program besides the Arduino IDE. Their 2.0 Beta debugger does not support AVR128DA28. Is there any way to bump this project?

The question is, “How soon?” People were asking for this last November which is 4+ months ago. Spence Konde has released DxCore 1.3.2, it works with the Arduino IDE. They don’t yet support a debugger. How do people develop more complex systems without a debugger? It’s pretty painful and wastes a lot of time…

I got it working using my hack method… mostly. It builds like if I were using the Arduino IDE. But, inside vscode it’s pretty clunky because it uncovered limitations in vscode I wasn’t expecting (if you have a PlatformIO folder open, it tries to build using PlatformIO even on non-PlatformIO folders).

Haven’t seen any movement on adding DxCore since February, and it’s not really clear to me what the holdup is or who is working on it (there are a couple failing tests in a pull request, but there’s probably a reason the submitter didn’t try to fix them).

It might be nice if PlatformIO could have a way to add a board (probably in a new section, so as not to contaminate the real boards list) based on the current build settings from the Arduino IDE (it’d need to be a copy, because otherwise it’d be lost when the build settings in the Arduino IDE are changed, it seems like you’re only allowed to build one board at a time and the settings aren’t stored per project). At least that way we could build in a mostly seamless way and it won’t make these long waits for proper support quite so painful. However, it could never replace a real PlaformIO build, because you lose a lot of control over how the project is built (the Arduino wrapper tools merely generate the actual build commands, vs PlatformIO being the one doing that).

Alternatively, do PlatformIO docs exist explaining the vscode-related PlatformIO build system in detail, how to add new boards, etc? It might be worth a try, because it’d probably reveal to me where the problems are and then maybe I can help.