Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/build-firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- 'third_party/**'
- 'tools/waf/**'
- 'waf'
- 'pbl'
- 'wscript'

build-firmware:
Expand Down Expand Up @@ -84,13 +85,13 @@ jobs:
BOARD: ${{ matrix.board }}

- name: Configure
run: ./waf configure --board '${{ matrix.board }}'
run: ./pbl configure --board '${{ matrix.board }}'

- name: Build
run: ./waf build
run: ./pbl build

- name: Bundle
run: ./waf bundle
run: ./pbl bundle

- name: Store
uses: actions/upload-artifact@v6
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build-prf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- 'third_party/**'
- 'tools/waf/**'
- 'waf'
- 'pbl'
- 'wscript'

build-prf:
Expand Down Expand Up @@ -90,13 +91,13 @@ jobs:
OPTS="-DCONFIG_MFG=y -DCONFIG_LOG_HASHED=n"
fi

./waf configure --board '${{ matrix.board }}' --variant=prf $OPTS
./pbl configure --board '${{ matrix.board }}' --variant=prf $OPTS

- name: Build
run: ./waf build
run: ./pbl build

- name: Bundle
run: ./waf bundle
run: ./pbl bundle

- name: Store
uses: actions/upload-artifact@v6
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build-qemu-sdkshell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- 'third_party/**'
- 'tools/waf/**'
- 'waf'
- 'pbl'
- 'wscript'

build-qemu-sdkshell:
Expand Down Expand Up @@ -71,10 +72,12 @@ jobs:
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- name: Configure
run: ./waf configure --board ${{ matrix.board }} -DCONFIG_SHELL_SDK=y
run: ./pbl configure --board ${{ matrix.board }} -DCONFIG_SHELL_SDK=y

- name: Build
run: ./waf build qemu_image_micro qemu_image_spi
run: |
./pbl build
./pbl qemu_images

- name: Store
uses: actions/upload-artifact@v6
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build-qemu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- 'third_party/**'
- 'tools/waf/**'
- 'waf'
- 'pbl'
- 'wscript'

build-qemu:
Expand Down Expand Up @@ -71,10 +72,12 @@ jobs:
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- name: Configure
run: ./waf configure --board ${{ matrix.board }}
run: ./pbl configure --board ${{ matrix.board }}

- name: Build
run: ./waf build qemu_image_micro qemu_image_spi
run: |
./pbl build
./pbl qemu_images

- name: Store
uses: actions/upload-artifact@v6
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-translation-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
pip install -r requirements.txt

- name: Configure
run: ./waf configure --board ${{ env.BOARD_NAME }}
run: ./pbl configure --board ${{ env.BOARD_NAME }}

- name: Build
run: ./waf build
run: ./pbl build

- name: Copy POT template
run: cp build/pebbleos.pot resources/normal/base/lang/tintin.pot
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ jobs:
'

- name: Configure
run: nix develop --command ./waf configure --board asterix
run: nix develop --command ./pbl configure --board asterix

- name: Build
run: nix develop --command ./waf build
run: nix develop --command ./pbl build

nix-status:
needs: [changes-nix, nix-shell]
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ jobs:
BOARD: ${{ matrix.board }}

- name: Configure
run: ./waf configure --board '${{ matrix.board }}' --variant=prf -DCONFIG_RELEASE=y
run: ./pbl configure --board '${{ matrix.board }}' --variant=prf -DCONFIG_RELEASE=y

- name: Build PRF
run: ./waf build
run: ./pbl build

- name: Bundle PRF
run: ./waf bundle
run: ./pbl bundle

- name: Copy PRF artifacts
run: |
Expand Down Expand Up @@ -83,10 +83,10 @@ jobs:
--endpoint-url "${{ vars.LOG_HASH_BUCKET_ENDPOINT }}"

- name: Configure PRF MFG
run: ./waf configure --board '${{ matrix.board }}' --variant=prf -DCONFIG_MFG=y -DCONFIG_LOG_HASHED=n -DCONFIG_RELEASE=y
run: ./pbl configure --board '${{ matrix.board }}' --variant=prf -DCONFIG_MFG=y -DCONFIG_LOG_HASHED=n -DCONFIG_RELEASE=y

- name: Build MFG PRF
run: ./waf build
run: ./pbl build

