Skip to content

Commit f3c2441

Browse files
icyqwqlbuque
authored andcommitted
board: Support paperS3.
Signed-off-by: icyqwq <icyqwq@gmail.com>
1 parent 9c04ef2 commit f3c2441

33 files changed

+987
-3
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@
2525
[submodule "m5stack/components/esp-code-scanner"]
2626
path = m5stack/components/esp-code-scanner
2727
url = https://github.com/hlym123/esp-code-scanner.git
28+
[submodule "m5stack/components/epdiy"]
29+
path = m5stack/components/epdiy
30+
url = https://github.com/vroland/epdiy.git

m5stack/CMakeListsDefault.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ if (
131131
BOARD_TYPE STREQUAL "cores3"
132132
OR BOARD_TYPE STREQUAL "core2"
133133
OR BOARD_TYPE STREQUAL "paper"
134+
OR BOARD_TYPE STREQUAL "papers3"
134135
OR BOARD_TYPE STREQUAL "basic"
135136
OR BOARD_TYPE STREQUAL "fire"
136137
OR BOARD_TYPE STREQUAL "capsule"
@@ -232,6 +233,13 @@ list(APPEND IDF_COMPONENTS
232233
)
233234
endif()
234235

236+
if (M5_EPDIY_ENABLE AND BOARD_TYPE STREQUAL "papers3")
237+
message(STATUS "Enable EPDiy component")
238+
list(APPEND IDF_COMPONENTS
239+
epdiy
240+
)
241+
endif()
242+
235243
if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s3")
236244
list(APPEND IDF_COMPONENTS boards)
237245
list(APPEND IDF_COMPONENTS audio_pipeline)

m5stack/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ boards := \
3030
M5STACK_Dial:dial \
3131
M5STACK_Cardputer:cardputer \
3232
M5STACK_Paper:paper \
33+
M5STACK_PaperS3:papers3 \
3334
M5STACK_DinMeter:dinmeter \
3435
M5STACK_StickC:stickc \
3536
M5STACK_Station:station \
@@ -65,6 +66,7 @@ BOARD_TYPE_DEF := \
6566
dial \
6667
cardputer \
6768
paper \
69+
papers3 \
6870
dinmeter \
6971
stickc \
7072
station \
@@ -273,6 +275,7 @@ submodules:
273275
git submodule update --init ./components/esp32-camera
274276
git submodule update --init ./components/esp_dl
275277
git submodule update --init ./components/esp-code-scanner
278+
git submodule update --init ./components/epdiy
276279
git submodule update --init ./components/M5Unified/M5GFX
277280
git submodule update --init ./components/M5Unified/M5Unified
278281
git submodule update --init --recursive ./components/lv_bindings
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
include("$(MPY_DIR)/../m5stack/modules/startup/manifest_papers3.py")
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
set(IDF_TARGET esp32s3)
6+
set(BOARD_ID 19)
7+
set(M5_EPDIY_ENABLE TRUE)
8+
9+
set(SDKCONFIG_DEFAULTS
10+
./boards/M5STACK_PaperS3/sdkconfig.board
11+
./boards/sdkconfig.base
12+
./boards/sdkconfig.240mhz
13+
./boards/sdkconfig.disable_iram
14+
./boards/sdkconfig.ble
15+
./boards/sdkconfig.usb
16+
./boards/sdkconfig.flash_16mb
17+
./boards/sdkconfig.spiram_oct
18+
)
19+
20+
# If not enable LVGL, ignore this...
21+
set(LV_CFLAGS -DLV_COLOR_DEPTH=16 -DLV_COLOR_16_SWAP=0)
22+
23+
if(NOT MICROPY_FROZEN_MANIFEST)
24+
set(MICROPY_FROZEN_MANIFEST ${CMAKE_SOURCE_DIR}/boards/manifest.py)
25+
endif()
26+
27+
# NOTE: 这里的配置是无效的,仅为了兼容ADF,保证编译通过
28+
set(ADF_COMPS "$ENV{ADF_PATH}/components")
29+
set(ADF_BOARD_DIR "$ENV{ADF_PATH}/components/audio_board/esp32_s3_box_3")
30+
31+
list(APPEND EXTRA_COMPONENT_DIRS
32+
$ENV{ADF_PATH}/components/audio_pipeline
33+
$ENV{ADF_PATH}/components/audio_sal
34+
$ENV{ADF_PATH}/components/esp-adf-libs
35+
$ENV{ADF_PATH}/components/esp-sr
36+
${CMAKE_SOURCE_DIR}/boards
37+
)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*/
6+
7+
#define MICROPY_HW_BOARD_NAME "M5STACK PaperS3"
8+
#define MICROPY_HW_MCU_NAME "ESP32S3"
9+
10+
#define MICROPY_PY_MACHINE_DAC (0)
11+
12+
#define MICROPY_PY_MACHINE_I2S (0)
13+
14+
// Enable UART REPL for modules that have an external USB-UART and don't use native USB.
15+
#define MICROPY_HW_ENABLE_UART_REPL (1)
16+
17+
#define MICROPY_HW_I2C0_SCL (9)
18+
#define MICROPY_HW_I2C0_SDA (8)
19+
20+
// If not enable LVGL, ignore this...
21+
#include "./../mpconfiglvgl.h"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
CONFIG_FLASHMODE_DIO=y # QIO mode has some problem when mount fs
6+
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
7+
CONFIG_ESPTOOLPY_FLASHMODE="dio"
8+
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
9+
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
10+
CONFIG_ESPTOOLPY_AFTER_NORESET=y
11+
12+
CONFIG_SPIRAM_MEMTEST=
13+
14+
# M5STACK UiFlow USB description
15+
CONFIG_TINYUSB_DESC_CDC_STRING="M5Stack PaperS3(UiFlow2)"
16+
17+
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
18+
CONFIG_SPIRAM_MODE_QUAD=
19+
CONFIG_SPIRAM_MODE_OCT=y
20+
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y

m5stack/cmodules/m5unified/m5unified.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ static const mp_rom_map_elem_t m5_board_member_table[] = {
2727
{ MP_ROM_QSTR(MP_QSTR_M5Cardputer), MP_ROM_INT(14) },
2828
{ MP_ROM_QSTR(MP_QSTR_M5AirQ), MP_ROM_INT(15) },
2929
{ MP_ROM_QSTR(MP_QSTR_M5AtomS3R), MP_ROM_INT(18) },
30+
{ MP_ROM_QSTR(MP_QSTR_M5PaperS3), MP_ROM_INT(19) },
3031
// non display boards
3132
{ MP_ROM_QSTR(MP_QSTR_M5Atom), MP_ROM_INT(128) },
3233
{ MP_ROM_QSTR(MP_QSTR_M5AtomPsram), MP_ROM_INT(129) },

m5stack/components/M5Unified/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ file(GLOB SRCS
2727

2828
set(COMPONENT_SRCS ${SRCS})
2929
if (IDF_VERSION_MAJOR GREATER_EQUAL 5)
30-
set(COMPONENT_REQUIRES esp_adc nvs_flash efuse driver esp_timer main_${IDF_TARGET})
30+
set(COMPONENT_REQUIRES esp_adc nvs_flash efuse driver esp_timer epdiy main_${IDF_TARGET})
3131
else()
3232
set(COMPONENT_REQUIRES esp_adc_cal nvs_flash efuse main)
3333
endif()

0 commit comments

Comments
 (0)