Windows 10 - Building sample Hello World #770
Replies: 33 comments 12 replies
-
Hi @js4iot, I'm sorry to hear that you're having trouble building. Let's see if we can get it sorted out.
Saola is an ESP32-S2 based development board. The generic Wroom you linked to is based on the ESP32, not the ESP32-S2 (which is a different MCU). I'd suggest trying again with just the
Please give that a shot and let me know how it goes with your dev board. - Andy |
Beta Was this translation helpful? Give feedback.
-
Thanks, I tried just "esp32" and I got a bit further but still got some errors. This is the bottom of the output:
I am running a Windows 10 virtual machine inside a Windows 10 computer because I want to test the install scripts before I make modifications to my original computer. I do have a device in COM3, I can actually communicate to it (from inside the VM) using PuTTY and see the console.log() statements generated by an existing Espruino application I have on that board. |
Beta Was this translation helpful? Give feedback.
-
I tried executing this statement
|
Beta Was this translation helpful? Give feedback.
-
OK, so I tried something else... as soon as I see the
|
Beta Was this translation helpful? Give feedback.
-
OK, so I tried adding this line
At this moment, I do not have any useful information as to what the error could be, so I am giving up. Any help, will be appreciated. |
Beta Was this translation helpful? Give feedback.
-
What about to erase the chip, it sometimes help, if there have been another program on it.
|
Beta Was this translation helpful? Give feedback.
-
I will try this. Question. If I erase the chip, I guess it's like |
Beta Was this translation helpful? Give feedback.
-
Yes after erase, you can use mcconfig again. |
Beta Was this translation helpful? Give feedback.
-
OK, so I did
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately, it's not telling me which parameter is incorrect so I do not have much to chew on :-) |
Beta Was this translation helpful? Give feedback.
-
I have a esp32-pico-kit and it is working and a moddable_two. |
Beta Was this translation helpful? Give feedback.
-
The good news is that it appears that your build is working correctly now and that your app is successfully being flashed to the ESP32. The failure appears to be with the debugging connection—It looks like there's a problem opening that connection to your dev board at the specified baud rate. Try setting one more environment variable:
That will configure the debugger to run at 115200, the same as you're successfully programming the device at. You may have to do a clean build to get this to work correctly. The most thorough clean would be to simply delete the |
Beta Was this translation helpful? Give feedback.
-
@Frida854 I opened xsbug from the command prompt and it opened a GUI application (see screenshot). I do not have a way to start it because the options are grayed out |
Beta Was this translation helpful? Give feedback.
-
I had a good feeling because I was making progress, but now I think that I trashed my ESP32 board. Now it goes into an infinite loop...
|
Beta Was this translation helpful? Give feedback.
-
I'll think we'll be able to get you and your board recovered from this; I think it's just trying to boot a fully erased flash at the moment. The build error you're getting now is one I'm familiar with: you're hitting a Windows path length limit for CCACHE in the ESP-IDF build. You can work around that by creating an output directory with a short path name (I recommend something simple like
This is a real and annoying issue that comes up a lot with ESP-IDF builds even outside the Moddable ecosystem. But I would love to find a more automatic workaround for our developers... |
Beta Was this translation helpful? Give feedback.
-
@andycarle earlier you asked me to erase the flash from ESP32 using this Now that I am redirecting to C:\ESP32.out seems to be doing something similar... it gets this far and then the VM crashes. It stops responding and I have to shut it down ("unplug it") and restart it. |
Beta Was this translation helpful? Give feedback.
-
@js4iot I'd like to include Windows support in I'm guessing this discussion might be why @phoddie reached out about prebuilding Moddable binaries 😄 |
Beta Was this translation helpful? Give feedback.
-
Let me try to get this installed first on Windows manually. So far I have had nothing but problems ;-( |
Beta Was this translation helpful? Give feedback.
-
I think that was @Frida854, but I would have recommended something similar eventually. 😃
Hmm. If Can you try building and deploying with the ESP-IDF directly to verify that is working as expected? The easiest thing to test would be to just do:
Can you give that a try and report back? For reference, here's my complete build output from that in a gist. |
Beta Was this translation helpful? Give feedback.
-
Moving to discussion, as this isn't a report of a specific issue. |
Beta Was this translation helpful? Give feedback.
-
I have done the test you asked for and it's also having the same behavior. So, the good news... it's not Moddable! The bad news, I do not know what could be the problem. I am trying to investigate further |
Beta Was this translation helpful? Give feedback.
-
I figure out the problem... I am making a virtual machine with VirtualBox and I was sharing the "Serial Port". This appears to work fine, but appearances can be deceptive. although I was able to use PuTTY and idf.py commands, it was not disconnecting gracefully. The device should not be shared using a serial port, but actually handed over to the guest Windows VM using a USB. |
Beta Was this translation helpful? Give feedback.
-
Now that I have Moddable working on a virtual machine in Windows 10, I want to see if the instructions can be simplified. There is a really simple installer for the ESP-IDF which allows me to work with their samples.
|
Beta Was this translation helpful? Give feedback.
-
I tried to build Moddable without installing Visual Studio 2019 Community Edition because I am assuming that if ESP-IDF was able to get installed and run maybe it already has all the tools needed. Unfortunately, when I run this:
But it's failing because nmake does not exist. ESP-IDF installed cmake. Not sure how much different they are. Another question that I have had all along... In Unix-like systems (Debian, Ubuntu, Raspberry, etc) it's common practice to build the application from source code. But in Windows, it's more common to get the executables already compiled. I wonder if Moddable executables could be distributed and not be required to be built. |
Beta Was this translation helpful? Give feedback.
-
It seems not possible to download nmake alone, I haven't find out yet. The only way is through Visual Studio. |
Beta Was this translation helpful? Give feedback.
-
I am installing Visual Studio 2022 Community and building from the source, I will then take the binaries created and move them to a new VM for testing. If this works, maybe we should think about creating an installer. This will not work if there are registry settings or other types of configurations outside of the files that get created. We'll see, I'll update this conversation as my research progresses. I think Moddable is an awesome tool, and although I have found other tools (Espruino, Low.js, etc) none of them compare with Moddable. the fact that it supports modern JavaScript and runs in a basic ESP32 chip are great differentiators. Having said that, I think there is a high barrier of entry due to the complex setup, I want to see if I can help simplify this |
Beta Was this translation helpful? Give feedback.
-
There are a couple of things I want to do...
|
Beta Was this translation helpful? Give feedback.
-
I have made a batch file that download and test Moddable in w11.
|
Beta Was this translation helpful? Give feedback.
-
I was able to build the tools, but when I tried to execute I understand the need of |
Beta Was this translation helpful? Give feedback.
-
Great news, I was able to build and execute successfully the Hello world demo. I followed these steps (Moddable SDK – Getting Started) but skipped most of this (Using the Moddable SDK with ESP32). In the second document, I only did step #10! These would be the instructions to replace the second document.
I also had to set up some variables:
|
Beta Was this translation helpful? Give feedback.
-
Build environment: Windows 10 (Virtual Machine)
Target device: I have a cheap generic Wroom ESP32 board, I am assuming it's an esp32/saola_wroom.
Description
Not able to follow the setup instructions to install and configure Moddable.
I created a new Windows 10 virtual machine to try to understand the installation. I got past the first part (Build and run applications for the desktop simulator) but now I am trying to do the second part (Part 2: Build and run applications on a development board).
I already have a working CP210x driver installed on the host machine, and using PuTTY on the virtual machine I can see the console.log statements from an application I built with Espruino. So I know the VM can see the ESP32.
I got these errors:
Steps to Reproduce
These are the steps I followed for the second part:
Expected behavior
I am able to install and configure Moddable SDK and the code in the ESP32 board.
Other information
This is the full log:
Beta Was this translation helpful? Give feedback.
All reactions