- name: Copy MFG PRF artifacts
run: |
Expand Down Expand Up @@ -166,13 +166,13 @@ jobs:
fi

- name: Configure
run: ./waf configure --board '${{ matrix.board }}' -DCONFIG_FIRMWARE_SLOT=${{ matrix.slot }} -DCONFIG_RELEASE=y
run: ./pbl configure --board '${{ matrix.board }}' -DCONFIG_FIRMWARE_SLOT=${{ matrix.slot }} -DCONFIG_RELEASE=y

- name: Build firmware
run: ./waf build
run: ./pbl build

- name: Bundle firmware
run: ./waf bundle
run: ./pbl bundle

- name: Copy firmware artifacts
run: |
Expand Down Expand Up @@ -239,10 +239,12 @@ jobs:
pip install -r requirements.txt

- name: Configure
run: ./waf configure --board '${{ matrix.board }}'
run: ./pbl configure --board '${{ matrix.board }}'

- name: Build QEMU images
run: ./waf build qemu_image_micro qemu_image_spi
run: |
./pbl build
./pbl qemu_images

- name: Copy QEMU artifacts
run: |
Expand All @@ -251,10 +253,12 @@ jobs:
cp build/qemu_spi_flash.bin artifacts/${{ matrix.board }}_${{ github.ref_name }}_spi_flash.bin

- name: Configure SDK shell
run: ./waf configure --board '${{ matrix.board }}' -DCONFIG_SHELL_SDK=y
run: ./pbl configure --board '${{ matrix.board }}' -DCONFIG_SHELL_SDK=y

- name: Build SDK shell QEMU images
run: ./waf build qemu_image_micro qemu_image_spi
run: |
./pbl build
./pbl qemu_images

- name: Copy SDK shell QEMU artifacts
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- 'third_party/**'
- 'tools/waf/**'
- 'waf'
- 'pbl'
- 'wscript'

build-test:
Expand Down Expand Up @@ -64,12 +65,12 @@ jobs:
pip install -r requirements.txt

- name: Configure
run: ./waf configure --board ${{env.TEST_BOARD}}
run: ./pbl configure --board ${{env.TEST_BOARD}}

- name: Run tests
# -k keeps going after a failing test so the run reports every failure,
# not just the first. The job still fails if anything failed.
run: ./waf test -k
run: ./pbl test -k

- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
Expand Down
20 changes: 20 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,26 @@ config PBLBOOT
layout with direct XIP. Disable for boards whose SoC bootloader
consumes a raw image and uses a single firmware slot.

config FW_MAX_SIZE
hex
default 0xf8000 if SOC_NRF52 && (!RECOVERY_FW || MFG)
default FW_FLASH_SIZE
help
Maximum size of the firmware image binary, enforced when
bundling and flashing. Defaults to the firmware flash bank
size; the nRF52 normal-firmware bank keeps 32 KiB reserved for
the bootloader.

config SYSTEM_RESOURCES_MAX_SIZE
hex
default 0x100000 if SOC_NRF52
default 0x200000 if SOC_SF32LB52
default 0x200000 if SOC_QEMU
default 0x40000
help
Maximum size of the system resources pbpack, enforced after the
resource build.
Comment on lines +37 to +55

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we should define some sort of partition map at board level for that I think


menu "Compiler options"

config LTO
Expand Down
2 changes: 1 addition & 1 deletion docs/development/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Tests are built and run with waf. Configure first (any board works; CI uses
./pbl test
```

Useful options (see `./waf --help` for the full list):
Useful options (see `./pbl test --help` for the full list):

- `-M REGEX` / `--match REGEX`: only build/run test files matching the regex,
e.g. `./pbl test -M test_animation`
Expand Down
5 changes: 2 additions & 3 deletions docs/reference/formats/sle.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

SLE is a small run-length encoding tuned for binary blobs that mix long
zero runs with otherwise incompressible data. The encoder is
`tools/waf/sparse_length_encoding.py` (used by the `binary_header` waf
feature in `tools/waf/binary_header.py` to embed compressed blobs as C
arrays); the firmware-side decoder is `src/fw/util/sle.c`.
`tools/waf/sparse_length_encoding.py`; the firmware-side decoder is
`src/fw/util/sle.c`.

The encoded stream is:

Expand Down
Loading