Skip to content

Commit

Permalink
Merge branch 'release-candidate' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
skotopes committed Sep 15, 2021
2 parents 44d7b5b + 3db456d commit fd29e19
Show file tree
Hide file tree
Showing 331 changed files with 33,268 additions and 4,776 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
pull_request:

env:
TARGETS: f6
TARGETS: f6 f7
DEFAULT_TARGET: f6

jobs:
build:
Expand Down Expand Up @@ -69,7 +70,7 @@ jobs:
echo "::set-output name=artifacts-path::${BRANCH_OR_TAG}"
echo "::set-output name=suffix::${SUFFIX}"
echo "::set-output name=short-hash::${SHA}"
echo "::set-output name=latest-target::${TARGETS[${#TARGETS[@]}-1]}"
echo "::set-output name=default-target::${DEFAULT_TARGET}"
- name: 'Build bootloader in docker'
uses: ./.github/actions/docker
Expand Down Expand Up @@ -169,12 +170,7 @@ jobs:
run: |
test -d core2_firmware && rm -rf core2_firmware || true
mkdir core2_firmware
cp \
lib/STM32CubeWB/package.xml \
lib/STM32CubeWB/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/stm32wb5x_FUS_fw.bin \
lib/STM32CubeWB/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/stm32wb5x_FUS_fw_for_fus_0_5_3.bin \
lib/STM32CubeWB/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/stm32wb5x_BLE_Stack_full_fw.bin \
core2_firmware
./scripts/assets.py copro lib/STM32CubeWB core2_firmware STM32WB5x
tar czpf artifacts/flipper-z-any-core2_firmware-${{steps.names.outputs.suffix}}.tgz core2_firmware
- name: 'Bundle scripts'
Expand All @@ -185,6 +181,7 @@ jobs:
- name: 'Bundle resources'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
./scripts/assets.py manifest assets/resources
tar czpf artifacts/flipper-z-any-resources-${{steps.names.outputs.suffix}}.tgz -C assets resources
- name: 'Upload artifacts to update server'
Expand All @@ -205,7 +202,7 @@ jobs:
with:
args: -X POST -F 'key=${{ secrets.REINDEX_KEY }}' ${{ secrets.REINDEX_URL }}

- name: Find Previous Comment
- name: 'Find Previous Comment'
if: ${{ !github.event.pull_request.head.repo.fork && github.event.pull_request }}
uses: peter-evans/find-comment@v1
id: fc
Expand All @@ -214,12 +211,12 @@ jobs:
comment-author: 'github-actions[bot]'
body-includes: 'to flash the'

- name: Create or update comment
- name: 'Create or update comment'
if: ${{ !github.event.pull_request.head.repo.fork && github.event.pull_request}}
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
[Click here](https://update.flipperzero.one/?url=https://update.flipperzero.one/builds/firmware/${{steps.names.outputs.artifacts-path}}/flipper-z-${{steps.names.outputs.latest-target}}-full-${{steps.names.outputs.suffix}}.dfu&channel=${{steps.names.outputs.artifacts-path}}&version=${{steps.names.outputs.short-hash}}) to flash the `${{steps.names.outputs.short-hash}}` version of this branch via WebUSB.
[Click here](https://update.flipperzero.one/?url=https://update.flipperzero.one/builds/firmware/${{steps.names.outputs.artifacts-path}}/flipper-z-${{steps.names.outputs.default-target}}-full-${{steps.names.outputs.suffix}}.dfu&channel=${{steps.names.outputs.artifacts-path}}&version=${{steps.names.outputs.short-hash}}) to flash the `${{steps.names.outputs.short-hash}}` version of this branch via WebUSB.
edit-mode: replace
2 changes: 1 addition & 1 deletion .github/workflows/lint_c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
pull_request:

env:
TARGETS: f6
TARGETS: f6 f7

jobs:
lint_c_cpp:
Expand Down
12 changes: 6 additions & 6 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Our goal is to create nice and clean code with good documentation, to make it a

Flipper Zero's firmware consists of three components:

- Core2 firmware set - proprietary componenets by ST: FUS + radio stack.
- Core2 firmware set - proprietary components by ST: FUS + radio stack.
- Core1 Bootloader - controls basic hardware initialization and loads firmware
- Core1 Firmware - HAL + OS + Drivers + Applications

Expand Down Expand Up @@ -67,13 +67,13 @@ One liner: `./flash_core1_main.sh`
```
3. Prepare the container:
```sh
docker compose up -d
docker-compose up -d
```

## Compile bootloader

```sh
docker compose exec dev make -j$(nproc) -C bootloader TARGET=f6
docker-compose exec dev make -j$(nproc) -C bootloader TARGET=f6
```

Bootloader compilation results:
Expand All @@ -85,7 +85,7 @@ Bootloader compilation results:
## Compile firmware

```sh
docker compose exec dev make -j$(nproc) -C firmware TARGET=f6
docker-compose exec dev make -j$(nproc) -C firmware TARGET=f6
```

Firmware compilation results:
Expand All @@ -102,14 +102,14 @@ That's exactly how we generate our `full` builds.

1. Concatenate HEX files:
```sh
docker compose exec dev srec_cat \
docker-compose exec dev srec_cat \
bootloader/.obj/f6/bootloader.hex -Intel \
firmware/.obj/f6/firmware.hex -Intel \
-o firmware/.obj/f6/full.hex -Intel
```
2. Convert HEX to DFU:
```sh
docker compose exec dev hex2dfu \
docker-compose exec dev hex2dfu \
-i firmware/.obj/f6/full.hex \
-o firmware/.obj/f6/full.dfu \
-l "Flipper Zero F6"
Expand Down
Loading

0 comments on commit fd29e19

Please sign in to comment.