-
Notifications
You must be signed in to change notification settings - Fork 64
Add support for Microchip XC32 toolchain in the CMSIS toolbox #2310
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
Add support for Microchip XC32 toolchain in the CMSIS toolbox #2310
Conversation
Test Results 7 files 53 suites 5m 27s ⏱️ Results for commit d26077f. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for the Microchip XC32 toolchain to the CMSIS toolbox, enabling developers to use the XC32 compiler for building CMSIS-based projects targeting Microchip devices.
Key Changes:
- Added XC32 as a recognized compiler type in the schema validation
- Created comprehensive CMake configuration for XC32 toolchain version 5.0.0
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tools/projmgr/schemas/common.schema.json | Updated regex pattern to include XC as a valid compiler type alongside existing toolchains |
| tools/buildmgr/cbuildgen/config/XC.5.0.0.cmake | New CMake configuration file defining compiler executables, flags, and build settings for the XC32 toolchain |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
brondani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to understand better the XC32 packs and projects strategy, in particular the use and provision of linker scripts, to properly support it in the toolbox.
Further info concerning this matter is welcomed.
CC: @jkrech, @KeilChris, @JonatanAntoni
|
I have a specs file and a configuration.data file located in RTE/Device/<DEVICE_NAME>/ directory. These are defined in the Pack-Description as "other" file category. What is the best way to pass these files to the compiler using the --specs= and -mconfig-data-file= flags, given that their paths are relative to the device-specific RTE directory? The actual problem I am facing is that without getting the <DEVICE_NAME> as a variable in the Cmake I cannot see a way to reference the file. Is there a variable which holds the <DEVICE_NAME>? |
The short answer is: in cbuild.yml yes, in CMakeLists.txt not yet. However to proper advise on this matter we would need more info about your design:
We can extend the information that is generated for each project (cbuild.yml) and instruct cbuild2cmake to ultimately make them appear in the generated CMakeLists.txt, but we need to decide together the best approach since it deviates a bit from other supported toolchains. |
Yes, specs and configuration.data files must always be passed to the compiler.
No, the user isn't allowed to modify these files. Another option that I am thinking of is to extract the device name from "CONTEXT" variable e.g:"Example.Debug+PIC32CM6408PL10048"). Any thoughts on this ?
Sure, we will join the call this week. |
|
If the
|
|
As discussed in the Open-CMSIS-Pack meeting on Jan 13th, adding variables to the above motioned access sequences would be most helpful. Do we need to add a issue to cbuild2cmake project for this ? |
|
@swaroopbekal-mchp no need for you to do anything, I will ask @brondani to take care of that. |
|
@swaroopbekal-mchp @ashish-mahanth Note that in the next week we will do a patch release for the "Arm CMSIS Solution" vscode extension that also incorporates this cmsis-toolbox nightly, I imagine it will be useful for your development as long as it is easier/faster to install. |
|
Thank you @brondani and @jkrech. The PR has been updated. Name of the toolchain is not changed as decided in 2025-12-16 meeting. |
jkrech
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I guess we should add tests potentially in another PR.
Where can we download the XC32 toolchain from within CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jkrech
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Please find the compiler download page here |
|
We found an issue in our internal testing. We need to make a minor update to this PR to correctly adjust the DFP path that we are passing to the compiler for some older DFPs. Let's not merge this right now. |
|
@swaroopbekal-mchp, I have marked this PR as "Draft" for the time being to prevent it from bein merged prematurely. |
|
@jkrech it should be safe to take this PR out of draft now. |
brondani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2310 +/- ##
==========================================
- Coverage 66.37% 66.36% -0.01%
==========================================
Files 181 181
Lines 36658 36807 +149
Branches 22797 22909 +112
==========================================
+ Hits 24331 24427 +96
- Misses 7628 7636 +8
- Partials 4699 4744 +45
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
1 similar comment
|
@swaroopbekal-mchp We are building the CMSIS-Toolbox from |
This PR aims to add support for the XC32 Toolchain and provide a solution for the issue found here.