pdf-icon

M5PaperS3 Program Compilation and Burning

1. Preparation

2. Add ESP32 Board Manager URL

  • 1.Open Arduino IDE.
  • 2.Select File > Preferences
  • 3.In the Preferences window, find the "Additional Boards Manager URLs" input box and add the following URL:
https://espressif.github.io/arduino-esp32/package_esp32_index.json
  • 4.In the Boards Manager, search for ESP32 and install the board manager.
Version Requirement
The board management version must be below v3.0.7, otherwise, it will fail to compile properly.
Board selection considerations
1. Select the board ESP32S3 Dev Module
2. Enable PSRAM, and select the mode as OPI PSRAM
3. Enable other configurations as needed, according to the following image.

3. Install Dependencies

  • 3.Install dependencies: Refer to the Library Manager Installation Guide to install the M5Unified, M5GFX, and Epdiy driver libraries. (Install the dependent M5GFX library as prompted). Note: M5Unified and M5GFX versions must be greater than 0.2.2.
Epdiy library installation
Since the version of epdiy in the Arduino library manager is outdated, you need to manually download it from Epdiy - GitHub and place it in the Arduino library folder.
Library path
Windows: C:\Users\{username}\Documents\Arduino
macOS: /Users/{username}/Documents/Arduino
Linux: /home/{username}/Arduino

4.Download Mode

Connect the device to the computer via USB. Press and hold the power button on the M5PaperS3. When the status light on the back blinks red, it indicates that the device has entered download mode.

5.Select Port

Wait for the device to be recognized and select the corresponding port in Arduino IDE.

6.Program Compilation & Burning

Open the example program "BarGraph" from the M5GFX library, and add #include <epdiy.h> at the beginning of the program. Click the upload button to compile and burn the program automatically.

For drivers of peripherals such as the buzzer, IMU, and RTC, you can refer to the example programs in the M5Unified library.

FAQ
In M5GFX, the inclusion of dependent libraries is checked using __has_include(<epdiy.h>). When compiling in Arduino IDE without including <epdiy.h>, the device may fail to function properly. In such cases, please navigate to the path C:\Users\PC\AppData\Local\arduino\sketches, delete the cache corresponding to the current program, include <epdiy.h>, and recompile.

7.Related Resources

On This Page