8000 Add tool to automate updating to latest SDK from NXP. by andrewleech · Pull Request #10 · hathach/nxp_driver · GitHub
[go: up one dir, main page]

Skip to content

Add tool to automate updating to latest SDK from NXP. #10

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

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

andrewleech
Copy link

This script grabs the latest release (or tag passed as argument) from NXP's github and updates the contents of existing target chip drivers from the download.

It lastly updates the common drivers from the downloaded SDK.

This common drivers folder threw me off for a while. When you download a specific chip pack from MCUXpresso SDK Builder or look an an example application for a particular chip board there's typically a devices/<chip>/drivers folder that at first glance looks the same as the official sdk devices/<chip>/drivers folder - except the sdk folder is missing a bunch!

It seems they also copy relevant drivers from the sdk/devices into sdk/devices/<chip>/drivers which I found very confusing...
and it makes this script a bit harder to write.
I'm leaving those common drivers in a common folder, rather than copying them into the target chip folders, as for one I don't really know which ones are relevant to each chip and secondly duplication is generally a bad thing.

But it does mean a bit of a breaking change to bring in an automatically generated update due to some driver files moving, ie: #9

@andrewleech
Copy link
Author

Update: I've been trying to use the outputs from this update script and found the reorganising of common drivers into separate tree (each in their own subfolder) would result in a lot more change to projects using this than originally anticipated.

As such I've reworked the tool (including rewrite from bash to python) to parse the cmake snippet files in each target chip folder to identify all related common drivers, then symlink them into the target driver dir.

As such this should now be more compatible with existing projects, while also reducing maintenance burdon of updating this repo.

This script grabs the latest release (or tag passed as argument) from NXP's github and updates
the contents of existing target chip drivers from the download.

It also updates the common drivers from the downloaded SDK and symlinks them
as appropriate into the target chip drivers dirs.
Copy link
Owner
@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR, like others, I also prefer to use official sdk repo. This repo is created before NXP introduce the sdk repo. In fact, tinyusb already switch to use official sdk.

@hathach hathach merged commit 77a4373 into hathach:master Dec 25, 2024
@andrewleech andrewleech deleted the update_script branch December 27, 2024 06:47
@andrewleech
Copy link
Author

Hi @hathach after I first started this MR I saw you'd moved to the official repo for TinyUSB.

Thanks for the merge regardless!

There have been a few micropython project discussions and currently I think they'll stick with the trimmed down repo considering the significant size difference (~100MB vs ~1.3GB).

I don't want to place ongoing maintenance effort on you however so plan to suggest pinning the micropython submodule to a fork of this repo instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0