ESP-IDF Compiling on Win10 with a twist
Posted: Tue Apr 03, 2018 8:10 pm
!!! Warning, Long in the tooth description, Warning !!!
For those of use not willing to let go of our Win10 boxes, and go full Linux I think I have found an alternate method to compile on a PC.
So far, I know of 3 such methods,
#1) Install a cross compiler on your PC, and other changes.
#2) Install a VM running a Linux Distro.
#3) This possibly new idea that I will try to explain.
Let me fist state that I am learning Linux, and far, far from being useful at it. Thus I hope to see if I can get some help from you smarter guys to see if I can pull this off, because I feel this is would be a good method for PC users. Disclaimer warning: I know one method is not considered good for everyone.
I have been using a VM on my PC which runs Ubuntu to compile for the ESP32. I then Eclipse in there to code for it. As those who have tried this way know this is not the greatest approach. For those that may not know, you can install Ubuntu bash command line in Win10. Its very handy and I use it often to try things I learn for Linux. You can read more about here about that: https://www.microsoft.com/en-us/store/p ... blggh4msv6.
I have been able to do everything in the command window as I can in the real Ubuntu's Terminal window.
Last night I though why dont I try installing the Toolchain for Linux there and see if it works. Quick recap here:
https://espressif-docs.readthedocs-host ... setup.html
It worked just fine, I can run make menuconfig and compile just fine. Now here is the twist/ed part.
On the PC side you can access those Linux files. I.E. root, home and so on. You can read more about that here:
https://www.howtogeek.com/261383/how-to ... e-in-bash/
For example, that location on my box its here:
C:\Users\Mike\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\Mike\esp-idf
I will install eclipse on my PC instead of using it through the VM (so it runs far faster and GUI looks normal) and point Eclipse to that folder location instead. I am so close to accomplishing this with the hello_wold example. I don't have any warnings in eclipse, yet when I build I run into a issue where I hit a Permission denied issue. I tried mucking with permissions and gain and loose success at it, but my limited knowledge even with googles help is keeping me from moving forward.
Should anyone else find that this might be another useful way to do this, and might be willing to throw some suggestions to try let me know and thanks for the time. Below is the last clip of the output from Eclipse when building hello_world example.
For those of use not willing to let go of our Win10 boxes, and go full Linux I think I have found an alternate method to compile on a PC.
So far, I know of 3 such methods,
#1) Install a cross compiler on your PC, and other changes.
#2) Install a VM running a Linux Distro.
#3) This possibly new idea that I will try to explain.
Let me fist state that I am learning Linux, and far, far from being useful at it. Thus I hope to see if I can get some help from you smarter guys to see if I can pull this off, because I feel this is would be a good method for PC users. Disclaimer warning: I know one method is not considered good for everyone.
I have been using a VM on my PC which runs Ubuntu to compile for the ESP32. I then Eclipse in there to code for it. As those who have tried this way know this is not the greatest approach. For those that may not know, you can install Ubuntu bash command line in Win10. Its very handy and I use it often to try things I learn for Linux. You can read more about here about that: https://www.microsoft.com/en-us/store/p ... blggh4msv6.
I have been able to do everything in the command window as I can in the real Ubuntu's Terminal window.
Last night I though why dont I try installing the Toolchain for Linux there and see if it works. Quick recap here:
https://espressif-docs.readthedocs-host ... setup.html
It worked just fine, I can run make menuconfig and compile just fine. Now here is the twist/ed part.
On the PC side you can access those Linux files. I.E. root, home and so on. You can read more about that here:
https://www.howtogeek.com/261383/how-to ... e-in-bash/
For example, that location on my box its here:
C:\Users\Mike\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\Mike\esp-idf
I will install eclipse on my PC instead of using it through the VM (so it runs far faster and GUI looks normal) and point Eclipse to that folder location instead. I am so close to accomplishing this with the hello_wold example. I don't have any warnings in eclipse, yet when I build I run into a issue where I hit a Permission denied issue. I tried mucking with permissions and gain and loose success at it, but my limited knowledge even with googles help is keeping me from moving forward.
Should anyone else find that this might be another useful way to do this, and might be willing to throw some suggestions to try let me know and thanks for the time. Below is the last clip of the output from Eclipse when building hello_world example.
Code: Select all
Assembler messages:
Fatal error: can't create src/bootloader_random.o: Permission denied
make[2]: *** [/c/Users/Mike/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/home/Mike/esp/esp-idf/make/component_wrapper.mk:274: src/bootloader_random.o] Error 1
make[2]: Leaving directory '/c/Users/Mike/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/home/Mike/esp/hello_world/build/bootloader/bootloader_support'
make[1]: *** [/c/Users/Mike/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/home/Mike/esp/esp-idf/make/project.mk:453: component-bootloader_support-build] Error 2
make[1]: Leaving directory '/c/Users/Mike/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/home/Mike/esp/esp-idf/components/bootloader/subproject'
make: *** [/c/Users/Mike/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/home/Mike/esp/esp-idf/components/bootloader/Makefile.projbuild:40: /c/Users/Mike/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/home/Mike/esp/hello_world/build/bootloader/bootloader.bin] Error 2
14:53:41 Build Finished (took 7s.411ms)