Skip to content

Commit 168a2bd

Browse files
committed
feat: add wave_7b board support
1 parent ea66257 commit 168a2bd

23 files changed

Lines changed: 600 additions & 20 deletions

.github/workflows/test-all-builds.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
board: [wave_4b, wave_35, wave_5, wave_43, crowpanel]
16+
board: [wave_4b, wave_35, wave_5, wave_43, crowpanel, wave_7b]
1717
name: build (${{ matrix.board }})
1818
steps:
1919
- name: Checkout repo
@@ -88,6 +88,11 @@ jobs:
8888
with:
8989
name: firmware-crowpanel
9090
path: site/flash/firmware/crowpanel
91+
- name: Download wave_7b firmware
92+
uses: actions/download-artifact@v4.1.3
93+
with:
94+
name: firmware-wave_7b
95+
path: site/flash/firmware/wave_7b
9196
- name: Stage branding assets
9297
run: cp -r branding site/branding
9398
- name: Upload Pages artifact

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ build_wave_4b/
55
build_wave_43/
66
build_wave_5/
77
build_crowpanel/
8+
build_wave_7b/
89
sdkconfig
910
sdkconfig.old
1011
managed_components/

.justfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
export IDF_PATH := env_var("HOME") + "/esp/esp-idf"
22
export IDF_PATH_FORCE := "1"
33

4-
# Board parameter: "wave_4b" (default), "wave_35", "wave_5", "wave_43", or "crowpanel"
5-
# Usage: just build wave_35, just flash wave_4b, just build wave_5, just build wave_43
4+
# Board parameter: "wave_4b" (default), "wave_35", "wave_5", "wave_43", "crowpanel", or "wave_7b"
5+
# Usage: just build wave_35, just flash wave_4b, just build wave_5, just build wave_7b
66
# Each board builds into its own build_<board>/ directory, so switching
77
# boards is instant (no clean required) and per-board builds stay incremental.
88

9-
boards := "wave_4b wave_35 wave_5 wave_43 crowpanel"
9+
boards := "wave_4b wave_35 wave_5 wave_43 crowpanel wave_7b"
1010

1111
_check_board board:
1212
#!/usr/bin/env sh
@@ -35,7 +35,7 @@ test:
3535
./scripts/test.sh
3636

3737
clean:
38-
rm -fRd build build_wave_4b build_wave_35 build_wave_5 build_wave_43 build_crowpanel
38+
rm -fRd build build_wave_4b build_wave_35 build_wave_5 build_wave_43 build_crowpanel build_wave_7b
3939
rm -f sdkconfig
4040
rm -fRd compile_commands.json
4141
rm -fRd .cache/
@@ -70,14 +70,14 @@ site port="8000":
7070
python3 -m http.server {{port}} -d site
7171
7272
# Simulator board resolution mapping
73-
# wave_4b: 720x720, wave_35: 320x480, wave_5: 720x1280, wave_43: 480x800, crowpanel: 1024x600
73+
# wave_4b: 720x720, wave_35: 320x480, wave_5: 720x1280, wave_43: 480x800, crowpanel: 1024x600, wave_7b: 1024x600
7474
_sim_h_res board:
7575
#!/usr/bin/env sh
76-
case "{{board}}" in wave_35) echo 320;; wave_5) echo 720;; wave_43) echo 480;; crowpanel) echo 1024;; *) echo 720;; esac
76+
case "{{board}}" in wave_35) echo 320;; wave_5) echo 720;; wave_43) echo 480;; crowpanel) echo 1024;; wave_7b) echo 1024;; *) echo 720;; esac
7777
7878
_sim_v_res board:
7979
#!/usr/bin/env sh
80-
case "{{board}}" in wave_35) echo 480;; wave_5) echo 1280;; wave_43) echo 800;; crowpanel) echo 600;; *) echo 720;; esac
80+
case "{{board}}" in wave_35) echo 480;; wave_5) echo 1280;; wave_43) echo 800;; crowpanel) echo 600;; wave_7b) echo 600;; *) echo 720;; esac
8181
8282
# Build the desktop simulator
8383
sim-build board="wave_4b": (_check_board board)

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [Unreleased]
4+
5+
### Added
6+
- Support for Waveshare ESP32-P4-WiFi6-Touch-LCD-7B (wave_7b, 1024x600 MIPI DSI, EK79007)
7+
38
## [0.0.16] - 2026-08-11
49

