Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
17 changes: 11 additions & 6 deletions .github/workflows/ci-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ jobs:
- {target: bootloader-stage1, product: bitbox03, edition: multi}
- {target: factorysetup, product: bitbox03, edition: multi}
- {target: firmware, product: bitbox03, edition: multi}
- {target: bootloader-stage0, product: bitbox03, board: testboard, edition: multi}
- {target: bootloader-stage1, product: bitbox03, board: testboard, edition: multi}
- {target: factorysetup, product: bitbox03, board: testboard, edition: multi}
- {target: firmware, product: bitbox03, board: testboard, edition: multi}
- {target: firmware, product: bitbox03, board: testboard, edition: multi, debug: 'yes'}
runs-on: ubuntu-22.04
container:
image: ${{ inputs.container-repo }}:${{ inputs.container-version }}
Expand All @@ -259,7 +264,7 @@ jobs:
run: make bootstrap

- name: Configure product
run: make config CONFIG_ARGS="--product ${{ matrix.product }} --edition ${{ matrix.edition }} --debug ${{ matrix.debug || 'no' }} --locked ${{ matrix.locked || 'no' }} --development ${{ matrix.development || 'yes' }}"
run: make config CONFIG_ARGS="--product ${{ matrix.product }} --board ${{ matrix.board || (matrix.product == 'bitbox03' && 'dev-kit' || matrix.product) }} --edition ${{ matrix.edition }} --debug ${{ matrix.debug || 'no' }} --locked ${{ matrix.locked || 'no' }} --development ${{ matrix.development || 'yes' }}"

- name: Build ${{ matrix.target }}
run: make -j$(($(nproc)+1)) ${{ matrix.target }}
Expand All @@ -271,8 +276,8 @@ jobs:
- name: Print hashes
run: |
{
for dir in build*/bin build-bitbox03-cargo/thumbv8m.main-none-eabihf/debug \
build-bitbox03-cargo/thumbv8m.main-none-eabihf/release; do
for dir in build*/bin build-bitbox03-cargo/*/thumbv8m.main-none-eabihf/debug \
build-bitbox03-cargo/*/thumbv8m.main-none-eabihf/release; do
if [ -d "$dir" ]; then
find "$dir" -maxdepth 1 -type f -print0
fi
Expand All @@ -284,14 +289,14 @@ jobs:
if: github.event_name == 'push' && matrix.target != 'simulator-graphical' && !cancelled()
uses: actions/upload-artifact@v4
with:
name: ${{matrix.product}}-${{matrix.edition}}-${{matrix.target}}${{ matrix.debug == 'yes' && '-debug' || '' }}-locked-${{ matrix.locked || 'no' }}-development-${{ matrix.development || 'yes' }}-${{github.sha}}.bin
name: ${{matrix.product}}${{ matrix.board && format('-{0}', matrix.board) || '' }}-${{matrix.edition}}-${{matrix.target}}${{ matrix.debug == 'yes' && '-debug' || '' }}-locked-${{ matrix.locked || 'no' }}-development-${{ matrix.development || 'yes' }}-${{github.sha}}.bin
path: |
build*/bin/*.bin
build*/bin/*.elf
build*/bin/*.map
build*/bin/simulator*
build-bitbox03-cargo/thumbv8m.main-none-eabihf/debug/bitbox03-*
build-bitbox03-cargo/thumbv8m.main-none-eabihf/release/bitbox03-*
build-bitbox03-cargo/*/thumbv8m.main-none-eabihf/debug/bitbox03-*
build-bitbox03-cargo/*/thumbv8m.main-none-eabihf/release/bitbox03-*

- name: Package graphical simulator
if: matrix.target == 'simulator-graphical'
Expand Down
13 changes: 6 additions & 7 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ Probe hardware is fixed by the board:
| `bitbox03` | `testboard` | J-Link | `openocd`, `jlink` |
| `bitbox03` | `bitbox03` (disabled) | J-Link | `jlink`, `openocd` |

BitBox03 supports `dev-kit` and `testboard` selections; the testboard defaults to OpenOCD with
the J-Link adapter and currently uses the dev-kit build target. The production board remains
disabled until its build support is implemented. Both BitBox03 editions currently build the same stub.
BitBox03 supports `dev-kit` (STM32U5A9) and `testboard` (STM32U5G9) builds. The testboard defaults
to OpenOCD with the J-Link adapter. The production board remains disabled until its build support is
implemented. Both BitBox03 editions currently build the same stub.

Without a configuration, defaults are BitBox02, multi edition, and J-Link software. Explicit
arguments run noninteractively; omitted fields use built-in defaults, independent of saved choices:
Expand Down Expand Up @@ -240,16 +240,16 @@ With `DEBUG=no`, BitBox02/Nova primary targets use `RelWithDebInfo` and BitBox03
builds. `DEBUG=yes` selects debug builds for all products, with their existing RTT features.
Firmware follows the selected edition; factorysetup is edition-independent; stage0/stage1 select
images for the configured product, edition, `LOCKED`, and `DEVELOPMENT` settings. Build directories
are flat:
are:

| Backend | Directory |
| --- | --- |
| BitBox02/Nova CMake | `build-<product>-cmake-<profile>` |
| BitBox03 Cargo | `build-bitbox03-cargo` |
| BitBox03 Cargo | `build-bitbox03-cargo/<board>` |

For example, `build-bitbox02-cmake-relwithdebinfo/bin/firmware.elf`,
`build-bitbox02nova-cmake-debug/bin/firmware-btc.elf`, and
`build-bitbox03-cargo/thumbv8m.main-none-eabihf/debug/bitbox03-firmware`.
`build-bitbox03-cargo/testboard/thumbv8m.main-none-eabihf/debug/bitbox03-firmware`.
Cargo receives an absolute target directory; backend-managed contents keep their native layouts.
CMake Rust feature caches remain inside their product/profile directory. Images and editions share
those caches. Switching products and switching back reuses previous results; changing probe
Expand All @@ -266,7 +266,6 @@ for development devices. Named product commands always use that product's direct

The old `firmware-btc`, `factory-setup`, per-product stage build shortcuts, and
`bitbox03-*` build shortcuts are replaced by configuration plus the primary targets above.
Additional BitBox03 board/edition implementations are deferred.

Pass `-j<N>` to speed up a build, for example `make -j8 firmware`. Top-level aliases run sequentially.

Expand Down
Loading
Loading