Skip to content

Conversation

@nateinaction
Copy link
Collaborator

@nateinaction nateinaction commented Oct 5, 2025

Improved Zephyr environment control

Description

Related Issues/Tickets

The initial purpose of this ticket was to improve build speeds by enabling caching. When the builds moved over to the self-hosted runner "deathstar" in the Bronco Space Lab, the steps saving and restoring cache took longer than running the build steps. This appears to be due to a cap on data transfer speed between the cache storage and the build machine. Because of this slowdown I have removed most caching steps.

I am submitting this PR now to recover some of the other improvements we made in this ticket. This PR focuses on improvements to Zephyr environment management in the Makefile. There is now a dedicated lib/makelib directory where we have split out build tooling, targets that only the CI build runs, and zephyr environment management. One of the issues we've had with Zephyr environment management is that our zephyr-setup target did a lot of things and when one of those things was broken you had to clean it all and rerun the setup. Now the setup is broken down into discrete steps. Each step can be cleaned and rerun individually.

This PR also adds a new lib/west-commands directory where we can add commands for Zephyr's build tool, west. The command introduced in this PR is west uv which allows the west tool to manage Zephyr's python dependencies using uv instead of pip. This speeds up dependency management with our Zephyr environment management.

After issues with flaky tests discussed in Discord and many failures on this branch as well I created a helper for sending commands which extends the timeout and adds retries. This appears to have made the integration tests much more reliable.

Since I had to write more python for this PR I decided to add the Interrogate linter and uploaded all my knowledge of the existing python in the repo into comments in the code. I hope this helps future developers.

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Z Tests
  • Manual testing (describe steps)

I have rerun the integration test step 10 times. This PR passed 9/10 times. The time that failed it appeared that the GDS did not come up since all tests failed.

Screenshots / Recordings (if applicable)

Checklist

  • Written detailed sdd with requirements, channels, ports, commands, telemetry defined and correctly formatted and spelled
  • Have written relevant integration tests and have documented them in the sdd
  • Have done a code review with
  • Have tested this PR on every supported board with correct board definitions

Further Notes / Considerations

@nateinaction nateinaction changed the title WIP Reenable bin/ caching Improve Zephyr environment management Oct 11, 2025
@nateinaction nateinaction marked this pull request as ready for review October 11, 2025 00:23
@nateinaction nateinaction changed the title Improve Zephyr environment management Improve Zephyr environment management + improve integration test reliability Oct 11, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

This file helps to use an RP2350 CircuitPython environment as a passthrough for interacting with the radio and F Prime GDS. The usb_cdc.enable() function creates a USB serial endpoint that the GDS can connect to to receive all the data that is streamed out. The function has to be called in boot.py before the USB device is enabled.

Copy link
Contributor

@Mikefly123 Mikefly123 left a comment

Choose a reason for hiding this comment

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

LGTM Nate! Great work on this. I just added a quick comment on your TODO in case you wanted to clean it up before we got this in.

@nateinaction nateinaction merged commit 60da0ec into main Oct 12, 2025
11 of 12 checks passed
@nateinaction nateinaction deleted the fix-cache-2 branch October 12, 2025 18:50
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