Architecture Design
The repository is vertically partitioned around the ESP32-S3 product line and contains two top-level directories, esp32s3/firmware/ and esp32s3/docs/:
esp32s3/firmware/independently maintains the firmware source code based on ESP-IDF v5.x + MicroPython v1.24.1 + CMake; the top-levelCMakeLists.txtselectsboards/<board>/mpconfigboard.cmakevia theMICROPY_BOARDvariable and merges multiplesdkconfig.*fragments to generate the final configuration; the firmware is split into layers such as builtins (C-layer built-in modules), modules (Python-layer runtime modules), components (IDF components such asesp_lcd_jd9853andgen_bmgr_codes), drivers (such asmpu6050IMU fusion), and file_system (LVGL UI and business scripts organized by board); adding a new board only requires copying the board directory and modifyingmpconfigboard.h,mpconfigboard.cmake,partitions-*.csv, andmanifest.py.esp32s3/docs/adopts the Sphinx RST documentation system; the top-levelindex.rstorganizes1_hardware(hardware specifications),2_software(environment setup),3_examples(examples categorized by basics/advance/classic/Agent/AudioAI),4_xiaozhi(Xiaozhi AI Assistant topic),5_api(four-level API reference: library/mPython/micropython/pythonStd/mpy_ref),6_C_program(Arduino/PlatformIO/ESP-IDF development guide), and7_faqthrough the toctree;boards/ledong_v2/contains a mirror documentation tree for the mPython Core 2.0 board, each with its ownconf.py/Makefilefor separate builds.Adds ESP32-S3-specific components such as LVGL GUI, AI cloud, GPS, heart rate, BLE CodexPad, and iFlytek IAT speech dictation, and integrates the Xiaozhi AI Assistant (
docs/4_xiaozhi/).Board differences are uniformly declared via
mpconfigboard.h,mpconfigboard.cmake,sdkconfig.board, andmanifest.pyunderesp32s3/firmware/boards/<board>/, avoiding modification of the core firmware code; cross-board compatibility relies on “a single set of mPython API conventions” and the “board manifest mechanism”.