Skip to content

Commit 6815afc

Browse files
committed
update userdemo version v1.0
1 parent 522614b commit 6815afc

2,556 files changed

Lines changed: 1034379 additions & 55 deletions

File tree

Some content is hidden

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

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
components/otool_esp_component/** -text
2+
components/M5IOE1/** -text
3+
components/M5PM1/** -text
4+
components/m5_py32bin_tools/** -text

.github/workflows/Arduino-Lint-Check.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@
3636

3737
# Build files
3838
build/
39+
build-*/
3940
cmake-build-*/
4041
managed_components/
42+
/sdkconfig
43+
/sdkconfig.idf*
4144

4245
# PlatformIO
4346
.pio/

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "components/M5PM1"]
2+
path = components/M5PM1
3+
url = https://github.com/m5stack/M5PM1.git
4+
[submodule "components/M5IOE1"]
5+
path = components/M5IOE1
6+
url = https://github.com/m5stack/M5IOE1.git

CMakeLists.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
if(POLICY CMP0079)
4+
cmake_policy(SET CMP0079 NEW)
5+
endif()
6+
7+
# The vendored Wi-Fi Remote component uses this value to select its Kconfig.
8+
set(ENV{ESP_IDF_VERSION} "6.1")
9+
10+
# This project embeds every enabled audio asset in the factory application
11+
# image. Force the list empty so an existing build cache cannot retain an older
12+
# file-backed audio configuration.
13+
set(OTOOL_AUDIO_EXTERNAL_FILES ""
14+
CACHE INTERNAL "No project-managed external audio files" FORCE)
15+
16+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
17+
project(m5corep4x_user_demo)
18+
19+
if(NOT IDF_VERSION_MAJOR EQUAL 6 OR NOT IDF_VERSION_MINOR EQUAL 1)
20+
message(FATAL_ERROR
21+
"M5CoreP4X UserDemo requires ESP-IDF 6.1; found ${IDF_VERSION} at $ENV{IDF_PATH}")
22+
endif()
23+
24+
# Required dependency fixes for the vendored components under ESP-IDF 6.1.
25+
idf_component_get_property(esp_dsp_lib espressif__esp-dsp COMPONENT_LIB)
26+
if(TARGET ${esp_dsp_lib})
27+
target_compile_options(${esp_dsp_lib} PRIVATE
28+
"$<$<COMPILE_LANGUAGE:CXX>:-include>"
29+
"$<$<COMPILE_LANGUAGE:CXX>:cmath>")
30+
endif()
31+
32+
idf_component_get_property(i2c_bus_lib espressif__i2c_bus COMPONENT_LIB)
33+
if(TARGET ${i2c_bus_lib} AND TARGET idf::esp_driver_gpio)
34+
target_link_libraries(${i2c_bus_lib} PRIVATE idf::esp_driver_gpio)
35+
endif()
36+
37+
idf_component_get_property(esp_hosted_mcu_lib esp-hosted-mcu COMPONENT_LIB)
38+
if(TARGET ${esp_hosted_mcu_lib} AND TARGET idf::esp_driver_sdmmc AND TARGET idf::esp_driver_dma AND TARGET idf::esp_driver_gpio)
39+
target_link_libraries(${esp_hosted_mcu_lib} PRIVATE
40+
idf::esp_driver_sdmmc
41+
idf::esp_driver_dma
42+
idf::esp_driver_gpio)
43+
endif()

README.md

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,58 @@
1-
# Product Name
1+
# M5CoreP4X UserDemo
22

3-
## Overview
3+
M5CoreP4X UserDemo is the preinstalled ESP-IDF demonstration firmware for the M5Stack M5CoreP4X. It presents the complete device UI and demonstrates board-level capabilities including power control, display, touch, audio, RTC, IMU, microSD, Ethernet, ESP-Hosted Wi-Fi, USB Host, infrared, and Grove I2C.
44

