Quick Start
What This Skill Solves
Use this skill when an M5Stack board is connected to Windows but arduino-cli board list still reports the board as Unknown, or when you want Codex to set up, attach, and flash the correct board profile before development starts.
Recommended Prompt
text
Use $m5stack-arduino-cli to set up my M5Core2 on Windows, attach the correct FQBN, and upload a sample sketch from Arduino CLI.Default Workflow
- Confirm that Windows sees the board as a serial device.
- Locate
arduino-cli, including the Arduino IDE bundled binary if it is not onPATH. - Ensure the ESP32 core is configured and installed.
- Identify the current COM port from Windows and
arduino-cli board list. - Treat
Unknownas an auto-identification limit unless transport checks fail too. - Install
M5GFXandM5Unifiedwhen the sketch uses M5 libraries. - Attach the intended FQBN and port to the sketch.
- Compile and upload with the attached configuration.
High-Value Commands
powershell
where.exe arduino-cli
Get-CimInstance Win32_SerialPort | Select-Object DeviceID,Name,Description,PNPDeviceID
Get-PnpDevice -PresentOnly | Where-Object { $_.Class -in @('Ports','USB') } |
Select-Object Class,FriendlyName,Status,InstanceId
arduino-cli board list
arduino-cli core update-index
arduino-cli core install esp32:esp32
arduino-cli lib install M5GFX
arduino-cli lib install M5Unified
arduino-cli board attach -p COM11 -b esp32:esp32:m5stack_core2 .\examples\m5core2\hello
arduino-cli compile .\examples\m5core2\hello
arduino-cli upload -p COM11 .\examples\m5core2\helloBundled Helpers
powershell
.\scripts\setup-m5core2.ps1 -SketchPath .\examples\m5core2\hello -Port COM11
.\scripts\upload-m5core2.ps1 -SketchPath .\examples\m5core2\hello -Port COM11For an SD card check that writes a text file and shows remaining capacity:
powershell
.\scripts\setup-m5core2.ps1 -SketchPath .\examples\m5core2\sd_text_write -Port COM11
.\scripts\upload-m5core2.ps1 -SketchPath .\examples\m5core2\sd_text_write -Port COM11For the animated cat example that replays frames imported from an animated WebP:
powershell
.\scripts\setup-m5core2.ps1 -SketchPath .\examples\m5core2\pixel_pet -Port COM11
.\scripts\upload-m5core2.ps1 -SketchPath .\examples\m5core2\pixel_pet -Port COM11Direct Compile And Upload
powershell
$cli = "C:\Users\<User>\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe"
& $cli board attach -p COM11 -b esp32:esp32:m5stack_core2 .\examples\m5core2\hello
& $cli compile .\examples\m5core2\hello
& $cli upload -p COM11 .\examples\m5core2\helloGood Defaults
- M5Core2 FQBN:
esp32:esp32:m5stack_core2 - Common bridge names:
USB-Enhanced-SERIAL CH9102,Silicon Labs CP210x USB to UART Bridge - Common libraries:
M5Unified,M5GFX - Default example sketch:
examples/m5core2/hello/hello.ino - SD card check sketch:
examples/m5core2/sd_text_write/sd_text_write.ino - Animated cat sketch:
examples/m5core2/pixel_pet/pixel_pet.ino
Next Step
Move to Diagnosis Playbook when you need a more detailed decision tree, or to Development Support when you want sample sketches and repeatable helper scripts.