Add CMSIS build support (requires new tool 'framework-cmsis-atmelsam') #246
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There have been quite a few requests for CMSIS build support for ATSAM-series MCUs. Some pull requests, some issues, etc., but surprisingly, despite multiple years passing after the first request, no progress has been made.
Highlights:
#170 wasn't done right...the "cmsis.py" is literally just a copy of the one from ststm32--which obviously won't work.
#21 does not appear to have succeeded...there's still no support for CMSIS
#80 started off strong, but apparently was abandoned when changes to support CMSIS would end up breaking the existing Arduino build system
Based on the above, I've taken a slightly different approach that hopefully should make this PR successful, to finally get CMSIS support for ATSAMx MCUs on PlatformIO. The world needs an alternative to the truly lousy piece of software called MPLAB X (but better known on the Microchip forums by the more accurate moniker "Buglab X").
I have verified successful compilation on a number of processor families, as well as personally verifying compilation, programming, and full software debugging with an on-board ATMEL-ICE on the ATSAMC21N-XPRO Xplained board I purchased as a development module. "Blinky LED" with timers and button control works perfectly fine, e.g. the build system does work, as far as I can test it.
There may well be some tweaks/adjustments needed based on reports from users with hardware for the other MCU families, but the basic system appears to be solid.
Note that I did not add the hundreds of megabytes of SVD files for all of the processors--although I have them, and can certainly PR them in if that is the way the maintainers here would like to move forwards. Tests with the ATSAMC21N18 are working perfectly--but heck, there's already an SVD for that in this repository!
I have submitted the new framework-cmsis-atmelsam to PlatformIO, and am waiting for it to be approved. Kinda challenging to do this here, because neither this PR nor that framework will work independent of the other! Fingers crossed...