Issue with Arduino Cloud Device Recognition: ESP32 Dev Module Detected as LilyGo T-Display

I had a previous project where I selected the ESP32 Dev Module as the device in Arduino Cloud, and it was running normally. However, now the project only detects a connection on the USB port if the device selected is set to LilyGo T-Display, which is not the actual model of the board. Additionally, when I try to upload code as LilyGo T-Display, I receive the following error:
esptool: error: argument operation: invalid choice: '{upload.flags}' (choose from 'load_ram', 'dump_mem', 'read_mem', 'write_mem', 'write_flash', 'run', 'image_info', 'make_image', 'elf2image', 'read_mac', 'chip_id', 'flash_id', 'read_flash_status', 'write_flash_status', 'read_flash', 'verify_flash', 'erase_flash', 'erase_region', 'merge_bin', 'get_security_info', 'version')

image
image

1 Like

Hi @lucasyukio.

This is caused by a bug in the 3rd party "esp32" boards platform.

Due to this bug, it is not possible to use Arduino Cloud Editor to upload to any board that has a WCH CH9102 USB to serial bridge chip (as apparently your ESP32 board has).

I recommend using Arduino IDE to develop sketches for this particular board.

Arduino IDE has Arduino Cloud integration, which provides convenient access to the sketches from your Arduino Cloud account.

I'll provide instructions you can follow to set up Arduino IDE and upload your sketch:

  1. Install Arduino IDE by following the instructions here.
  2. Start Arduino IDE.
  3. Install the "esp32" boards platform by following the instructions here.
  4. Connect Arduino IDE to your Arduino Cloud account by following the instructions here
  5. You should now see the list of sketches from your Arduino Cloud account in the "SKETCHBOOK" panel of the IDE window. Click on the sketch you would like to upload to your board.
  6. Click the cloud with downward pointing arrow icon ("Pull Sketch") that appears to the right of the sketch name.
    A "Synchronizing sketchbook, pulling ..." process will start.
  7. Wait for the synchronization process to finish, as indicated by the appearance of a notification at the bottom right corner of the IDE window:

    Done pulling ...

  8. Double click on the sketch name in the "SKETCHBOOK" panel.
    The sketch will open in a new Arduino IDE window.
  9. Select the appropriate board from the IDE's Tools > Board > esp32 menu.
  10. Select the appropriate port from the IDE's Tools > Port menu.
  11. Select Sketch > Upload from the Arduino IDE menus.

The sketch should now upload successfully to the board.


Note that you can use Arduino IDE for development of Arduino Cloud Thing sketches. It is convenient to use the Arduino Cloud web interface for the initial setup of the Thing, but after that you can open the sketch in Arduino IDE for editing and uploading to your board. You will see newly created Thing sketches under the "Cloud Sketchbook" tab of the IDE's "SKETCHBOOK" panel after you click the "Sync" icon at the bottom right corner of the panel.


Please let me know if you have any questions or problems while following those instructions.


I have submitted a fix for the bug (as well as similar bugs that break Arduino Cloud for other boards):

The proposed fix has already been approved by the "esp32" boards platform developer, so it should be in the next release of the platform. However, it might take some time before the Arduino Cloud developers will be able to update the version of the platform that is installed on the Arduino Cloud servers. So I'm not sure when you might be able to start using this board with Cloud Editor again.

You can definitely use Cloud Editor with other boards. There is a list of supported official boards here:

https://support.arduino.cc/hc/en-us/articles/360014779899-Boards-compatible-with-the-Cloud-Editor#cloud-editor-on-windows%2C-macos%2C-and-linux

Many 3rd party boards are also supported. If you are thinking of buying another board and want to know whether it will be usable with Cloud Editor, you can add a reply here on the forum topic with a link to the board and we'll take a look.


This is caused by yet another bug in the "esp32" boards platform:

That bug has already been fixed, but it was fixed after the time of the release of the version of the "esp32" platform that is installed on the Arduino Cloud servers (2.0.17), so Arduino Cloud users will continue to suffer from that bug until the Arduino Cloud developers are able to update the version of the "esp32" platform that is installed on the servers. The update is potentially disruptive for users because there have been some significant breaking changes in the latest version of the "esp32" boards platform.

Hi,
I am still having this issue with the latest cloud version.
Is this still a problem on that version?
Thanks

Hi @fedekrum. It is not the version of Arduino Cloud, but rather the version of the "esp32" boards platform installed on the Arduino Cloud servers. These are two different things, and are versioned independently.

The version of the "esp32" boards platform has not been updated since the time I wrote the explanation above, so the situation is the same.

