Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
solosky committed Mar 29, 2024
2 parents 5b85e4c + 223609b commit d667fd7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 17 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/pixl.js-fw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,8 @@ jobs:

- name: Change Owner of Container Working Directory
run: chown root:root .

- name: build bootloader
run: cd fw && make bl RELEASE=1 BOARD=${{matrix.board}}
- name: build firmware
run: cd fw && make app RELEASE=1 BOARD=${{matrix.board}}
- name: build ota
run: cd fw/application && make ota RELEASE=1 APP_VERSION=$GITHUB_RUN_NUMBER BOARD=${{matrix.board}}
- name: build all
run: cd fw/application && make full RELEASE=1 APP_VERSION=$GITHUB_RUN_NUMBER BOARD=${{matrix.board}}
run: cd fw && make all RELEASE=1 APP_VERSION=$GITHUB_RUN_NUMBER BOARD=${{matrix.board}}
- name: upload bootloader
uses: actions/upload-artifact@v3
with:
Expand Down
14 changes: 11 additions & 3 deletions docs/en/03-Build-Firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,28 @@

You could download the latest develop build from Github Actions

https://github.com/impeeza/pixl.js/actions/workflows/pixl.js-fw.yml
https://github.com/solosky/pixl.js/actions


## Build with customized Docker image

You could build the firmware using customized Docker image.

```
# create containers
docker run -it --rm solosky/nrf52-sdk:latest
# init repository
root@b10d54636088:/builds# git clone https://github.com/solosky/pixl.js
root@b10d54636088:/builds# cd pixl.js
root@b10d54636088:/builds/pixl.js# git submodule update --init --recursive
root@b10d54636088:/builds/pixl.js# cd fw && make all
root@b10d54636088:/builds/pixl.js/fw# cd application && make full ota
# build LCD version
root@b10d54636088:/builds/pixl.js# cd fw && make all BOARD=LCD RELEASE=1
# build OLED version
root@b10d54636088:/builds/pixl.js# cd fw && make all BOARD=OLED RELEASE=1
```

The firmware is fw/_build/pixjs_all.hex,ota package is fw/_build/pixjs_ota_vXXXX.zip
13 changes: 10 additions & 3 deletions docs/zh/03-Build-Firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,27 @@

您可以从Github Actions下载最新的构建开发版本。

https://github.com/impeeza/pixl.js/actions/workflows/pixl.js-fw.yml
https://github.com/solosky/pixl.js/actions


## 使用定制的Docker镜像进行构建

您可以使用定制的Docker镜像构建固件。

```
# 创建容器
docker run -it --rm solosky/nrf52-sdk:latest
# 下载代码
root@b10d54636088:/builds# git clone https://github.com/solosky/pixl.js
root@b10d54636088:/builds# cd pixl.js
root@b10d54636088:/builds/pixl.js# git submodule update --init --recursive
root@b10d54636088:/builds/pixl.js# cd fw && make all
root@b10d54636088:/builds/pixl.js/fw# cd application && make full ota
# 构建LCD固件
root@b10d54636088:/builds/pixl.js# cd fw && make all BOARD=LCD RELEASE=1
# 构建OLED固件
root@b10d54636088:/builds/pixl.js# cd fw && make all BOARD=OLED RELEASE=1
```

构建好的固件在 fw/_build/pixjs_all.hex,ota package is fw/_build/pixjs_ota_vXXXX.zip
5 changes: 4 additions & 1 deletion fw/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
.PHONY: app bl clean

all: bl app
all: bl app ota

bl:
@$(MAKE) -C bootloader/

app:
@$(MAKE) -C application/

ota:
@$(MAKE) -C application/ full ota

clean:
@rm -rf _build/
4 changes: 2 additions & 2 deletions fw/application/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ U8G2_ROOT := ../components/u8g2/csrc
CHAMELEON_ROOT :=$(COMP_DIR)/chameleon-ultra/firmware

APP_VERSION ?= 1
RELEASE ?= 0
RELEASE ?= 1
BOARD ?= OLED

$(OUTPUT_DIRECTORY)/pixljs.out: \
Expand Down Expand Up @@ -300,7 +300,6 @@ SRC_FILES += \
$(PROJ_DIR)/i18n/hu_HU.c \
$(PROJ_DIR)/i18n/de_DE.c \
$(PROJ_DIR)/i18n/fr_FR.c \
$(PROJ_DIR)/i18n/hu_HU.c \
$(PROJ_DIR)/i18n/ja_JP.c \
$(PROJ_DIR)/i18n/nl_NL.c \
$(PROJ_DIR)/i18n/pt_BR.c \
Expand Down Expand Up @@ -714,6 +713,7 @@ sdk_config:

version:
@cd ../ && python3 scripts/version_gen.py
@echo build: BOARD=$(BOARD) RELEASE=$(RELEASE) APP_VERSION=$(APP_VERSION)

settingsgen:
nrfutil settings generate --family NRF52 --application $(OUTPUT_DIRECTORY)/pixljs.hex --application-version $(APP_VERSION) --bootloader-version 1 --bl-settings-version 1 $(OUTPUT_DIRECTORY)/settings.hex
Expand Down

0 comments on commit d667fd7

Please sign in to comment.