Skip to content

Commit 6e0613a

Browse files
committed
feat(board): Add project support for the EDA course case team
- Add eda_tv_pro Board Configuration - Add eda_robot_pro Board Configuration - Add eda_super_bear Board Configuration - Add eda_ai_gamebox Board Configuration
1 parent ac2a2ec commit 6e0613a

22 files changed

Lines changed: 1179 additions & 0 deletions
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# EDA AI GameBox
2+
3+
## Hardware Overview
4+
5+
| Feature | Specification |
6+
|---------|---------------|
7+
| Chip | ESP32-S3 R8N8 |
8+
| Flash | 8MB QIO 80MHz |
9+
| PSRAM | 8MB Octal 80MHz |
10+
| Display | ST7789 240x320 LCD (SPI) |
11+
| Controls | 五向按键 + XYAB 按键 (共9键) |
12+
| Buzzer | 无源蜂鸣器 (GPIO48, LEDC PWM) |
13+
| Audio ||
14+
15+
## GPIO Mapping
16+
17+
| Function | GPIO |
18+
|----------|------|
19+
| **SPI Display (ST7789)** | |
20+
| MOSI | 13 |
21+
| SCLK | 14 |
22+
| CS | 11 |
23+
| DC | 12 |
24+
| RST | -1 (EN) |
25+
| Backlight | 10 |
26+
| **五向按键** | |
27+
| 上 (Front) | 5 |
28+
| 下 (Back) | 3 |
29+
| 左 (Left) | 1 |
30+
| 右 (Right) | 4 |
31+
| 中 (Center) | 2 |
32+
| **XYAB 按键** | |
33+
| X | 8 |
34+
| Y | 6 |
35+
| A | 9 |
36+
| B | 7 |
37+
| **Buzzer** | |
38+
| Passive Buzzer | 48 |
39+
40+
## Build & Flash
41+
42+
```bash
43+
cd application/edge_agent
44+
45+
# Set target chip
46+
idf.py set-target esp32s3
47+
48+
# Install board manager assistant (required for bmgr)
49+
pip install esp-bmgr-assist
50+
51+
# Generate board configuration
52+
idf.py bmgr --customer-path ./boards -b eda_ai_gamebox
53+
54+
# Build
55+
idf.py build
56+
57+
# Flash
58+
idf.py -p /dev/ttyACM0 flash monitor
59+
```
60+
61+
## Project Documentation
62+
63+
- [EDA-AI-GameBox 项目文档](https://wiki.lceda.cn/zh-hans/course-projects/smart-internet/eda-ai-gamebox/eda-ai-gamebox-introduce.html)
64+
65+
## Files
66+
67+
| File | Description |
68+
|------|-------------|
69+
| `board_info.yaml` | Board identity (chip, manufacturer) |
70+
| `board_peripherals.yaml` | Peripheral pin and bus configuration |
71+
| `board_devices.yaml` | Device driver configuration (display, buttons) |
72+
| `sdkconfig.defaults.board` | Board-level sdkconfig defaults |
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
version: 1.0.0
2+
# Devices for EDA AI GameBox (掌上游戏机)
3+
4+
devices:
5+
6+
# ST7789 LCD 240x320 over SPI
7+
- name: display_lcd
8+
chip: st7789
9+
type: display_lcd
10+
sub_type: spi
11+
version: default
12+
config:
13+
# 顺时针旋转 90 度:swap_xy + mirror_x,逻辑分辨率 320x240
14+
mirror_x: true
15+
mirror_y: false
16+
swap_xy: true
17+
invert_color: true
18+
x_max: 320
19+
y_max: 240
20+
io_spi_config:
21+
cs_gpio_num: 11
22+
dc_gpio_num: 12
23+
spi_mode: 0
24+
pclk_hz: 40000000
25+
lcd_panel_config:
26+
reset_gpio_num: -1
27+
data_endian: LCD_RGB_DATA_ENDIAN_BIG
28+
vendor_config: NULL
29+
peripherals:
30+
- name: spi_display
31+
32+
# LCD backlight
33+
- name: lcd_brightness
34+
type: ledc_ctrl
35+
version: default
36+
peripherals:
37+
- name: ledc_backlight
38+
39+
# 五向按键
40+
- name: dpad_up
41+
type: gpio_ctrl
42+
version: default
43+
config:
44+
active_level: 0
45+
default_level: 1
46+
peripherals:
47+
- name: gpio_dpad_up
48+
49+
- name: dpad_down
50+
type: gpio_ctrl
51+
version: default
52+
config:
53+
active_level: 0
54+
default_level: 1
55+
peripherals:
56+
- name: gpio_dpad_down
57+
58+
- name: dpad_left
59+
type: gpio_ctrl
60+
version: default
61+
config:
62+
active_level: 0
63+
default_level: 1
64+
peripherals:
65+
- name: gpio_dpad_left
66+
67+
- name: dpad_right
68+
type: gpio_ctrl
69+
version: default
70+
config:
71+
active_level: 0
72+
default_level: 1
73+
peripherals:
74+
- name: gpio_dpad_right
75+
76+
- name: dpad_center
77+
type: gpio_ctrl
78+
version: default
79+
config:
80+
active_level: 0
81+
default_level: 1
82+
peripherals:
83+
- name: gpio_dpad_center
84+
85+
# XYAB 按键
86+
- name: btn_x
87+
type: gpio_ctrl
88+
version: default
89+
config:
90+
active_level: 0
91+
default_level: 1
92+
peripherals:
93+
- name: gpio_btn_x
94+
95+
- name: btn_y
96+
type: gpio_ctrl
97+
version: default
98+
config:
99+
active_level: 0
100+
default_level: 1
101+
peripherals:
102+
- name: gpio_btn_y
103+
104+
- name: btn_a
105+
type: gpio_ctrl
106+
version: default
107+
config:
108+
active_level: 0
109+
default_level: 1
110+
peripherals:
111+
- name: gpio_btn_a
112+
113+
- name: btn_b
114+
type: gpio_ctrl
115+
version: default
116+
config:
117+
active_level: 0
118+
default_level: 1
119+
peripherals:
120+
- name: gpio_btn_b
121+
122+
# 无源蜂鸣器
123+
- name: buzzer
124+
type: ledc_ctrl
125+
version: default
126+
peripherals:
127+
- name: ledc_buzzer
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board: eda_ai_gamebox
2+
chip: esp32s3
3+
version: 1.0.0
4+
description: "EDA AI GameBox - ESP32-S3 掌上游戏机 (ST7789 240x320 + 五向按键 + XYAB)"
5+
manufacturer: "lceda-course-examples"
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
version: 1.0.0
2+
# Peripherals for EDA AI GameBox (掌上游戏机)
3+
# ST7789 240x320 LCD + 五向按键 + XYAB 按键
4+
5+
peripherals:
6+
7+
# ST7789 LCD display (SPI3)
8+
- name: spi_display
9+
type: spi
10+
role: master
11+
config:
12+
spi_bus_config:
13+
spi_port: SPI3_HOST
14+
data0_io_num: 13
15+
sclk_io_num: 14
16+
max_transfer_sz: 153600
17+
18+
# LCD backlight (LEDC PWM)
19+
- name: ledc_backlight
20+
type: ledc
21+
role: none
22+
config:
23+
gpio_num: 10
24+
freq_hz: 5000
25+
duty: 0
26+
duty_resolution: LEDC_TIMER_10_BIT
27+
output_invert: false
28+
29+
# 五向按键 - 上 (Front)
30+
- name: gpio_dpad_up
31+
type: gpio
32+
role: io
33+
config:
34+
pin: 5
35+
mode: GPIO_MODE_INPUT
36+
default_level: 1
37+
38+
# 五向按键 - 下 (Back)
39+
- name: gpio_dpad_down
40+
type: gpio
41+
role: io
42+
config:
43+
pin: 3
44+
mode: GPIO_MODE_INPUT
45+
default_level: 1
46+
47+
# 五向按键 - 左 (Left)
48+
- name: gpio_dpad_left
49+
type: gpio
50+
role: io
51+
config:
52+
pin: 1
53+
mode: GPIO_MODE_INPUT
54+
default_level: 1
55+
56+
# 五向按键 - 右 (Right)
57+
- name: gpio_dpad_right
58+
type: gpio
59+
role: io
60+
config:
61+
pin: 4
62+
mode: GPIO_MODE_INPUT
63+
default_level: 1
64+
65+
# 五向按键 - 中 (Center)
66+
- name: gpio_dpad_center
67+
type: gpio
68+
role: io
69+
config:
70+
pin: 2
71+
mode: GPIO_MODE_INPUT
72+
default_level: 1
73+
74+
# XYAB - X
75+
- name: gpio_btn_x
76+
type: gpio
77+
role: io
78+
config:
79+
pin: 8
80+
mode: GPIO_MODE_INPUT
81+
default_level: 1
82+
83+
# XYAB - Y
84+
- name: gpio_btn_y
85+
type: gpio
86+
role: io
87+
config:
88+
pin: 6
89+
mode: GPIO_MODE_INPUT
90+
default_level: 1
91+
92+
# XYAB - A
93+
- name: gpio_btn_a
94+
type: gpio
95+
role: io
96+
config:
97+
pin: 9
98+
mode: GPIO_MODE_INPUT
99+
default_level: 1
100+
101+
# XYAB - B
102+
- name: gpio_btn_b
103+
type: gpio
104+
role: io
105+
config:
106+
pin: 7
107+
mode: GPIO_MODE_INPUT
108+
default_level: 1
109+
110+
# 无源蜂鸣器 (LEDC PWM)
111+
- name: ledc_buzzer
112+
type: ledc
113+
role: none
114+
config:
115+
gpio_num: 48
116+
freq_hz: 2700
117+
duty: 0
118+
duty_resolution: LEDC_TIMER_10_BIT
119+
output_invert: false
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
2+
3+
# 8MB flash, QIO 80MHz
4+
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
5+
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
6+
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
7+
CONFIG_PARTITION_TABLE_CUSTOM=y
8+
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_8MB.csv"
9+
10+
# 8MB PSRAM
11+
CONFIG_SPIRAM=y
12+
CONFIG_SPIRAM_MODE_OCT=y
13+
CONFIG_SPIRAM_SPEED_80M=y
14+
15+
# LCD: ST7789 240x320
16+
CONFIG_LCD_ST7789_240X320=y
17+
18+
# USB: Serial JTAG
19+
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
20+
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
#include "esp_lcd_panel_st7789.h"
7+
8+
esp_err_t lcd_panel_factory_entry_t(esp_lcd_panel_io_handle_t io,
9+
const esp_lcd_panel_dev_config_t *panel_dev_config,
10+
esp_lcd_panel_handle_t *ret_panel)
11+
{
12+
return esp_lcd_new_panel_st7789(io, panel_dev_config, ret_panel);
13+
}

0 commit comments

Comments
 (0)