-->
Page 1 of 3

Using Atmel Studio + Visual Micro with ESP

PostPosted: Thu Apr 09, 2015 10:13 am
by mactro
Hi,

has anyone tried to use Atmel Studio with ESP instead of Arduino IDE? With Visual Micro, it displays ESP in boards lists, just like in Arduino IDE, but when I try to compile, I get output like this:
Code: Select all   Process: "{runtime.hardware.path}\tools\xtensa-lx106-elf\bin\xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH "-I{runtime.hardware.path}/tools/sdk//include" -c -Os -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=161 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\cores\esp8266" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\variants\esp01" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries\ESP8266WiFi\src" -I"E:\programy\Arduino\libraries" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers" -I"C:\Users\Dell Precision M4600\Documents\Arduino\libraries" "C:\Users\Dell Precision M4600\AppData\Local\V.Micro\Arduino\Builds\esp_mqtt_client\esp01\esp_mqtt_client.cpp" -o "C:\Users\Dell Precision M4600\AppData\Local\V.Micro\Arduino\Builds\esp_mqtt_client\esp01\esp_mqtt_client.cpp.o"
   Process: "{runtime.hardware.path}\tools\xtensa-lx106-elf\bin\xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH "-I{runtime.hardware.path}/tools/sdk//include" -c -Os -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=161 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\cores\esp8266" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\variants\esp01" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries\ESP8266WiFi\src" -I"E:\programy\Arduino\libraries" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers" -I"C:\Users\Dell Precision M4600\Documents\Arduino\libraries" "C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries\ESP8266WiFi\src\ESP8266WiFi.cpp" -o "C:\Users\Dell Precision M4600\AppData\Local\V.Micro\Arduino\Builds\esp_mqtt_client\esp01\ESP8266WiFi\ESP8266WiFi.cpp.o"
   Process: "{runtime.hardware.path}\tools\xtensa-lx106-elf\bin\xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH "-I{runtime.hardware.path}/tools/sdk//include" -c -Os -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=161 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\cores\esp8266" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\variants\esp01" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries\ESP8266WiFi\src" -I"E:\programy\Arduino\libraries" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers" -I"C:\Users\Dell Precision M4600\Documents\Arduino\libraries" "C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries\ESP8266WiFi\src\WiFiClient.cpp" -o "C:\Users\Dell Precision M4600\AppData\Local\V.Micro\Arduino\Builds\esp_mqtt_client\esp01\ESP8266WiFi\WiFiClient.cpp.o"
   Process: "{runtime.hardware.path}\tools\xtensa-lx106-elf\bin\xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH "-I{runtime.hardware.path}/tools/sdk//include" -c -Os -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=161 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\cores\esp8266" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\variants\esp01" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries\ESP8266WiFi\src" -I"E:\programy\Arduino\libraries" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers" -I"C:\Users\Dell Precision M4600\Documents\Arduino\libraries" "C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries\ESP8266WiFi\src\WiFiServer.cpp" -o "C:\Users\Dell Precision M4600\AppData\Local\V.Micro\Arduino\Builds\esp_mqtt_client\esp01\ESP8266WiFi\WiFiServer.cpp.o"
   Process: "{runtime.hardware.path}\tools\xtensa-lx106-elf\bin\xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH "-I{runtime.hardware.path}/tools/sdk//include" -c -Os -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=161 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\cores\esp8266" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\variants\esp01" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries\ESP8266WiFi\src" -I"E:\programy\Arduino\libraries" -I"C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers" -I"C:\Users\Dell Precision M4600\Documents\Arduino\libraries" "C:\Users\Dell Precision M4600\Documents\Arduino\hardware\esp\esp8266\libraries\ESP8266WiFi\src\WiFiUdp.cpp" -o "C:\Users\Dell Precision M4600\AppData\Local\V.Micro\Arduino\Builds\esp_mqtt_client\esp01\ESP8266WiFi\WiFiUdp.cpp.o"
Error compiling

Any ideas how to fix it? Visual Micro debugger is turned off in project properties.

Re: Using Atmel Studio + Visual Micro with ESP

PostPosted: Fri Apr 10, 2015 4:30 am
by mactro
For anyone interested, I have just found a solution:

In file platforms.txt in your esp8266 folder in Arduino hardware add following 2 lines just after version line:
Code: Select allruntime.hardware.path=C:\Path to Arduino\Arduino\hardware\esp8266com
runtime.os=windows


For some reason these two variables that should be passed from IDE are not set correctly in AS. When you add them manually like that, everything works like a charm :)

Re: Using Atmel Studio + Visual Micro with ESP

PostPosted: Sat Apr 11, 2015 12:55 pm
by MeNoGeek
Thanks for the tip, but I couldn't find any "platforms.txt" file, so I assumed you mean "platform.txt", which is under "hardware\esp8266com\esp8266\".
However, esptool doesn't show up in the programmers list... Any hint?

Re: Using Atmel Studio + Visual Micro with ESP

PostPosted: Tue Apr 21, 2015 3:54 am
by mactro
You probably already know it by now, but don't worry about programmer. It doesn't have to show up. Just select "generic ESP8266 board" from boards menu in Atmel Studio, and you are ready to go.