510
### Added

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Do not introduce UI dependencies into core modules. If a core function needs use
3838

3939
The project uses two static analysis tools to catch bugs early. Both are available after sourcing ESP-IDF (`source ~/esp/esp-idf/export.sh`), except `cppcheck` which is installed separately.
4040

41-
Both tools cover `main/` and first-party components (`bbqr`, `cUR`, `k_quirc`, `sd_card`, `video`, `wave_4b`, `wave_35`, `wave_43`, `crowpanel`). `libwally-core` and `wave_5` are excluded (third-party upstream code: libwally-core is the original; wave_5 ships a vendored ST-style HX8394 driver).
41+
Both tools cover `main/` and first-party components (`bbqr`, `cUR`, `k_quirc`, `sd_card`, `video`, `wave_4b`, `wave_35`, `wave_43`, `crowpanel`, `wave_7b`). `libwally-core` and `wave_5` are excluded (third-party upstream code: libwally-core is the original; wave_5 ships a vendored ST-style HX8394 driver).
4242

4343
**clang-tidy** (recommended, catches real bugs):
4444
```bash
@@ -52,6 +52,7 @@ clang-tidy -p build/compile_commands.json main/core/wallet.c
5252
find main components/bbqr components/cUR components/k_quirc \
5353
components/sd_card components/video \
5454
components/wave_4b components/wave_35 components/wave_43 components/crowpanel \
55+
components/wave_7b \
5556
-name '*.c' -not -path '*/build/*' 2>/dev/null | \
5657
xargs -P$(nproc) -I{} clang-tidy -p build/compile_commands.json {}
5758
```
@@ -66,6 +67,7 @@ The project `.clang-tidy` config enables bug-finding and security checks tuned f
6667
cppcheck main/ components/bbqr components/cUR components/k_quirc \
6768
components/sd_card components/video \
6869
components/wave_4b components/wave_35 components/wave_43 components/crowpanel \
70+
components/wave_7b \
6971
--enable=warning,style,performance \
7072
--suppress=missingIncludeSystem \
7173
--suppress=missingInclude \

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ It signs PSBTs for single-sig, multisig and miniscript policies on both native s
1919
2020
## Hardware
2121

22-
Kern supports four Waveshare ESP32-P4 boards and one Elecrow CrowPanel board:
22+
Kern supports five Waveshare ESP32-P4 boards and one Elecrow CrowPanel board:
2323

