Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Compile problems for ESP8266 after installing ESP32 & VisualGDB (Read 6845 times)
goj immypi
Junior Member
**
Offline


Posts: 14
Joined: Jan 20th, 2017
Compile problems for ESP8266 after installing ESP32 & VisualGDB
Jan 20th, 2017 at 11:38pm
Print Post  
Hi.

Recently I installed support for the new ESP32... and then the VisualGDB tool. Now I'm trying to go back to a VisualMicro project for ESP8266 that used to compile, but now has problems. 

This error now appears on the "void loop(void) {" line of the main project.ino file:

Code
Select All
elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ 2.3.0/tools/sdk/include" 2.3.0/tools/sdk/lwip/include" cu\Debug/core" -c -Wall -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD=\"ESP8266_NODEMCU\" -DESP8266 2.3.0\cores\esp8266" 2.3.0\variants\nodemcu" -I"C:\Users\gojimmypi\Documents\Arduino\libraries\Json_Streaming_Parser" 2.3.0\libraries\ESP8266HTTPClient\src" 2.3.0\libraries\ESP8266WiFi\src" -I"C:\Users\gojimmypi\Documents\Arduino\libraries\Adafruit_ILI9341" -I"C:\Users\gojimmypi\Documents\Arduino\libraries\Adafruit_GFX_Library" 2.3.0\libraries\SPI" -I"C:\Program Files (x86)\Arduino\libraries" 2.3.0\libraries" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j3ioxtms.agx\Micro Platforms\default\debuggers" -I"C:\Users\gojimmypi\Documents\Arduino\libraries" \Debug\DashboardClient.cpp" -o \Debug\DashboardClient.cpp.o" -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=50 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE_HARDWARESERIAL1=13 -DVM_DEBUGGER_TYPE_HARDWARESERIAL2=14 -DVM_DEBUGGER_TYPE_HARDWARESERIAL3=15 -DVM_DEBUGGER_TYPE_NET_UDP=16 -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_HARDWARESERIAL

