-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMSIS Builder #81
base: develop
Are you sure you want to change the base?
CMSIS Builder #81
Conversation
Hi @frankleonrose ! Thanks a lot for this PR! Do other boards in this repo also support |
Yes, @valeros, most of the other boards support CMSIS. Perhaps all but the "Digistump DigiX" (hmm, looking at the data sheet, maybe that is just another sam3x.). I'm happy to add examples - do you mean a project file ./examples/project/platformio.ini with envs for a few different boards and a |
Yes, a couple of typical examples (blink, uart or something else worth adding to CI) will be enough. |
…and `at91sam3x...`
All Atmelsam boards build cleanly with |
@valeros Anything else you'd like to see here? |
Hi @frankleonrose ! Looks great! Could we get rid of the commented code here and here ? |
Put `check_variants()` in https://github.com/frankleonrose/framework-cmsis/blob/master/scripts/package.py . We will print a warning that `MCU_FAMILY_SELECTORS` needs to be updated if mapping fails.
@valeros No, the entire CMSIS directory is from a single repo - https://github.com/ARM-software/CMSIS_5 - all the driver code is part of the framework. (Actually, I started with the CMSIS framework source files included in PlatformIO package framework-cmsis version 2.50400.181126.) The CMSIS framework should continue to include everything supplied there. In my most recent use case, Minimal-FreeRTOS using CMSIS-FreeRTOS, I rely on CMSIS framework including the RTOS2 headers. Are you proposing that the complete PlatformIO framework-cmsis should be built by a process like the following?
Personally, I wouldn't make it more complicated until I had a specific case that wasn't working without breaking it up. |
I meant files in the variant folder, for example these.
What I'm suggesting is to create two new independent repositories |
The STM32 variants have single ~5000 line files per processor whereas Atmel breaks them up by peripheral (~50-300 lines). They contain equivalent content: |
Per-platform repos: I see what you mean now. And users will still be able to use Will you make the repos under the https://github.com/platformio account? |
So it would be great if you could tidy up (and probably rename) https://github.com/frankleonrose/framework-cmsis so there are no files related to ststm32 MCUs. After that we can transfer that repository to our account and then merge your PR. Thanks! |
Done. |
I just updated the Atmel SAM platform package again and it still does not allow bare metall CMSIS programming. |
@frankleonrose great work! while I can compile with the examples provided with the framework-cmsis in your repo, I can't get a SAM4 to compile, have you tried it ? |
An upstream commit adds the CMSIS packages: abbfb1b |
I couldn't find if this was actually merged or still being actively worked on elsewhere, so I fixed the merge conflicts in a new fork: https://github.com/glingy/platform-atmelsam/tree/feat-cmsis-build-2 I am currently using this (with samc21 board) with no issues and as far as I can tell, all debugging features still work as intended. I can't test it much to be sure with other boards, but it seems to be working and I would love to have this integrated as a default option. |
Also @kroppt, Those cmsis packages are within the Arduino framework if I'm not mistaken. Someone else correct me if I'm wrong, but from what I can understand, the Arduino Framework uses the cmsis libraries and so it includes them. However, this is for "bare" programming using just the cmsis header files without the Arduino framework as well. |
Very nice, I did now what I should have been doing a while ago. |
@glingy One problem I see with both the old and updated solutions is that the In my own hack, I created a local package Ultimately, if this gets merged, it will have to jive with the existing frameworks. We will be in a better place if we use the latest |
That sounds like a much better plan, and I hadn’t seen the ldscripts tool before. I’ll take a look at that |
As part of issue #80, the builder here works with CMSIS framework enhancements here https://github.com/frankleonrose/framework-cmsis and successfully builds executables.
I updated the board definitions of FeatherM0 and MoteinoZero to include the 'cmsis' framework because I've actually run the executables on these boards.