Skip to content

Commit 47554fb

Browse files
committed
Merge branch 'main' into sam/ir-tracker
* main: Support for 24-bit RGB888 simulator and fonts (#1112) Revert FreeRTOS assert-on-yield behavior BLE defines cleanup (#1110) Fix compilation error in astubs (#1109) Codebase cleanup from the ESP32-P4 branch (#1108) CMake build for Freetype (#1106) Fix BLEAddress serialization (#1107) Bump esp-nimble-cpp to 2.1.1 (#1102) TTF 16bits rgb support (#1104) Support for 16-bit simulator (#1103) Bump esp_littlefs to v1.16.4 (#1101) Update FreeRTOS POSIX port and fix a freeze (#1100) iOS Framework Build (#1093) Fix hang in TestTelemetry (#1099) Bump to IDF 5.3.1 (#948) Update FreeRTOS posix port to 94263d23b (#1097) Prefix `Rect`/`Size`/`Point`/`Inset` types with `Sol` to avoid naming conflicts with iOS (#1090) FreeRTOS threads improvement (#1092) Fix CI for new GH ubuntu 24.04 runners (#1091)
2 parents d59303f + 7ecb1e8 commit 47554fb

File tree

268 files changed

+2916
-30050
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+2916
-30050
lines changed

.clang-tidy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
# This is also a good check, but we also have a lot of narrowing conversions
1010
# especially related to display stuff since Adafruit GFX uses uint16_t a lot.
1111
# -bugprone-narrowing-conversions,
12+
# This is busted in clang-tidy 16 and hangs forever
13+
# See: https://github.com/llvm/llvm-project/issues/63101
14+
# -bugprone-unchecked-optional-access,
1215

1316
# Enable Cert checks
1417
# cert-*,
@@ -106,6 +109,7 @@ Checks: >-
106109
bugprone-*,
107110
-bugprone-easily-swappable-parameters,
108111
-bugprone-narrowing-conversions,
112+
-bugprone-unchecked-optional-access,
109113
cert-*,
110114
-cert-dcl03-c,
111115
clang-analyzer-*,

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
with:
3030
python-version: "3.11"
3131

32-
- name: Install SDL
32+
- name: Install prerequisites
3333
run: sudo apt update && sudo apt install -y libsdl2-dev libsdl2-image-dev
3434

3535
- name: build
@@ -54,7 +54,7 @@ jobs:
5454
matrix:
5555
# Tags from here: https://hub.docker.com/r/espressif/idf/tags
5656
idf_version:
57-
- v5.1.5
57+
- v5.3.2
5858
# - latest
5959
target:
6060
- glasses-debug
@@ -117,7 +117,7 @@ jobs:
117117
uses: actions/checkout@v4
118118
with:
119119
submodules: "recursive"
120-
120+
121121
# Build scripts/epub-render with cmake
122122
- name: Build epub-render
123123
run: make epub-render-build
@@ -150,8 +150,8 @@ jobs:
150150
id: download-firmware
151151
uses: actions/download-artifact@v4
152152
with:
153-
name: embedded-app-${{ github.sha }}-IDFv5.1.5
154-
path: embedded-app-${{ github.sha }}-IDFv5.1.5
153+
name: embedded-app-${{ github.sha }}-IDFv5.3.2
154+
path: embedded-app-${{ github.sha }}-IDFv5.3.2
155155

156156
- name: Download epub-render binaries
157157
id: download-epub-render
@@ -184,7 +184,7 @@ jobs:
184184
-F "release_notes=TODO"
185185
186186
- name: Zip back up the firmware build
187-
run: zip -r embedded-app-${{ steps.set-version.outputs.version }}-${{ github.sha }}-IDFv5.1.5.zip embedded-app-${{ github.sha }}-IDFv5.1.5
187+
run: zip -r embedded-app-${{ steps.set-version.outputs.version }}-${{ github.sha }}-IDFv5.3.2.zip embedded-app-${{ github.sha }}-IDFv5.3.2
188188

189189
- name: Rename epub-render binary
190190
run: |
@@ -198,7 +198,7 @@ jobs:
198198
if: startsWith(github.ref, 'refs/tags/')
199199
with:
200200
files: |
201-
embedded-app-${{ steps.set-version.outputs.version }}-${{ github.sha }}-IDFv5.1.5.zip
201+
embedded-app-${{ steps.set-version.outputs.version }}-${{ github.sha }}-IDFv5.3.2.zip
202202
epub-render-${{ steps.set-version.outputs.version }}-${{ github.sha }}.zip
203203
204204
- name: Notify Slack

.github/workflows/clang-tools.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on:
1212
group: Beefy
1313
container:
14-
image: espressif/idf:v5.1.5
14+
image: espressif/idf:v5.3.2
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -45,12 +45,10 @@ jobs:
4545
PR_GITHUB_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4747

48-
- uses: DoozyX/[email protected]
49-
with:
50-
source: "./src"
51-
extensions: "hpp,h,cpp,c"
52-
clangFormatVersion: 15
53-
inplace: True
48+
- name: Run clang-format
49+
run: |
50+
. $IDF_PATH/export.sh
51+
make clang-format
5452
5553
- name: "Commit changes if necessary"
5654
if: github.event_name == 'pull_request'

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
url = [email protected]:sindarin-inc/astubs.git
1919
[submodule "components/freetype/freetype"]
2020
path = components/freetype/freetype
21-
url = [email protected]:freetype/freetype.git
21+
url = [email protected]:sindarin-inc/freetype.git
2222
[submodule "lib/mbedtls"]
2323
path = lib/mbedtls
2424
url = https://github.com/Mbed-TLS/mbedtls.git

Makefile

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ else ifeq ($(TARGET),sharp-27in)
3636
endif
3737

3838
# Optional variables for the Simulator builds
39-
CMAKE_SIM_DISPLAY_OPTIONS := $(if $(SIM_WIDTH),-DSIM_WIDTH=$(SIM_WIDTH)) $(if $(SIM_HEIGHT),-DSIM_HEIGHT=$(SIM_HEIGHT)) $(if $(SIM_SCALE),-DSIM_SCALE=$(SIM_SCALE)) $(if $(SIM_LAYOUT_DEBUG),-DSIM_LAYOUT_DEBUG=$(SIM_LAYOUT_DEBUG)) $(if $(SIM_ONE_BIT),-DSIM_ONE_BIT=$(SIM_ONE_BIT))
39+
CMAKE_SIM_DISPLAY_OPTIONS := $(if $(DISPLAY_WIDTH),-DDISPLAY_WIDTH=$(DISPLAY_WIDTH)) $(if $(DISPLAY_HEIGHT),-DDISPLAY_HEIGHT=$(DISPLAY_HEIGHT)) $(if $(DISPLAY_SCALE),-DDISPLAY_SCALE=$(DISPLAY_SCALE)) $(if $(SIM_LAYOUT_DEBUG),-DSIM_LAYOUT_DEBUG=$(SIM_LAYOUT_DEBUG)) $(if $(DISPLAY_TYPE),-DDISPLAY_TYPE=$(DISPLAY_TYPE)) $(if $(TTF_SCREEN_RES_PER_INCH),-DTTF_SCREEN_RES_PER_INCH=$(TTF_SCREEN_RES_PER_INCH))
4040

4141
.PHONY: sim-build
4242
sim-build:
4343
mkdir -p lib/Simulator/build
44-
cd lib/Simulator/build && cmake $(CMAKE_FLAGS) $(CMAKE_SIM_DISPLAY_OPTIONS) .. && $(MAKE)
44+
cd lib/Simulator/build && cmake $(CMAKE_FLAGS) -DSIM_SCALE=2 $(CMAKE_SIM_DISPLAY_OPTIONS) .. && $(MAKE)
4545

4646
.PHONY: sim-run
4747
sim: sim-build
@@ -50,12 +50,30 @@ sim: sim-build
5050
.PHONY: sim8-build
5151
sim8-build:
5252
mkdir -p lib/Simulator/build8
53-
cd lib/Simulator/build8 && cmake $(CMAKE_FLAGS) -DENABLE_8BIT_DISPLAY=ON $(CMAKE_SIM_DISPLAY_OPTIONS) .. && $(MAKE)
53+
cd lib/Simulator/build8 && cmake $(CMAKE_FLAGS) -DDISPLAY_TYPE=DISPLAY_SIM_8BIT -DDISPLAY_WIDTH=600 -DDISPLAY_HEIGHT=600 $(CMAKE_SIM_DISPLAY_OPTIONS) .. && $(MAKE)
5454

5555
.PHONY: sim-run8
5656
sim8: sim8-build
5757
./lib/Simulator/build8/simulator
5858

59+
.PHONY: sim16-build
60+
sim16-build:
61+
mkdir -p lib/Simulator/build16
62+
cd lib/Simulator/build16 && cmake $(CMAKE_FLAGS) -DDISPLAY_TYPE=DISPLAY_SIM_16BIT -DDISPLAY_WIDTH=600 -DDISPLAY_HEIGHT=600 $(CMAKE_SIM_DISPLAY_OPTIONS) .. && $(MAKE)
63+
64+
.PHONY: sim-run16
65+
sim16: sim16-build
66+
./lib/Simulator/build16/simulator
67+
68+
.PHONY: sim24-build
69+
sim24-build:
70+
mkdir -p lib/Simulator/build24
71+
cd lib/Simulator/build24 && cmake $(CMAKE_FLAGS) -DDISPLAY_TYPE=DISPLAY_SIM_24BIT -DDISPLAY_WIDTH=600 -DDISPLAY_HEIGHT=600 $(CMAKE_SIM_DISPLAY_OPTIONS) .. && $(MAKE)
72+
73+
.PHONY: sim-run24
74+
sim24: sim24-build
75+
./lib/Simulator/build24/simulator
76+
5977
.PHONY: lldb
6078
lldb: sim-build
6179
lldb lib/Simulator/build/simulator
@@ -152,6 +170,10 @@ monitor-jtag: check_idf
152170
monitor-devboard: check_idf
153171
idf.py $(IDF_PROFILE) monitor --no-reset --port $$(python3 scripts/port_tool.py find_port devboard)
154172

173+
.PHONY: ios-framework
174+
ios-framework:
175+
cd lib/Simulator/CommonIos && make build
176+
155177
.PHONY: clean
156178
clean:
157179
rm -fr build*
@@ -160,6 +182,7 @@ clean:
160182
rm -fr test/CatchTests/build
161183
rm -fr test/CatchTests/Images/TestRun/*diff.png
162184
rm -fr test/CatchTests/Images/TestRun/GylphTests/*diff.png
185+
rm -fr lib/Simulator/CommonIos/build*
163186

164187
.PHONY: clang-tidy
165188
clang-tidy: check_idf
@@ -174,6 +197,10 @@ clang-tidy: check_idf
174197
IDF_TOOLCHAIN=clang idf.py -B build-clang clang-check --run-clang-tidy-py scripts/run-clang-tidy.py --run-clang-tidy-options "-fix -header-filter=embedded-app/src/.*" --exclude-paths managed_components --exclude-paths components
175198
find src -iname "*.hpp" -o -iname "*.h" -o -iname "*.cpp" -o -iname "*.c" | xargs clang-format -i
176199

200+
.PHONY: clang-format
201+
clang-format: check_idf
202+
find src -iname "*.hpp" -o -iname "*.h" -o -iname "*.cpp" -o -iname "*.c" | xargs clang-format -i
203+
177204
program-mode:
178205
python3 scripts/port_tool.py find_port programming
179206

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ git submodule update --init --recursive
1313
The primary way to build the firmware itself is with Espressif's official [esp-idf toolchain](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/linux-macos-setup.html). In some other directory (not in this repo), run:
1414

1515
```sh
16-
git clone -b v5.1.5 --recursive https://github.com/espressif/esp-idf.git
16+
git clone -b v5.3.2 --recursive https://github.com/espressif/esp-idf.git
1717
cd esp-idf
1818
./install.sh esp32s3
1919
```
@@ -75,7 +75,7 @@ Issues that will be fixed automatically will be fixed by clang-tidy, warnings wi
7575

7676
The simulator compiles in <20s from a clean build, and even less on an incremental build. This makes it fast for us to iterate on anything that doesn't need the physical hardware.
7777

78-
You'll need SDL2, openssl, and freetype for it to work: `brew install sdl2 openssl freetype` (on Ubuntu `sudo apt install libsdl2-dev libssl-dev libfreetype-dev`). Then you can run `make sim` to run it (or `make sim8` for the high-res version). After building once, you can also debug with lldb at the command line: `lldb lib/Simulator/build/simulator`.
78+
You'll need SDL2, openssl for it to work: `brew install sdl2 openssl` (on Ubuntu `sudo apt install libsdl2-dev libssl-dev`). Then you can run `make sim` to run it (or `make sim8` for the high-res version). After building once, you can also debug with lldb at the command line: `lldb lib/Simulator/build/simulator`.
7979

8080
### Extract your Sol cloud access token to download content onto the Simulator
8181

components/astubs

components/esp-nimble-cpp

Submodule esp-nimble-cpp updated 136 files

0 commit comments

Comments
 (0)