You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's Wrong:
* CI broke due to capitalization issue
How Was it Fixed (if not obvious):
* fixed case
What side effects does this have (could be none):
* Added script to test all presets and ci builds locally
* Updated README for scripts and correctness.
Which builds did you run to make sure they build?
[x] arm-none-eabi-gcc Cortex M4
[x] arm-none-eabi-gcc Cortex M7
[x] (Apple) Native Clang
[x] (Apple) Homebrew GCC (path breaks)
[x] (Apple) Homebrew LLVM
How Do We Know and Can Show It's Fixed:
* Builds
Which Unittest Series did you Check?
[x] (Apple) Native Clang
[ ] (Apple) Homebrew GCC
[x] (Apple) Homebrew LLVM
Did this affect any on-target builds? If so which were tested?
[X] STM32F407VE board
[X] STM32H753ZI board
Co-authored-by: Copilot <copilot@github.com>
Visual Studio Code should be able to run this and identify the presets configuration.
81
81
82
-
## Building
82
+
Be sure to configure the CMake Environment variables to point to your arm-none-eabi-gcc toolchain. If you installed the Arm GNU Toolchain via the Mac PKG, the path should be `/Applications/ArmGNUToolchain/13.2.rel1/arm-none-eabi/bin` but it may be different if you installed it differently or on a different OS.
83
83
84
-
Visual Studio Code should be able to run this and identify the presets configuration. However you can also use the command line.
The on-target presets (`cortex-m4-gcc-arm-none-eabi`, `cortex-m7-gcc-arm-none-eabi`) inherit the `distcc` hidden preset which accelerates cross-compilation by distributing work to a remote build server running the `distcc-bare-metal-builder` Docker image (which provides `arm-none-eabi-gcc` 13.x).
121
+
122
+
Key environment variables set by the preset:
123
+
124
+
| Variable | Default | Purpose |
125
+
|---|---|---|
126
+
|`DISTCC_VERBOSE`|`0`| Set to `1` for verbose distcc output |
127
+
|`DISTCC_FALLBACK`|`1`| Fall back to local compilation if the server is unreachable |
128
+
|`DISTCC_SKIP_LOCAL_RETRY`|`0`| Retry locally on remote failure |
129
+
|`DISTCC_DIR`|`/tmp/distcc`| distcc state directory |
130
+
|`PATH`| prepends Arm toolchain | Ensures `arm-none-eabi-gcc` is found |
131
+
132
+
To use distcc, start the build server container and point `DISTCC_HOSTS` at it:
133
+
134
+
```bash
135
+
# On the build server (or locally in Docker)
136
+
docker run --rm -p 3632:3632 ghcr.io/emrainey/distcc-bare-metal-builder:latest
If distcc is not available or the server is unreachable, `DISTCC_FALLBACK=1` ensures the build falls back to local compilation automatically.
144
+
145
+
The CI presets (`cortex-m4-gcc-arm-none-eabi-ci`, `cortex-m7-gcc-arm-none-eabi-ci`) deliberately omit the `distcc` preset — they build locally inside the CI container where distcc is not available.
146
+
147
+
### Running CI Jobs Locally with act
148
+
149
+
If you want to run all CI jobs from `.github/workflows/ci.yml` locally using `act`, create a Python venv and install `PyYAML` (the script uses YAML parsing):
150
+
151
+
```bash
152
+
python3 -m venv venv
153
+
source venv/bin/activate
154
+
pip install --upgrade pip
155
+
pip install pyyaml
156
+
# We'll also need jinja2 for builds, but the cmake will install that itself
157
+
```
158
+
159
+
Then `build-all-ci-jobs.py` can run all CI jobs in sequence and report the results. This requires `act` to be installed and configured to run GitHub Actions locally. (Homebrew has `act` available).
160
+
161
+
```bash
162
+
python3 scripts/build-all-ci-jobs.py
163
+
```
164
+
165
+
You can also run all local CMake workflow presets with `build-all-presets.py`.
# modify ./scripts/stm32f407ve.gdb for commands as needed
129
180
# and launch the GDB client.
130
181
./scripts/debug.sh client
131
182
```
132
183
133
184
### Debug with QEMU
134
185
186
+
**WARNING**: This is a work in progress and may be disabled or removed at any time as the support for qemu is currently very rough and incomplete. It is only intended to be used as a tool for testing the on-target unit tests in a more "realistic" environment than the native unit tests, but it is not intended to be a full emulation of the hardware or a replacement for Renode or other emulators.
187
+
135
188
The netduino+2 board can be run on qemu, however, ClockTree, I2C and DMA do not work.
136
189
137
190
I'm using the arm cross-GDB, CGDB and QEMU from Homebrew.
0 commit comments