-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with mcrun Command Freezing on M5Stack Core2 #1359
Comments
Thank you for the report. In your "steps" to reproduce, the command line for the host is incorrect. It is only building (
I don't have an M5Stack Core2. It is powered by an ESP32, the same as Moddable Two. I did a test of a host and mod on Moddable Two and it was successful. |
@phoddie I forget I did run deploy after build
so I try your code
after build it and I run
but it still freeze at Installing mod. |
Hi @lamfan , Sharing capture of your terminal when you run mcrun will help us to understand the situation. |
The screen image shows one If the flash write fails (it uses Maybe the partition map is corrupt? Unlikely, but.... just in case:
|
Hi @phoddie ,
xs-dev-export.sh is this setup ok? I manually deleted the esp-idf folder and cloned the updated 5.2.2 esp-idf repository. I had reinstall everything and run the mcrun again |
You need to build and install the Stack-chan host using |
Yes I did run
But it still freeze at Installing mod. |
I see. And did you try erasing flash on the M5Stack Core2 as suggested above? |
To add some context, we were discussing this issue on Discord, but this issue does not reproduce in my environment. Original souce code is here. |
@lamfan It might not be related, but which one do you have? I don't have the new one. |
By removing lines from the mod source code, you are making the mod's binary archive size smaller. With the full source code referenced by @stc1988, the mod is only about 1020 bytes. Removing lines, makes it smaller. But 1020 bytes is tiny already. It fits within a a single flash sector (a sector is 4 KB). I don't think the JavaScript matters. Installing a mod is basically a file copy. The contents of the mod do not run and are not even parsed until the install is successful and the ESP32 reboots. |
I'm using v1.1 |
@meganetaaan Have you ever seen mod of stackchan works before in M5stack core2 v1.1? @lamfan In Discord discussion, I think the installation failed even with a shorter source code before. Are the conditions the same now as they were then? |
This looks like it could be a communication failure. The baud rate is relatively high on this device (1500000). We have seen situations where a damaged USB cable can cause data transfer failures. This would cause mod installation to fail. It might not always cause failures flashing the ESP32 firmware, because that protocol has some retry and checksum logic builti-in. |
Hi @stc1988 @phoddie
|
|
Indeed, the success or failure changes depending on the number of lines. It seems to fail when the size of the XS archive file exceeds around 2.6 KB. |
@stc1988 Thanks for your suggestion. Given the ongoing issue, I’ve decided to purchase a new M5Stack CoreS3 to continue my development on Stack Chan. |
@lamfan
|
@stc1988 |
@lamfan – does reducing the baud rate solve the problem you are having? My recollection is that this device required 1500000 baud to work. It did not support 921600. Maybe my memory is wrong. Or... perhaps the serial bridge chip changed? Sometimes M5 changes components in their products. We should try to understand that. If 921600 works for all M5Stack Core2 hardware, we should make that change to the Moddable SDK. |
It was working fine before, but the mod isn't working this time. Could some changes have affected it? |
It is possible some change had an impact here. But, the relevant code hasn't changed significantly in some time. It is difficult to guess where the problem might be:
Using the archive of Moddable SDK release it could be possible to go back to find where the behavior changed. That's a little tedious, unfortunately. |
@lamfan Did you modify files? Or set environment variables? |
@lamfan
|
Hi @stc1988 , what should I need to modify the files? manifest.json
mod.js
|
The file to be modified is not for Stackchan, but for Moddable SDK. The installation directory for Moddable is $MODDABLE. |
Hi @stc1988 , after I modify the manifest_mod.json and manifest.json, here is the screen the Installing mod. disappear and freeze at Python requirements are satisfied. examples/manifest_mod.json
build/devices/esp32/targets/m5stack_core2/manifest.json
|
Did you re-run mcconfig? |
@lamfan – Is the M5Stack Core2 connected to your Mac directly or is it connected through a USB Hub? If you are using a hub, please retry with a direct connection. Thank you. |
@stc1988 @phoddie @stc1988 why your m5stack_core2 v1.1 can work on 921600? @phoddie when I run
|
@lamfan Does error in your mac simulator look like a different issue, right? |
Glad to hear you have it working. Some ESP32 development boards require a slower debugger speed (460800). But, those are usually older boards. It is unexpected that would happen with an update to the M5Stack Core2 hardware. Regarding serial, @stc1988 is correct: It is a separate topic, and so should go into a separate report. |
|
@phoddie when I run
|
I am encountering an issue while trying to run mcrun to install a mod on the M5Stack Core2. The mcconfig command works fine, but mcrun freezes during the installation process.
Steps to Reproduce
Successfully run the following command:
mcconfig -d -m -p esp32/m5stack_core -t build ./stackchan/manifest_local.json
Attempt to run the following command:
mcrun -d -m -p esp32/m5stack_core2 ./mods/look_around/manifest.json
Environment
ESP-IDF version: esp-idf-v5.2.2
Operating System: macOS
The text was updated successfully, but these errors were encountered: