Skip to content

Commit

Permalink
bsp: Add M5Stack CoreS3
Browse files Browse the repository at this point in the history
  • Loading branch information
espzav committed Mar 5, 2024
1 parent 95368bd commit 94e09da
Show file tree
Hide file tree
Showing 31 changed files with 1,815 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .build-test-rules.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
examples:
disable:
- if: IDF_VERSION_MAJOR < 5 and CONFIG_NAME in ["esp32_c3_lcdkit", "esp32_s3_lcd_ev_board", "esp32_s3_usb_otg"]
- if: IDF_VERSION_MAJOR < 5 and CONFIG_NAME in ["esp32_c3_lcdkit", "esp32_s3_lcd_ev_board", "esp32_s3_usb_otg", "m5stack_core_s3"]
reason: Example depends on BSP, which is supported only for IDF >= 5.0
- if: IDF_VERSION_MAJOR < 5 and IDF_TARGET in ["esp32c2", "esp32p4", "esp32c5", "esp32c6"]
reason: Example depends on target, which is supported only for IDF >= 5.0
2 changes: 1 addition & 1 deletion .github/workflows/upload_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: espressif/upload-components-ci-action@v1
with:
directories: >
bsp/esp32_azure_iot_kit;bsp/esp32_s2_kaluga_kit;bsp/esp_wrover_kit;bsp/esp-box;bsp/esp32_s3_usb_otg;bsp/esp32_s3_eye;bsp/esp32_s3_lcd_ev_board;bsp/esp32_s3_korvo_2;bsp/esp-box-lite;bsp/esp32_lyrat;bsp/esp32_c3_lcdkit;bsp/esp-box-3;bsp/esp_bsp_generic;bsp/esp32_s3_korvo_1;bsp/esp32_p4_function_ev_board;
bsp/esp32_azure_iot_kit;bsp/esp32_s2_kaluga_kit;bsp/esp_wrover_kit;bsp/esp-box;bsp/esp32_s3_usb_otg;bsp/esp32_s3_eye;bsp/esp32_s3_lcd_ev_board;bsp/esp32_s3_korvo_2;bsp/esp-box-lite;bsp/esp32_lyrat;bsp/esp32_c3_lcdkit;bsp/esp-box-3;bsp/esp_bsp_generic;bsp/esp32_s3_korvo_1;bsp/esp32_p4_function_ev_board;bsp/m5stack_core_s3;
components/bh1750;components/ds18b20;components/es8311;components/es7210;components/fbm320;components/hts221;components/mag3110;components/mpu6050;components/esp_lvgl_port;components/icm42670;
components/lcd_touch/esp_lcd_touch;components/lcd_touch/esp_lcd_touch_ft5x06;components/lcd_touch/esp_lcd_touch_gt911;components/lcd_touch/esp_lcd_touch_tt21100;components/lcd_touch/esp_lcd_touch_gt1151;components/lcd_touch/esp_lcd_touch_cst816s;
components/lcd/esp_lcd_gc9a01;components/lcd/esp_lcd_ili9341;components/lcd/esp_lcd_ra8875;components/lcd_touch/esp_lcd_touch_stmpe610;components/lcd/esp_lcd_sh1107;components/lcd/esp_lcd_st7796;components/lcd/esp_lcd_gc9503;components/lcd/esp_lcd_ssd1681;components/lcd/esp_lcd_ili9881c;
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/upload_component_noglib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Upload noglib version of BSPs
# TODO: Extend this part to all BSPs
env:
BSPs: "bsp/esp32_s3_eye bsp/esp32_p4_function_ev_board"
BSPs: "bsp/esp32_s3_eye bsp/esp32_p4_function_ev_board bsp/m5stack_core_s3"
run: |
pip install idf-component-manager py-markdown-table --upgrade
python .github/ci/bsp_noglib.py ${BSPs}
Expand All @@ -25,6 +25,7 @@ jobs:
directories: >
bsp/esp32_s3_eye_noglib;
bsp/esp32_p4_function_ev_board_noglib;
bsp/m5stack_core_s3_noglib;
namespace: "espressif"
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
dry_run: ${{ github.ref_name != 'master' || github.repository_owner != 'espressif' }}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Board support packages for development boards using Espressif's SoCs, written in
| [ESP32-LyraT](bsp/esp32_lyrat) | ESP32 | uSD card slot, microphone, audio codec + power amplifier | <img src="docu/pics/lyrat.png" width="150"> |
| [ESP32-C3-LCDKit](bsp/esp32_c3_lcdkit) | ESP32-C3 | LCD display with encoder, IR, PDM audio| <img src="docu/pics/esp32_c3_lcdkit.png" width="150"> |
| [ESP-BOX-3](bsp/esp-box-3) | ESP32-S3 | LCD display with touch, audio codec + power amplifier,<br>accelerometer and gyroscope | <img src="docu/pics/esp32_s3_box_3.png" width="150"> |
| [ESP32-S3-KORVO-1](bsp/esp32_s3_korvo_1) | ESP32-S3-KORVO-1 | uSD card slot, microphone, audio codec + power amplifier, RGB led strip | <img src="docu/pics/esp32_s3_korvo_1.png" width="150"> |
| [ESP32-S3-KORVO-1](bsp/esp32_s3_korvo_1) | ESP32-S3 | uSD card slot, microphone, audio codec + power amplifier, RGB led strip | <img src="docu/pics/esp32_s3_korvo_1.png" width="150"> |
| [M5Stack CoreS3](bsp/m5stack_core_s3) | ESP32-S3 | LCD display with touch, uSD card slot, microphone, audio codec | <img src="docu/pics/m5stack_cores3.webp" width="150"> |
## LCD displays and TOUCH

| [LVGL port](components/esp_lvgl_port) | [LCD drivers](LCD.md) |
Expand Down
Binary file added SquareLine/boards/m5stack_core_s3/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions SquareLine/boards/m5stack_core_s3/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: ESP-BSP SquareLine LVGL Example
targets:
- esp32s3
dependencies:
idf: ">=5.0"
m5stack_core_s3: "*"
18 changes: 18 additions & 0 deletions SquareLine/boards/m5stack_core_s3/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name":"M5Stack CoreS3",
"version":"1.0.0",
"mcu":"ESP32S3",

"screen_width":"320",
"screen_height":"240",
"screen_color_swap":true,

"short_description":"CoreS3 is the third generation of the M5Stack Core series. Powered by the ESP32-S3 solution, this kit features a dual-core Xtensa LX7 processor running at 240MHz. CoreS3 comes equipped with built-in Wi-Fi functionality, enabling seamless connectivity. It boasts 16MB of onboard flash memory and 8MB of PSRAM, providing ample space for program storage.",
"long_description":"CoreS3 offers convenient programming options through its TYPE-C interface, supporting OTG and CDC functions. This allows for easy connection with external USB devices and hassle-free firmware flashing. CoreS3 features a 2.0-inch capacitive touch IPS screen, protected by high-strength glass material. Additionally, a 0.3 megapixel camera GC0308 is integrated at the bottom of the screen, accompanied by a proximity sensor LTR-553ALS-WA for enhanced functionality. Power management is handled by the AXP2101 power management core chip, employing a 4-way power flow control loop for efficient power distribution. The overall design emphasizes low power consumption. CoreS3 also features a 6-axis attitude sensor BMI270 and a magnetometer BMM150 for precise motion detection. With the onboard TF-card (microSD) card slot and BM8563 RTC chip, accurate timing and sleep-timer wake-up functions are readily available.",

"placeholders":
{
"__ESP_BOARD_INCLUDE__": "bsp/esp-bsp.h",
"__ESP_BOARD_I2C_INIT__": "/* Initialize I2C (for touch and audio) */\n bsp_i2c_init();"
}
}
5 changes: 5 additions & 0 deletions SquareLine/boards/m5stack_core_s3/partitions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 8M,
11 changes: 11 additions & 0 deletions SquareLine/boards/m5stack_core_s3/sdkconfig.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file was generated using idf.py save-defconfig. It can be edited manually.
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration
#
CONFIG_IDF_TARGET="esp32s3"
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_MEMCPY_MEMSET_STD=y
CONFIG_LV_USE_PERF_MONITOR=y
14 changes: 14 additions & 0 deletions bsp/m5stack_core_s3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#IDF version is less than IDF5.0
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_LESS "5.0")
set(SRC_VER "m5stack_core_s3_idf4.c")
else()
set(SRC_VER "m5stack_core_s3_idf5.c")
endif()

idf_component_register(
SRCS "m5stack_core_s3.c" ${SRC_VER}
INCLUDE_DIRS "include"
PRIV_INCLUDE_DIRS "priv_include"
REQUIRES driver spiffs
PRIV_REQUIRES fatfs esp_lcd
)
86 changes: 86 additions & 0 deletions bsp/m5stack_core_s3/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
menu "Board Support Package"

config BSP_ERROR_CHECK
bool "Enable error check in BSP"
default y
help
Error check assert the application before returning the error code.

menu "I2C"
config BSP_I2C_NUM
int "I2C peripheral index"
default 1
range 0 1
help
ESP32S3 has two I2C peripherals, pick the one you want to use.

config BSP_I2C_FAST_MODE
bool "Enable I2C fast mode"
default y
help
I2C has two speed modes: normal (100kHz) and fast (400kHz).

config BSP_I2C_CLK_SPEED_HZ
int
default 400000 if BSP_I2C_FAST_MODE
default 100000
endmenu

menu "SPIFFS - Virtual File System"
config BSP_SPIFFS_FORMAT_ON_MOUNT_FAIL
bool "Format SPIFFS if mounting fails"
default n
help
Format SPIFFS if it fails to mount the filesystem.

config BSP_SPIFFS_MOUNT_POINT
string "SPIFFS mount point"
default "/spiffs"
help
Mount point of SPIFFS in the Virtual File System.

config BSP_SPIFFS_PARTITION_LABEL
string "Partition label of SPIFFS"
default "storage"
help
Partition label which stores SPIFFS.

config BSP_SPIFFS_MAX_FILES
int "Max files supported for SPIFFS VFS"
default 5
help
Supported max files for SPIFFS in the Virtual File System.
endmenu

menu "SD card - Virtual File System"
config BSP_SD_FORMAT_ON_MOUNT_FAIL
bool "Format SD card if mounting fails"
default n
help
The SDMMC host will format (FAT) the SD card if it fails to mount the filesystem.

config BSP_SD_MOUNT_POINT
string "SD card mount point"
default "/sdcard"
help
Mount point of the SD card in the Virtual File System

endmenu

menu "Display"
config BSP_DISPLAY_BRIGHTNESS_LEDC_CH
int "LEDC channel index"
default 1
range 0 7
help
LEDC channel is used to generate PWM signal that controls display brightness.
Set LEDC index that should be used.
endmenu

config BSP_I2S_NUM
int "I2S peripheral index"
default 1
range 0 1
help
ESP32S3 has two I2S peripherals, pick the one you want to use.
endmenu
Loading

0 comments on commit 94e09da

Please sign in to comment.