5-
### SKU:xxx
5+
## Hardware and Environment
66

7-
Description of the product
7+
- M5Stack M5CoreP4X with ESP32-P4, 16 MiB flash, and PSRAM
8+
- M5Stack A172 Stamp-AddOn C6 For P4 module with compatible ESP-Hosted slave firmware (required for Wi-Fi)
9+
- ESP-IDF v6.1
10+
- Optional microSD card, Ethernet connection, USB devices, and Grove I2C peripherals
811

9-
## Related Link
12+
## Demonstrated Features
1013

11-
- [Document & Datasheet](https://docs.m5stack.com/en/unit/product_Link)
14+
After startup, the device opens the LVGL Startup screen. Users can swipe between the main status, Info, and Function screens. The Function screen provides interactive pages for power control, touch, microSD, I2C scanning, IMU, recording, network ping, Wi-Fi, USB, infrared transmit and receive, music, sleep, and power-off operations.
1215

13-
## Required Libraries:
16+
The startup path initializes board power, RTC, audio, Ethernet, LCD, and touch. Ethernet connection waiting, the startup sound, and time-consuming page operations run in background tasks. The absence of an optional peripheral does not prevent the remaining demonstration pages from starting.
1417

15-
- [Adafruit_BMP280_Library](https://github.com/adafruit/Required_Libraries_Link)
18+
## Build
1619

17-
## License
18-
19-
- [Product Name- MIT](LICENSE)
20-
21-
## Remaining steps(Editorial Staff Look,After following the steps, remember to delete all the content below)
20+
```bash
21+
source esp-idf/export.sh
22+
idf.py -B build set-target esp32p4
23+
idf.py -B build build
24+
```
2225

23-
1. Change [clang format check path](./.github/workflows/clang-format-check.yml#L42-L47).
24-
2. Add License content to [LICENSE](/LICENSE).
25-
3. Change link on line 78 of [bug-report.yml](./.github/ISSUE_TEMPLATE/bug-report.yml#L79).
26+
The application image is generated at:
2627

27-
```cpp
28-
Example
29-
# M5Unit-ENV
28+
```text
29+
build/m5corep4x_user_demo.bin
30+
```
3031

31-
## Overview
32+
## Flash and Monitor
3233

33-
### SKU:U001 & U001-B & U001-C
34+
Connect the download/debug USB port and replace the serial port with the one assigned by the host:
3435

35-
Contains M5Stack-**UNIT ENV** series related case programs.ENV is an environmental sensor with integrated SHT30 and QMP6988 internally to detect temperature, humidity, and atmospheric pressure data.
36+
```bash
37+
idf.py -B build -p /dev/ttyACM0 flash monitor
38+
```
3639

37-
## Related Link
40+
## Repository Layout
3841

39-
- [Document & Datasheet](https://docs.m5stack.com/en/unit/envIII)
42+
- `main/`: application entry point, startup initialization, and firmware metadata
43+
- `components/m5_corep4_component/`: M5CoreP4X board support, LVGL UI, and function pages
44+
- `components/otool_esp_component/`: shared peripheral and audio utilities
45+
- `sdkconfig.defaults`: ESP32-P4, flash, PSRAM, network, and component configuration baseline
46+
- `partitions.csv`: application, NVS, PHY, and SPIFFS partition definitions
47+
- `THIRD_PARTY_SOURCES.md`: sources and pinned versions for bundled third-party code
48+
- `USER_DEMO_CODE_REVIEW_CN.md`: Chinese engineering review produced using the User Demo review standard
4049

41-
## Required Libraries:
50+
## Known Boundaries
4251

43-
- [Adafruit_BMP280_Library](https://github.com/adafruit/Adafruit_BMP280_Library)
52+
- A successful build does not replace hardware validation. Touch, audio, wireless, networking, and repeated page-entry stability must still be tested on an M5CoreP4X before release.
53+
- Wi-Fi requires the A172 Stamp-AddOn C6 For P4 module. It uses ESP-Hosted communication between the module's ESP32-C6 and the ESP32-P4; when Wi-Fi fails, first verify that the module is installed, then check its slave firmware, power rails, and SDIO connection.
54+
- The microSD card uses SPI mode to avoid contention with the SDMMC resources used by ESP-Hosted.
4455

4556
## License
4657

47-
- [M5Unit-ENV - MIT](LICENSE)
48-
```
58+
See [LICENSE](LICENSE) for the project license. Bundled third-party components remain subject to their respective licenses; see [THIRD_PARTY_SOURCES.md](THIRD_PARTY_SOURCES.md) for source details.

THIRD_PARTY_SOURCES.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Vendored third-party sources
2+
3+
The following Git-hosted dependencies are stored in this repository as
4+
ordinary source files. A checkout does not need to initialize Git submodules
5+
for these paths.
6+
7+
| Path | Upstream | Commit | License |
8+
| --- | --- | --- | --- |
9+
| `components/otool_esp_component` | <https://github.com/onexs-xsi/otool_esp_component.git> | `82406f282adfe54e7bee5f46f9b54ba935e953b4` | MIT |
10+
| `components/M5IOE1` | <https://github.com/m5stack/M5IOE1.git> | `846eec7d05e25c09013be2acdb8804487f48a62e` | MIT |
11+
| `components/M5PM1` | <https://github.com/m5stack/M5PM1.git> | `be9a5456c007c333e7ac963f33bfde1ffa5d82ee` | MIT |
12+
| `components/otool_esp_component/otool_bmi270/BMI270_SensorAPI` | <https://github.com/boschsensortec/BMI270_SensorAPI.git> | `41129fcfe39c583ee5462d79195741945d51c1fe` | BSD-3-Clause |
13+
| `components/otool_esp_component/otool_bmi270/BMM150_SensorAPI` | <https://github.com/boschsensortec/BMM150_SensorAPI.git> | `0dce0617873cda1f6d51f6b7b961fdc2641e0c7c` | BSD-3-Clause |
14+
| `components/m5_py32bin_tools` | <https://gitlab.m5stack.com/moyongming/m5_py32bin_tools> | `779b99e7e094d5f254f040291a2498b0e369014e` | MIT (declared in `idf_component.yml`) |
15+
16+
The snapshots were exported from the commits above with
17+
`git -c core.autocrlf=false archive` on 2026-07-28. Their upstream license
18+
files are retained in each source tree. The `m5_py32bin_tools` commit does
19+
not contain a standalone license file; its component manifest declares MIT.
20+
The vendored paths are marked `-text` in the root `.gitattributes` so Git
21+
preserves the upstream byte content, including mixed LF and CRLF line
22+
endings.
23+
24+
The upstream-tracked `gui/build` and `gui/dist` directories in
25+
`m5_py32bin_tools` are generated PyInstaller artifacts (about 190 MB) and
26+
are intentionally excluded. The GUI source, build script, specification,
27+
firmware data, examples, and component source are retained.
28+
29+
To update a snapshot, export the new fixed commit into a clean temporary
30+
directory, overlay any nested vendored trees, replace only the corresponding
31+
tracked source directory, update this table, and run the offline dependency
32+
contract plus a full firmware build. Do not copy ignored files, generated
33+
build artifacts, or a submodule's `.git` metadata into the repository.
34+
35+
No active Git submodules remain. Upstream links in component manifests and
36+
documentation are informational metadata, not fetch configuration. ESP-IDF
37+
Component Manager dependencies remain unchanged.

components/M5IOE1

Submodule M5IOE1 added at 846eec7

components/M5PM1

Submodule M5PM1 added at be9a545

components/json/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
idf_component_register(SRCS "cJSON/cJSON.c"
2+
"cJSON/cJSON_Utils.c"
3+
INCLUDE_DIRS cJSON)

0 commit comments

Comments
 (0)