Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By mactro
#13989 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.
User avatar
By mactro
#14084 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 :)
User avatar
By MeNoGeek
#14197 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?