DesktopDashboard.ino: 506:49: error: '__VisualMicro_DEBUG_1_GLastMillis__' was not declared in this scope
   void loop(void) {if (millis()>0 || millis()>1) {__VisualMicro_DEBUG_1_GLastMillis__=
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)

DesktopDashboard.ino: 506:85: error: 'MicroDebug' was not declared in this scope
   void loop(void) {if (millis()>0 || millis()>1) {__VisualMicro_DEBUG_1_GLastMillis__=
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)

DesktopDashboard.ino: 506:150: error: '__VisualMicro_DEBUG_1_HITCOUNTER__' was not declared in this scope
   void loop(void) {if (millis()>0 || millis()>1) {__VisualMicro_DEBUG_1_GLastMillis__=
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)

DesktopDashboard.ino: 506:301: error: '__VisualMicro_DEBUG_1_HITCOUNTER__' was not declared in this scope
   void loop(void) {if (millis()>0 || millis()>1) {__VisualMicro_DEBUG_1_GLastMillis__=
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)
Error compiling project sources
Debug build failed for project 'DesktopDashboard'
 



I of course do not have any variables named "__VisualMicro_DEBUG_1_HITCOUNTER__", etc.

I'm using Visual Studio 2015 Version 14.0.25431.01 Update 3 and VisualMicro 1701.19.1 

I've tried several different ESP8266's (NodeMCU, generic, etc) - and all give the same errors. I've also tried clean/rebuild. 

fwiw - the whole project is here: https://github.com/gojimmypi/DesktopDashboard

Any idea what needs to be done to fix this?

Thanks in advance...  Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compile problems for ESP8266 after installing ESP32 & VisualGDB
Reply #1 - Jan 21st, 2017 at 12:50pm
Print Post  
Hi,

These are debug commands in serial debug breakpoints. They are invalid if you switch on the "vMicro>Debugger>Use Visual Studio Debugging" option because GDB does not recognize them.

The breakpoint causing the error is automatically inserted if "vMicro>General>Tutorial Mode" is enabled

So you have a lot of options Smiley

if you switch off vMicro>Debugger>Use Visual Studio Debugging you should go back to normal serial/udp debug which is best for esp

Or switch the toolbar from Debug to Release to switch off debug

Or leave things as they are but delete the breakpoint and try the build again. A new GDB compatible breakpoint should be automatically created. 

Or delete the breakpoint and switch off "vMicro>General>Tutorial Mode"



  
Back to top
WWW  
IP Logged
 
goj immypi
Junior Member
**
Offline


Posts: 14
Joined: Jan 20th, 2017
Re: Compile problems for ESP8266 after installing ESP32 & VisualGDB
Reply #2 - Jan 24th, 2017 at 1:17am
Print Post  
Hi, thanks for your reply.

1) I don't seem to have a "Use Visual Studio Debugging" under vMicro>Debugger
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
goj immypi
Junior Member
**
Offline


Posts: 14
Joined: Jan 20th, 2017
Re: Compile problems for ESP8266 after installing ESP32 & VisualGDB
Reply #3 - Jan 24th, 2017 at 1:38am
Print Post  
my last post was inadvertently sent to server before I was done editing  Huh and I had difficulty editing it afterwards, so I'll instead continue here.  Smiley

certainly if I switch off debug, that solves the problem.

however - I also do not have any breakpoints and I'd like to be able to use debug features.

curiously, the problem for me seems to be related to some "conditional parameters" that I am using (perhaps there's a better way of doing this?) Although a "seasoned" software engineer, I am relatively new to open source & GitHub; I thought that perhaps keeping my config in a separate & common location would ensure passwords would never get published to GitHub - regardless of gitignore settings, etc.

This code fails to compile in debug mode:

Code (C++)
Select All
//***************************************************
// My config is stored in myPrivateSettings.h file
// if you choose not to use such a file, set this to false:
#define USE_myPrivateSettings true

#if USE_myPrivateSettings == true
#include "/workspace/myPrivateSettings.h"
#else
//create your own myPrivateSettings.h, or edit the following lines:
const char* WIFI_SSID = "my-wifi-SSID";
const char* WIFI_PWD = "my-WiFi-PASSWORD";
const char* DASHBOARD_URL = "/mylink/myfile.json";
const char* DASHBOARD_HOST = "mydashboardhost.com";
#endif
//***************************************************

void setup()
{

  /* add setup code here */

}

void loop()
{

  /* add main program code here */

}
 



with this error:
Code
Select All
Building project code ...
elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ 2.3.0/tools/sdk/include" 2.3.0/tools/sdk/lwip/include" u\Debug/core" -c -Wall -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD=\"ESP8266_NODEMCU\" -DESP8266 2.3.0\cores\esp8266" 2.3.0\variants\nodemcu" -I"C:\Program Files (x86)\Arduino\libraries" 2.3.0\libraries" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\j3ioxtms.agx\Micro Platforms\default\debuggers" -I"C:\Users\gojimmypi\Documents\Arduino\libraries" Debug\VisualMicroTest.cpp" -o Debug\VisualMicroTest.cpp.o" -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=50 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE_HARDWARESERIAL1=13 -DVM_DEBUGGER_TYPE_HARDWARESERIAL2=14 -DVM_DEBUGGER_TYPE_HARDWARESERIAL3=15 -DVM_DEBUGGER_TYPE_NET_UDP=16 -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_HARDWARESERIAL -DVM_DEBUG_BREAKPAUSE

Error compiling project sources
Debug build failed for project 'VisualMicroTest'
VisualMicroTest.ino: In function void setup()

VisualMicroTest.ino: 17:16: error: 'MicroDebug' was not declared in this scope
   void setup() {
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)
 



However this code compiles successfully (note the only change is the unused const values are commented out)

Code (C++)
Select All
//***************************************************
// My config is stored in myPrivateSettings.h file
// if you choose not to use such a file, set this to false:
#define USE_myPrivateSettings true

#if USE_myPrivateSettings == true
#include "/workspace/myPrivateSettings.h"
#else
//create your own myPrivateSettings.h, or edit the following lines:
//const char* WIFI_SSID = "my-wifi-SSID";
//const char* WIFI_PWD = "my-WiFi-PASSWORD";
//const char* DASHBOARD_URL = "/mylink/myfile.json";
//const char* DASHBOARD_HOST = "mydashboardhost.com";
#endif
//***************************************************

void setup()
{

  /* add setup code here */

}

void loop()
{

  /* add main program code here */

}
 



I must be missing something obvious here, as I would not have expected the unused code needing to be commented out to avoid the "'MicroDebug' was not declared" error.

What are your thoughts on this?

I am using Visual Studio 14.0.25341.01 Update 3 and Visual Micro 1701.19.1 (registered user)

Thanks again for your assistance.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compile problems for ESP8266 after installing ESP32 & VisualGDB
Reply #4 - Jan 24th, 2017 at 3:53pm
Print Post  
Hi,

Please change the toolbar from Debug to Release then it will upload without issue.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compile problems for ESP8266 after installing ESP32 & VisualGDB
Reply #5 - Feb 6th, 2017 at 2:46am
Print Post  
Hi,

There has been a number of fixes and additions that should help when compiling in debug mode and also stability  improvements to the way tool chains are discovered.

There is a link to the next release at the top of this post if you want to try it.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compile problems for ESP8266 after installing ESP32 & VisualGDB
Reply #6 - May 6th, 2017 at 12:40am
Print Post  
Update

The windows install guide for the Arduino IDE works well. 

https://github.com/espressif/arduino-esp32/blob/master/doc/windows.md

https://github.com/espressif/arduino-esp32

When it works in the Arduino IDE it will work in Visual Micro.

There will be an update to visual micro over the next few days that solves some intellisense issues for the esp32




  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint