A recent post asked about using Microsoft Visual Studio to build ESP32 applications as opposed to command line or Eclipse. I thought I'd have a cursory look. I know nothing about Visual Studio as I haven't built Windows native applications in the longest time. There is a free version from Microsoft called "Visual Studio Community" that can be downloaded here.
https://www.visualstudio.com/downloads/
However, before you go down this path, let me cut to the chase as I currently understand it. You won't easily be able to use Visual Studio to build ESP32 applications. My thinking behind this is that Visual Studio is designed to build applications that run on Windows platforms and is probably excellent at that. If I was going to build an app that runs on Windows, IE or against other Microsoft products, it is likely that this is the perfect tool/product. However, our target here is an ESP32 device and not Windows.
To start with, there is only one known compiler that will build ESP32 binaries and that is the cross compiler that is based on "gcc" for the Xtensa architecture. Visual Studio provides its own compilers and doesn't appear to be obviously engineered to interact with others.
Next we have the ESP-IDF build environment. This is based on the "Makefile" concepts along with the "make" tool. While Visual Studio does appear to have a tool called "nmake", that is more of a side nod that a provision of a "make" environment. When we set include directories, libraries and other goodies, those don't appear to touch the make system.
Does that mean that we simply can't use Visual Studio to build ESP32 applications? The answer is no as evidenced by this product:
http://visualgdb.com/
VisualGDB appears to be all the tooling one needs to run Makefiles and cross compilers from within Visual Studio and if I were a developer with a world of experience in working in Visual Studio on a Windows platform and wanted to maintain that investment, then VisualGDB would be a no-brainer. However for a hobbyist, there is a catch. There is a modest ($89) license fee for the product. In the schemes of things, this is dirt cheap/inconsequential ... but if we are not professionals and are paying for the tools out of our own pockets ... one has to really want to use Visual Studio as opposed to command line or Eclipse.
[Info] Building ESP32 applications on Windows using Visual Studio
[Info] Building ESP32 applications on Windows using Visual Studio
Last edited by kolban on Wed Dec 28, 2016 1:42 am, edited 1 time in total.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Building ESP32 applications on Windows using Visual Studio
You can use visual studio as an ide like eclipse. You can use a free plugin or roll your own if you don't want to use a paid plugin. If you Google for "esp8266 visual studio" and "visual studio GCC" you will see several options.
Re: [Info] Building ESP32 applications on Windows using Visual Studio
Has anyone gained any more experience using Visual Studio with ESP32 since these October-posts? I use VS at work daily, and would love to be able to use it for ESP32 as well.
Re: [Info] Building ESP32 applications on Windows using Visual Studio
I was using Visual Studio with VisualGDB. The fact esp-idf isn't updated regularly made me switch to building with esp-idf's make.
Visual Studio Code has GREAT integration for linux, its a bit harder in windows but it all works (idk about mac, but probably).
I can open headers with CTRL+LeftMouse.
Goto definition with F12.
Clang format on save.
Run "make -j8 V=1 flash monitor" from the integrated tasks.
Start OpenOCD as a task.
Specify a specific esp-idf folder as IDF_PATH for every work space.
Output make monitor to the tasks output integrated as a window in vscode.
Run gdb next to openocd integrated in vscode.
I think this works even better than Visual Studio with VisualGDB. Although I miss the programming through JTAG in esp-idf.
I don't know what else I would wish for with this setup .
I made a template if you wanna try it out.
https://github.com/FHFS/esp-idf-VSCode-template
I tried eclipse too, it kinda worked but it was hard to set up.
Visual Studio Code has GREAT integration for linux, its a bit harder in windows but it all works (idk about mac, but probably).
I can open headers with CTRL+LeftMouse.
Goto definition with F12.
Clang format on save.
Run "make -j8 V=1 flash monitor" from the integrated tasks.
Start OpenOCD as a task.
Specify a specific esp-idf folder as IDF_PATH for every work space.
Output make monitor to the tasks output integrated as a window in vscode.
Run gdb next to openocd integrated in vscode.
I think this works even better than Visual Studio with VisualGDB. Although I miss the programming through JTAG in esp-idf.
I don't know what else I would wish for with this setup .
I made a template if you wanna try it out.
https://github.com/FHFS/esp-idf-VSCode-template
I tried eclipse too, it kinda worked but it was hard to set up.
Re: [Info] Building ESP32 applications on Windows using Visual Studio
Same question here.... (Not about Visual GDB - not free)Scalpel78 wrote:Has anyone gained any more experience using Visual Studio with ESP32 since these October-posts? I use VS at work daily, and would love to be able to use it for ESP32 as well.
Who is online
Users browsing this forum: adarsh-k, Google [Bot] and 138 guests