1 Like

Thanks @ptillisch !

As you suggested, I installed the App instead of using the cloud.

I have the following HW

.

It is being recognized as this

I saw your PR #10271

Those modifications seem to be done on esp32 3.0.5
Here is 3.0.5 boards.txt file for you to check
boards.txt.zip (180.2 KB)

Is there any workaround for me?
Thanks again

Same issue with Arduino-cli v 1.0.4.

arduino-cli board list
Port                            Protocol Type              Board Name       FQBN                         Core
/dev/cu.usbserial-586A004xxxx   serial   Serial Port (USB) LilyGo T-Display esp32:esp32:lilygo_t_display esp32:esp32

Previously this would list the board FQBN as esp32:esp32:pico32

This screenshot shows you are still using Arduino Cloud.

My suggestion was that you use Arduino IDE. You can download Arduino IDE from the links on the "Software" page here:

As @fedekrum mentioned above, the bug in the "esp32" boards platform that causes the inappropriate identification was fixed in version 3.0.5 of the platform. So, when using Arduino CLI, you should be able to fix this by updating your installation of the "esp32" boards platform.

I have the version 2.0.15 of the esp32 board library installed in the Arduino IDE. Could there be another version installed somewhere? How can I check?

Unlike Arduino Cloud, when using Arduino CLI the misidentification of the port doesn't cause any problems because Arduino CLI treats you like an adult and allows you to set whatever FQBN you want. So just ignore the misidentification and make sure to use the appropriate FQBN for your board and you will be fine.

1 Like

A post was split to a new topic: Compilation of Arduino Cloud IoT sketches takes more than an hour

A post was split to a new topic: Code works when using Cloud Editor, but not with Arduino IDE

Hi, this post is from August 2024, its almost April 2025 and the {upload.flags} is still an issue for many boards. I just payed for the Arduino Cloud Subscription, is this the kind of "agility" I should expect from the Cloud team? I have two boards with this error, Lilygo and doit.

Hi @mumugs. I apologize for the continued lack of support in Arduino Cloud for these specific models of 3rd party ESP32 board.

The situation is a bit challenging because, in addition to the fix for the bug in the definitions for these boards, the developers of the 3rd party "esp32" boards platform that adds support to Arduino Cloud for these boards also made some significant breaking changes. So updating Arduino Cloud to using the version of the platform with the bugs fixed will also cause some previously working sketches and libraries that were previously working to no longer work.

Fortunately the Arduino community has been making good progress on updating the vast ecosystem of code to be compatible with version 3.x of the "esp32" platform, so I think that the update will be much less traumatic for the Arduino Cloud users than it would have been if the Arduino Cloud developers had updated the platform soon after the breaking changes were released.


Note that the primary bug reported here (misidentification of boards that use the WCH CH9102 USB to serial bridge chip) has already been resolved. It is only the secondary bug (uploads fail with an "invalid choice: '{upload.flags}'" error) that remains.

That "invalid choice: '{upload.flags}'" error is caused by bugs in specific incompetently written boards definitions (the "esp32" platform developers just take the board definitions as submitted by the board manufacturer without any validation other than verifying it doesn't break the platform as a whole, so there is a lot of variation in the quality of the definitions). This means it is possible to work around the bug by selecting a different board model that has a definition which is not bugged. The "ESP32 Dev Module" board definition will be a good choice for such a workaround. This board definition is designed to provide general purpose support for any board that uses the ESP32 microcontroller.

Likewise, my alternative suggestion of using Arduino IDE as a workaround remains valid.

Another possible workaround would be to buy a different board. The bugs in the "esp32" platform are specific to certain boards, and there are plenty of other boards that work perfectly with Arduino Cloud. Obviously, you can expect the highest level of support for the official Arduino boards. If you like the ESP32 microcontrollers, you might be interested in the Nano ESP32. But there are also plenty of cheap 3rd party Chinese boards that can be used with Arduino Cloud if you prefer to continue on that route.

I am using both Arduino IDE and cloud, but the code synchronization is not good since its not under any source control, so you can easily lose code if you make mistakes, like adding cloud variables which updates your code and can make you lose code. There is a very simple solution, to allow developers to chose which version of to use, or to be able to change or configure the parameters that are send to the esptool, since its being run locally...

I wouldn't call it "simple", and certainly not "very simple", but yes this would be the ideal solution.

You can do that if you like. Just run it from the command line. You can copy the generated command that is shown in the Arduino Cloud Editor console when you attempt an upload using Arduino Cloud, then adjust the command as you like before running it yourself directly.