2424
| Board | Display | Touch | Camera |
2525
|-------|---------|-------|--------|
@@ -28,6 +28,7 @@ Kern supports four Waveshare ESP32-P4 boards and one Elecrow CrowPanel board:
2828
| [ESP32-P4-WiFi6-Touch-LCD-5](https://www.waveshare.com/esp32-p4-wifi6-touch-lcd-5.htm) (`wave_5`) | 720x1280 MIPI DSI | GT911 | OV5647, included |
2929
| [ESP32-P4-WiFi6-Touch-LCD-4.3](https://www.waveshare.com/esp32-p4-wifi6-touch-lcd-4.3.htm) (`wave_43`) | 480x800 MIPI DSI | GT911 | OV5647, included |
3030
| [CrowPanel Advanced 10.1" ESP32-P4](https://github.com/Elecrow-RD/CrowPanel-Advanced-10.1inch-ESP32-P4-HMI-AI-Display-1024x600-IPS-Touch-Screen) and 7" siblings (`crowpanel`) | 1024x600 MIPI DSI | GT911 | SC2336, included |
31+
| [ESP32-P4-WiFi6-Touch-LCD-7B](https://www.waveshare.com/esp32-p4-wifi6-touch-lcd-7b.htm) (`wave_7b`) | 1024x600 MIPI DSI | GT911 | OV5647, sold separately |
3132

3233
ESP32-P4 does not contain radio (WiFi, BLE), but these boards have a radio in a secondary chip (ESP32-C6 mini). Exploring radio-less, simpler and cheaper ESP32-P4-only boards is part of the project's hardware research.
3334

@@ -71,14 +72,15 @@ git submodule update --init --recursive
7172

7273
### Building the Project
7374

74-
Build with [just](https://github.com/casey/just) (recommended) or `idf.py` directly. All `just` commands accept a board parameter, one of `wave_4b` (default), `wave_35`, `wave_5`, `wave_43`, or `crowpanel`:
75+
Build with [just](https://github.com/casey/just) (recommended) or `idf.py` directly. All `just` commands accept a board parameter, one of `wave_4b` (default), `wave_35`, `wave_5`, `wave_43`, `crowpanel`, or `wave_7b`:
7576

7677
```bash
7778
just build # Build for wave_4b (default)
7879
just build wave_35 # Build for wave_35
7980
just build wave_5 # Build for wave_5
8081
just build wave_43 # Build for wave_43
8182
just build crowpanel # Build for CrowPanel 7" / 10.1"
83+
just build wave_7b # Build for wave_7b
8284
just flash wave_5 # Flash for wave_5
8385
just monitor # Serial monitor
8486
just clean # Wipe all build_<board> dirs + sdkconfig
@@ -101,6 +103,9 @@ idf.py -D 'SDKCONFIG_DEFAULTS=sdkconfig.defaults;sdkconfig.defaults.wave_43' bui
101103

102104
# crowpanel (7" / 10.1")
103105
idf.py -D 'SDKCONFIG_DEFAULTS=sdkconfig.defaults;sdkconfig.defaults.crowpanel' build
106+
107+
# wave_7b
108+
idf.py -D 'SDKCONFIG_DEFAULTS=sdkconfig.defaults;sdkconfig.defaults.wave_7b' build
104109
```
105110

106111
> **Note:** `just` builds each board into its own `build_<board>/` directory, so switching boards needs no clean. The raw `idf.py` commands above share the default `build/` directory and `sdkconfig`: run `idf.py fullclean && rm sdkconfig` when switching boards that way.
@@ -117,6 +122,7 @@ just sim wave_35 # Run simulator as wave_35 (320x480)
117122
just sim wave_5 # Run simulator as wave_5 (720x1280)
118123
just sim wave_43 # Run simulator as wave_43 (480x800)
119124
just sim crowpanel # Run simulator as crowpanel (1024x600)
125+
just sim wave_7b # Run simulator as wave_7b (1024x600)
120126
just sim-build wave_35 # Build only
121127
just sim-clean # Remove simulator build artifacts
122128
just sim-reset # Wipe simulator data (factory reset)
@@ -218,6 +224,7 @@ Pre-release firmware is provided **for research and testing purposes only**. Any
218224
| `wave_5` | Waveshare ESP32-P4-WiFi6-Touch-LCD-5 | 720x1280 MIPI DSI |
219225
| `wave_43` | Waveshare ESP32-P4-WiFi6-Touch-LCD-4.3 | 480x800 MIPI DSI |
220226
| `crowpanel` | CrowPanel Advanced 7" / 10.1" ESP32-P4 | 1024x600 MIPI DSI |
227+
| `wave_7b` | Waveshare ESP32-P4-WiFi6-Touch-LCD-7B | 1024x600 MIPI DSI |
221228

222229
### Requirements
223230

components/video/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
idf_component_register(
22
SRCS "video.c"
33
INCLUDE_DIRS "."
4-
REQUIRES esp_cam_sensor esp_video esp_sccb_intf wave_4b wave_35 wave_5 wave_43 crowpanel
4+
REQUIRES esp_cam_sensor esp_video esp_sccb_intf wave_4b wave_35 wave_5 wave_43 crowpanel wave_7b
55
)

components/wave_7b/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
if(CONFIG_KERN_BOARD_WAVE_7B)
2+
idf_component_register(
3+
SRCS "wave_7b.c"
4+
INCLUDE_DIRS "include"
5+
REQUIRES driver esp_lcd esp_driver_ledc bsp_common
6+
PRIV_REQUIRES esp_lcd_touch_gt911
7+
)
8+
else()
9+
idf_component_register(
10+
REQUIRES driver esp_lcd esp_driver_ledc bsp_common
11+
)
12+
endif()
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
dependencies:
2+
idf:
3+
version: '>=5.4'
4+
esp_lcd_touch_gt911: ^1
5+
espressif/esp_lvgl_adapter:
6+
version: '>=0.5.1'
7+
public: true
8+
lvgl/lvgl: '>=8,<10'
9+
espressif/esp_lcd_ek79007:
10+
version: '>=1.0.2'
11+
12+
description: Minimal BSP for Waveshare ESP32-P4-WiFi6-Touch-LCD-7B (1024x600 MIPI DSI, EK79007, GT911)
13+
targets:
14+
- esp32p4
15+
version: 1.0.0
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#pragma once
2+
#include "esp_lcd_mipi_dsi.h"
3+
#include "esp_lcd_types.h"
4+
#include "sdkconfig.h"
5+
6+
/* LCD color formats */
7+
#define ESP_LCD_COLOR_FORMAT_RGB565 (1)
8+
#define ESP_LCD_COLOR_FORMAT_RGB888 (2)
9+
10+
/* LCD display color format */
11+
#if CONFIG_BSP_LCD_COLOR_FORMAT_RGB888
12+
#define BSP_LCD_COLOR_FORMAT (ESP_LCD_COLOR_FORMAT_RGB888)
13+
#else
14+
#define BSP_LCD_COLOR_FORMAT (ESP_LCD_COLOR_FORMAT_RGB565)
15+
#endif
16+
/* LCD display color bytes endianness */
17+
#define BSP_LCD_BIGENDIAN (0)
18+
/* LCD display color bits */
19+
#define BSP_LCD_BITS_PER_PIXEL (16)
20+
/* LCD display color space */
21+
#define BSP_LCD_COLOR_SPACE (LCD_RGB_ELEMENT_ORDER_RGB)
22+
23+
#define BSP_LCD_H_RES (1024)
24+
#define BSP_LCD_V_RES (600)
25+
#define BSP_LCD_MIPI_DSI_LANE_BITRATE_MBPS (1000)
26+
27+
#define BSP_LCD_MIPI_DSI_LANE_NUM (2)
28+
#define BSP_MIPI_DSI_PHY_PWR_LDO_CHAN (3)
29+
#define BSP_MIPI_DSI_PHY_PWR_LDO_VOLTAGE_MV (2500)
30+
31+
typedef struct {
32+
int dummy;
33+
} bsp_display_config_t;
34+
35+
typedef struct {
36+
esp_lcd_dsi_bus_handle_t mipi_dsi_bus;
37+
esp_lcd_panel_io_handle_t io;
38+
esp_lcd_panel_handle_t panel;
39+
esp_lcd_panel_handle_t control;
40+
} bsp_lcd_handles_t;
41+
42+
esp_err_t bsp_display_new(const bsp_display_config_t *config,
43+
esp_lcd_panel_handle_t *ret_panel,
44+
esp_lcd_panel_io_handle_t *ret_io);
45+
esp_err_t bsp_display_new_with_handles(const bsp_display_config_t *config,
46+
bsp_lcd_handles_t *ret_handles);
47+
esp_err_t bsp_display_brightness_init(void);
48+
esp_err_t bsp_display_brightness_set(int brightness_percent);
49+
esp_err_t bsp_display_backlight_on(void);
50+
esp_err_t bsp_display_backlight_off(void);

0 commit comments

Comments
 (0)