Skip to content

Building for the M5AtomS3

K7MDL edited this page Jan 6, 2025 · 5 revisions

If you want to compile and run his on the M5AtomsS3 these are the steps required

Enable AtomS3 in the code

Uncomment $define ATOMS3 located in the main file. This will activate appropriate M5 library and display code.

{4E0A9EE1-C7FF-4F2E-B9B6-036C485145F2}

becomes this

{AEEBEB7F-CE8B-4CF0-8220-B7B4AEAEA9C1}

Set your com port

Hold the AtomS3 reset button for 3-4 seconds. Watching device manager Serial ports list, you should see your CPU show up. Here it appears as COM14

{E87E6233-ED9F-42B1-AA3E-B14153509ACE}

Select the comm port control in the tool bar

{996CB350-00AB-4AB5-8B37-40C1C04B1021}

You will see USB serial port devices listed. The ESP32 devices will have extra information. Select the COM14 device.

{16DD53E3-529A-44B0-AB6A-F3673ABEC009}

Success

{6A51EF00-81A7-4EC4-A460-DF5DC34610B6}

UART Flash Method

Select UART flash method icon in the tool bar

{13D993C4-33EE-4BEC-9F1F-4CD7CE406CEF}

3 options will appear, choose UART

{B3767933-2E92-4DD4-B3A1-2D85B43346EF}

Success

{D24EDB31-EA1E-4F47-A214-6D2117791BA8}

Set your CPU model to ESP32S3

Select the esp32s3 target in the tool bar.

{13FA16A9-A1BF-48C1-BC57-483516A23A2B}

Select esp32s3 from the list

{C6D89330-0FF4-40FB-8C27-A31C1A7B0D66}

You will get a list of 3 model options: Pick the first, (via built-in debug via JTAG ...)

{D6B6ACD2-AA14-4569-9CB0-5F20152A359A}

The IDE should run some update notifications successfully. It is not unusual for setting the target to fail though.

{D3703C40-8CA3-42C3-9C86-7D09C30BFD45}

or this one

{C38E5207-FD2F-44F3-8876-D2587ED11FC4}

Here is a sample error. The notification is generic. Examine the Terminal text for details. Here the problem is the CMake does not like a directory I added "include" in the CMakeLists.txt file.

{651CA2EB-78DD-485D-9B73-71AD756CF477}

{B711424E-A973-456D-B799-F245AB50AE83}

I removed "include" at the end of line 3

{26ECEB31-56A4-4CCD-AB38-FD0A88DA4B20}

Cntl-E and press D to build and flash. Or click on the wrench icon in the toolbar to just compile.

{06F62A67-21AE-409C-B397-F355F7E182E6}

Hopefully no more errors if you are lucky. I seem to get a lot of them, especially after starting up the Visual Studio editor and opening the project folder.

One of the remedies that can help at times is to re-run Configure Extension. Some time it makes things worse. but usually not.

{1C10BD44-B80D-4CC1-AE46-2C1F2DD3256D}

{8746E3E9-4BA1-4BB7-9DAE-E50F438012AC}

{9E47A590-A53A-4A6A-9536-DA77ED479313}

{018E4013-898B-4D0E-9FD4-83A1F9BAF272}

I always choose the same button hoping to avoid messing things up. Here I choose the middle option with idf-git\2.39.2 because that seems to work and choosing something else breaks things.

{545A4DEC-9181-44E3-8C45-EAB9AB2EB515}

Choose set device target

{AC36F9B9-9101-4CC3-B30D-A8C59C18021E}

Maybe it will work. If not, I then delete the build folder.

{32BDE59C-1565-479D-B5F0-4243AE5E68EC}

Sometimes I exit VS Code and start again. I often see a notification pop up in the lower right corner asking if you want to Generate json. This often fixes things. Setting the esp32s3 usually works and compiles work again.