Moddable-OpenSource / moddable

Tools for developers to create truly open IoT products using standard JavaScript on low cost microcontrollers.
http://www.moddable.com
1.35k stars 238 forks source link

error on esp-idf export.sh (Raspbery Pi OS 32bit) #1204

Open mshioji opened 1 year ago

mshioji commented 1 year ago

Hello, I recently trying to setup Moddable SDK into new Raspberry Pi for educational purpose. however, it seems installing esp-idf something goes wrong.

Installing Moddable SDK, it's OK. hello world works fine. But after installing esp-idf for ESP32, when I hit “source $IDF_PATH/export.sh” I got following Warnings and Errors:

source $IDF_PATH/export.sh
Detecting the Python interpreter
Checking "python" ...
Python 3.9.2
"python" has been detected
Adding ESP-IDF tools to PATH...
WARNING: directory for tool xtensa-esp32-elf version esp-2021r2-patch5-8.4.0 is present, but tool was not found
ERROR: tool xtensa-esp32-elf has no installed versions. Please run '/home/oclpi/.local/share/esp32/esp-idf/install.sh' to install it.
WARNING: directory for tool xtensa-esp32s2-elf version esp-2021r2-patch5-8.4.0 is present, but tool was not found
ERROR: tool xtensa-esp32s2-elf has no installed versions. Please run '/home/oclpi/.local/share/esp32/esp-idf/install.sh' to install it.
WARNING: directory for tool xtensa-esp32s3-elf version esp-2021r2-patch5-8.4.0 is present, but tool was not found
ERROR: tool xtensa-esp32s3-elf has no installed versions. Please run '/home/oclpi/.local/share/esp32/esp-idf/install.sh' to install it.
WARNING: directory for tool riscv32-esp-elf version esp-2021r2-patch5-8.4.0 is present, but tool was not found
ERROR: tool riscv32-esp-elf has no installed versions. Please run '/home/oclpi/.local/share/esp32/esp-idf/install.sh' to install it.
WARNING: directory for tool esp32ulp-elf version 2.35_20220830 is present, but tool was not found
ERROR: tool esp32ulp-elf has no installed versions. Please run '/home/oclpi/.local/share/esp32/esp-idf/install.sh' to install it.
WARNING: directory for tool openocd-esp32 version v0.11.0-esp32-20220706 is present, but tool was not found
ERROR: tool openocd-esp32 has no installed versions. Please run '/home/oclpi/.local/share/esp32/esp-idf/install.sh' to install it.

I've done many Moddable SDK installations and ESP32 device setups in the past, but this is the first time I've had this symptom. Installation on Raspberry Pi was also not a problem before, so I wonder why... Could anyone reproduce the same symptoms?

I also tried with xs-dev.

I tried above twice, (2 manually, x2 xs-dev ) but four trials all failed. ><

Thank you,

phoddie commented 1 year ago

Thank you for the detailed report. I haven't heard of this issue before your report. We'll try to reproduce it here.

mkellner commented 1 year ago

Hello @mshioji,

I was able to reproduce your error if I skip step 8 of the linux install instructions: https://www.moddable.com/documentation/devices/esp32#lin-instructions

8: Run the ESP-IDF install script. This will install the proper cross-compilation toolchain and utilities needed for the ESP-IDF build.

cd $IDF_PATH
./install.sh

Please do this step, then follow with source $IDF_PATH/export.sh.

mshioji commented 1 year ago

Hello @mkellner and @phoddie,

Thank you for your quick reply. Yes, actually I also thought that the step 8 solve the problem but the situation are the same. The error message also recommended to run install.sh so I tried several times but the situation are the same. This error is happened even if the install was made by xs-dev's automated process, I think it doesn't skip step 8. I wonder what's going on.

I'd further try to separate an issue, then found something like this:

Now I found 64bit OS would be OK, therefore now it is no problem for my educational project. however, 32bit version of Raspberry Pi OS is still recommended as a default on Raspberry Pi imager so I little concern if the other people try to install it on 32bit OS and failed.

Thank you very much,

phoddie commented 1 year ago

@mshioji – That's good progress. Great that you now have it working.

It looks like there are two options: switch to using the 64-bit installation or fix the issue on the 32-bit installation. That's for @mkellner to decide.

mshioji commented 1 year ago

Hello @phoddie and @mkellner, Thank you for the comment. Yes, I will go with 64bit on my recent project so it's no problem. now it's not an urgent but if you guys would consider continuing investigation, I also continue for this.

Thank you very much,