Open stc1988 opened 1 month ago
This might not be a bug.
You are using a debug build. On Moddable Two, that means that pins 1 and 3 are reserved for xsbug communication. Those pins are the default for a new serial connection, so the echo example is trying to use them. The Moddable SDK was updated some time ago to reserve the pins used by xsbug so that a project cannot interfere with the xsbug communication.
Please try using an instrumented build (-i
instead of -d
) or set the transmit
and receive
serial constructor options to unused pins.
This issue has been idle for a bit. Is there an update?
I’m sorry for the delayed report. The situation is stuck, and using the instrumented build or setting transmit
and receive
did not resolve it.
To add a bit of context, this issue stems from the recent problem of the stack-chan’s serial servo motor not working.
I looked into this a bit more. I used Moddable Two, since that was listed in your report.
For a debug build, using the default pins throws an exception as expected. Changing them (I used 16 for transmit and 17 for receive) does not throw an exception (as expected).
For an instrumented build, no exception is thrown with the default pins. But... it does seem to hang - at least the serial port is not responding. Changing the port
from 2 to 1 allows it to work with the default pins. I don't know why. Changing the transmit and receive as above, does work with port 2.
After some further experimentation, it seems that in IDF v5 port 2 is incompatible with the default pins (transmit 1 and receive 3).
Instrumented build + using port 1 is works as expected. Debug build also does not throw an exception but it seems that serial communication does not works.
Build environment: macOS Moddable SDK version: 3bf5202 Target device: M5Stack, M5Stack_core2, Moddable_two
Steps to Reproduce
examples/io/serial/echo
using this build command:mcconfig -d -m -p esp32/m5stack
Logs & Console
Device keeps restarting.
Other information
It works in Moddable V4.1 and ESP-IDF v.4.2.3, so it seem to be affected by updating to ESP-IDF v5