Skip to content

Move frozen adafruit_circuitplayground to CPX subdirectory #6346

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 2 commits into from
Jun 2, 2022

Conversation

Neradoc
Copy link

@Neradoc Neradoc commented May 4, 2022

This PR requires an update and release of the adafruit_circuitplayground library (followed by updating frozen modules in this PR) before it can be merged.

It changes the frozen directory of the circuitplayground library to a subdirectory with a copy of the library made using symbolic links excluding the CPB specific file. Reduces the size of the CPX build by 1148 bytes.

Note: it's important now to NOT freeze in the parent directory or it will include double files. If we ever want to freeze in the library on the CPB, a frozen_cpb sub directory will have to be made.

Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

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

I'd like to see this happen, it gives us some breathing room. I suspect the PR will be red in its current state, for the reasons given in the PR, though, so no surprises there but it means we can't merge yet.

@dhalbert
Copy link
Collaborator

dhalbert commented May 13, 2022

I am going to defer this past 7.3.0, since it didn't build, and I want to see how it affects builds on Windows, which some people do.

@dhalbert dhalbert added this to the 7.x.x milestone May 13, 2022
@Neradoc
Copy link
Author

Neradoc commented May 14, 2022

Yup, it's waiting on the CPX PR, which needs a merge and release.
adafruit/Adafruit_CircuitPython_CircuitPlayground#117

@FoamyGuy
Copy link
Collaborator

FoamyGuy commented May 20, 2022

I tested this successfully with a custom build using the branch from adafruit/Adafruit_CircuitPython_CircuitPlayground#117 on a CPX. I ran many of the examples from this guide: https://learn.adafruit.com/circuitpython-made-easy-on-circuit-playground-express/circuit-playground-express-library and found them working as expected.

On the CPX builds using current repo the remaining free space for an English language build was:

251864 bytes used, 1576 bytes free in flash firmware space out of 253440 bytes (247.5kB).
11856 bytes used, 20912 bytes free in ram for stack and heap out of 32768 bytes (32.0kB).

With the modification to use the branch from this PR the space is:

247448 bytes used, 5992 bytes free in flash firmware space out of 253440 bytes (247.5kB).
11856 bytes used, 20912 bytes free in ram for stack and heap out of 32768 bytes (32.0kB).

So this does seem like a decent chunk of space savings.

Thanks for figuring this out @Neradoc! this will allow more helpful features to fit in these builds.

@Neradoc
Copy link
Author

Neradoc commented May 21, 2022

I believe the difference in space that you find might be in part due to the fact that the Circuitpython PR has not been rebased on latest. And neither has the library PR. Here is what I get when I make sure to pick the right ones:

247828 bytes used, 5612 bytes free in flash firmware space out of 253440 bytes (247.5kB).
246772 bytes used, 6668 bytes free in flash firmware space out of 253440 bytes (247.5kB).

That's 1056 bytes saved. The latest bundle's bluefruit.mpy is 1222 bytes, so that's in the ballpark of my expectations.

@Neradoc Neradoc force-pushed the cpx-frozen-lite branch from 271687b to 2aea5ed Compare May 23, 2022 20:19
@dhalbert dhalbert modified the milestones: 7.x.x, 8.0.0 May 24, 2022
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

This is a clever and straightforward solution. Let's do it. After thinking about the Windows development issues, I believe it will be OK. Thanks!

@dhalbert dhalbert merged commit 3ff7ed7 into adafruit:main Jun 2, 2022
@Neradoc Neradoc deleted the cpx-frozen-lite branch June 10, 2022 13:44
tannewt added a commit that referenced this pull request Jun 21, 2022
move frozen adafruit_circuitplayground to express subdirectory - 7.3.x backport of #6346
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.

4 participants