M5CoreS3 icon indicating copy to clipboard operation
M5CoreS3 copied to clipboard

Compilation error: 'USBSerial' was not declared in this scope

Open ropg opened this issue 2 years ago • 3 comments

I use the Arduino IDE (v.2.2.1) and have M5Stack board manager 2.0.8 and M5CoreS3 library v0.0.4

When I try to compile HelloWorld.ino from the examples directory, I get: Compilation error: 'USBSerial' was not declared in this scope

image

When I comment out the SerialUSB statement in the example, the compiler now complains about USBSerial in the I2C_IMU library.

image

 

None of examples seem to compile, so I must be doing something wrong.

ropg avatar Nov 03 '23 16:11 ropg

@ropg I also encountered the same problem, but I was able to resolve it by uninstalling V0.0.4 and installing the latest revision.

The following revision appears to have fixed the problem. https://github.com/m5stack/M5CoreS3/commit/a9187b74aa3d6c90cc2cfc8f7e6d466ae3dd6cd7

Below is the procedure I have tried. I hope this will be helpful.

1. Uninstall V0.0.4

Remove V0.04 in Library Manager.

image

2. Download zip

Download the latest revision from this repository.

image

3. Install the zip to Arduino IDE

Select menu. Sketch -> Include Library -> Add .ZIP Library

image

Select the ZIP file you downloaded in Step 2.

image

4. Build

image

ylabo0717 avatar Nov 15 '23 13:11 ylabo0717

Thank you! this fixed it for me, too. The one installed via the package manager is broken.

richstokes avatar Nov 19 '23 20:11 richstokes

OK, some stuff now works. Sadly no example how to talk to the touch screen, some examples do not compile and boy these people hate documentation and clarity.

ropg avatar Nov 20 '23 18:11 ropg

OK, some stuff now works. Sadly no example how to talk to the touch screen, some examples do not compile and boy these people hate documentation and clarity.好的,现在一些东西可以运行。可惜没有关于如何与触摸屏交互的示例,有些示例无法编译,这些人讨厌文档和清晰度。

Added it. https://github.com/m5stack/M5CoreS3/blob/9e73b0a61e91e7270850a0ca56c041f58cc108d3/examples/Basic/button/button.ino

TinyuZhao avatar Jun 07 '24 04:06 TinyuZhao