I’m trying to use PlatformIO with samd51 (Adafruit Grand Central M4) and I facing something that let me think code is incomplete.
In some .h header there are some structure define, useful to initialize DMA channels, that are never used (no reference between them and mapping on processor memory).
Also there is no function to reset WDT, program timers and so on. Everything must be done directly using cpu mapping registers.
Adafruit suggest to install both Arduino and it’s own samd library (latter is the one integrated here I think).
I’m wondering maybe PlatformIO should include something more to let Grand Central to be programmed easily?
If Adafruit are doing what I think they are, they are simply building upon the SAMD Board Support Package… hence why they specifiy you need to install both when using the Arduino IDE. PlatformIO support packages should be configured so you don’t need to worry about that sort of dependency.
If you were using the Arduino IDE, would you have to do the stuff “directly using cpu mapping registers”? or not? If you do, it’s stuff that Adafruit haven’t implemented… iff not, maybe it’s just a matter of including one of the libraries they provided with their core, or some other include file? Or it’s something completely missing from the PlatformIO distrubution…
Fair enough. Hopefully more people will be interested in developing for this and other boards, and some libraries will be made to add an API, or it may get added to their core in the future if there is enough interest.