-
Notifications
You must be signed in to change notification settings - Fork 62
Example Bazel build #119
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
Draft
rauhul
wants to merge
22
commits into
main
Choose a base branch
from
bazel
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Example Bazel build #119
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Provide new examples demonstrating how to run Swift Embedded on the Raspberry Pi 4B and 5 single-board computers, in a baremetal fashion, without an underlying operating system. The provided examples showcase how to blink the onboard green LED using Swift MMIO.
As seen at FOSDEM 2025 Note: ignore formatting for now
Updates to match latest swift-format configuration in swift-mmio.
* Make stm32-blink sample building as both Mach-O and ELF * Use STM_BOARD env var to select which board to target on stm32-blink example * Fix python lint issues in Tools/elf2hex.py
Updates the stm32-uart-echo and stm32-neopixel examples to use a swiftpm toolset.json to specify various compiler and linker flags. Also updates the Makefiles to leverage swiftpm to link the executable instead of manually linking using `ld` directly.
Instead of having users manually manage python venvs this commit migrates the python scripts to use `uv` which can handle installing script dependencies automatically. Additionally it doesn't require sourcing a venv setup script in every shell where you want to build. A further improvement on the swift swift side should also be made to use swiftly to manage swift toolchain versions instead of the `TOOLCHAINS` env variable.
Switches from manually running various compilers and linkers to using SwiftPM for most of the leg work. Additionally switches from -Osize to -O which has notably better runtime performance.
…ve Swift support (#99)
Replaces the register definitions used by the stm32-lcd-logo example to use ones generated by svd2swift leveraging swift-mmio. Additionally refactors much of the example code to have fewer layers of abstraction as they make the code much harder to follow.
Updates the various GitHub workflows to use a common "Install Swift" action using swiftly and a .swift-version file at the repo root. This allows us to drop the swift version from each of the workflows and makes it easier for users to reproduec the CI environment. Future: - Add a workflow which auto updates this file. - Update READMEs to suggest install swift using swiftly.
Updates the install swift action to skip a bunch of apt packages we don't use.
Removes the legacy build.sh script used to build the pico-blink firmware and replaces it with a makefile leveraging SwiftPM + a new pico.json toolset file. This means we no longer have to handle build flags in the build script directly and SwiftPM can handle invoking the linker.
Updates github workflows to reigger on any pull request and creation of new pull requests.
Not yet complete workflow which automatically updates the `.swift-version` file in this repo.
Initial pass at migrating documentation from swiftlang/swift to a more accessible location and reformatting it into a docc catalog. I've added a number of placeholder pages for additional documentation to be written. Community members are very welcome to help contribute to this documentation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.