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
Hot Topic (More than 8 Replies) Deep Search error - can't find library (debug + esp8266 + azure lib) (Read 10864 times)
Rodger
Newbies
*
Offline


Posts: 6
Joined: Feb 4th, 2017
Deep Search error - can't find library (debug + esp8266 + azure lib)
Feb 5th, 2017 at 9:16am
Print Post  
Hi

I am a newbie on this forum, but have been using Visual Micro with Visual Studio 2015 for a little while now. However, I have now hit a perplexing problem.

I'm trying to compile a sketch from 
https://github.com/Azure/azure-iot-arduino-protocol-mqtt/tree/master/examples/si...

I have included the following libraries using the ArduinoIDE  Library Manager
#include <AzureIoTHub.h>
#include <AzureIoTUtility.h>
#include <AzureIoTProtocol_MQTT.h>


Everything compiles and builds fine under Arduino 1.8.1 (using version 2.3.0 of the ESP 8266 Boards Manager file).

However, when I try to compile this using Visual Micro (registered Version 1.1611.21, Version Minor 170119) on Visual Studio 2015 (Community Version 14.0.25431.01 Update 3)  I get the following error

azcpgmspace.cpp:5: In file included from
 
azcpgmspace.h: 15:53: fatal error: azure_c_shared_utility/crt_abstractions.h: No such file or directory
   #include "azure_c_shared_utility/crt_abstractions.h"
   compilation terminated

     An error was encountered during the 'Deep Search' library discovery process.
Build failed for project 'simplesample_mqtt'


When I traced out the calls, the calling file was in 

libraries/AzureIoTHub/src/esp8266/azcpgmspace.h

and the called library that could not be found was in

libraries/AzureIoTUtility/src/azure_c_shared_utility/crt_abstractions.h

Following some of the hints in the forum, I tried turning off Deep Search.

While this then allowed all of the libraries to successfully compile, I came up with another error as follows:-

VM_DBG.h: 51:25: fatal error: ESP8266mDNS.h: No such file or directory
   #include <ESP8266mDNS.h>
   compilation terminated
Error compiling libraries
   error: This hardware might not support the default Serial debugger.
     Try switching the toolbar from 'Debug' to 'Release' and build again. 
           or switch off Automatic Debugging
           or configure the SoftwareSerial debugger option.
Debug build failed for project 'simplesample_mqtt'


I checked that the file was indeed present by successfully using #include <ESP8266mDNS.h> in the main ino file.

Finally, by changing from Debug Mode to Release Mode, everything compiled and built okay, but this is clearly not optimal.

As I will likely need to use Debug Mode to help debug new software based on this example, any help would be greatly appreciated and save me tearing any more hair out Embarrassed
« Last Edit: Feb 12th, 2017 at 2:21pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search error - can't find library
Reply #1 - Feb 5th, 2017 at 9:35pm
Print Post  
Hi,

Thanks for the clear report.

Can you please confirm if, in release mode, the deep search works correctly (without need to include additional headers in the .ino that would not normally be ndded)?

Please also confirm if the current port is set to Serial or an Ip Address?

Thanks
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search error - can't find library
Reply #2 - Feb 6th, 2017 at 2:25am
Print Post  
more ...

If using ip address to upload then it's possible the issue is related to the debugger using OTA (over the air upload) when paused at breakpoints. I also noticed the mdns lib was being used by the debugger but not required.

The latest release does not use mdns and only checks for OTA in breakpoints if the OTA library has been included in the project.

It's possible that these two changes will resolve things for you in Debug mode.

There is a link to the next release at the top of this post if you want to try it.
  
Back to top
IP Logged
 
Rodger
Newbies
*
Offline


Posts: 6
Joined: Feb 4th, 2017
Re: Deep Search error - can't find library
Reply #3 - Feb 6th, 2017 at 5:42am
Print Post  
Tim

Thanks for your prompt reply.

I tried recompiling in release mode with Deep Search enabled. This gave the same result as before, 

azcpgmspace.cpp:5: In file included from
 
azcpgmspace.h: 15:53: fatal error: azure_c_shared_utility/crt_abstractions.h: No such file or directory
   #include "azure_c_shared_utility/crt_abstractions.h"
   compilation terminated

     An error was encountered during the 'Deep Search' library discovery process.
Build failed for project 'simplesample_mqtt'


In answer to your second query, I have not yet got as far as uploading the code to the target device, but tried recompiling (in release mode) with the VS2015 upload configuration set to use firstly a COM port then an IP address. The result was unchanged. The only setting that seems to allow the libraries to compile is Deep Search disabled.

I will give the new software a try as soon as I get a chance and give you an update Smiley.

Regards
  
Back to top
 
IP Logged
 
Rodger
Newbies
*
Offline


Posts: 6
Joined: Feb 4th, 2017
Re: Deep Search error - can't find library
Reply #4 - Feb 6th, 2017 at 6:14am
Print Post  
Hi Tim

I downloaded and extracted the 1702.5 pre-release, but was unsure how to install it.

There does not appear to be a VSIX file in the download and there seemed to be no way of updating it from VS2015..

Sorry if this is a newbie question.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search error - can't find library
Reply #5 - Feb 6th, 2017 at 8:48am
Print Post  
Oops. The forum downloader seems to change the extension from vsix to zip

Please rename.


Vsix files are zip files
« Last Edit: Feb 6th, 2017 at 8:49am by Tim@Visual Micro »  
Back to top
IP Logged
 
Rodger
Newbies
*
Offline


Posts: 6
Joined: Feb 4th, 2017
Re: Deep Search error - can't find library
Reply #6 - Feb 6th, 2017 at 9:26am
Print Post  
Thanks for the tip and I was able to run the installer once I renamed the download file from .ZIP to .VSIX.

I confirmed that Version Minor was now 170205 in Tools->Options->Visual Micro.

Unfortunately, there has been no change to the problem as previously outlined. I can only build successfully with Deep Search disabled and in Release mode.

Would it help if I were to PM you a copy of the verbose build log?
  
Back to top
 
IP Logged
 
Rodger
Newbies
*
Offline


Posts: 6
Joined: Feb 4th, 2017
Re: Deep Search error - can't find library
Reply #7 - Feb 6th, 2017 at 9:34am
Print Post  
more...

I should have also said that the error message in Debug mode (but still with Deep Search disabled) is now

Building project code ...
c\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ tools/sdk/include" tools/sdk/lwip/include" bug/core" -c -w -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 -DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM -DARDUINO=10801 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD=\"ESP8266_ESP01\" -DESP8266 -I"C:\Users\Dad\OneDrive\Documents\Arduino\libraries\AzureIoTHub\src" -I"C:\Users\Dad\OneDrive\Documents\Arduino\libraries\AzureIoTProtocol_MQTT\src" -I"C:\Users\Dad\OneDrive\Documents\Arduino\libraries\AzureIoTUtility\src" libraries\ESP8266WiFi\src" libraries\SPI" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\gg4ir53j.n1z\Micro Platforms\default\debuggers\VM_DBG" -I"C:\Program Files (x86)\Arduino\libraries" libraries" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\gg4ir53j.n1z\Micro Platforms\default\debuggers" -I"C:\Users\Dad\OneDrive\Documents\Arduino\libraries" cores\esp8266" variants\generic" g\simplesample_mqtt.cpp" -o g\simplesample_mqtt.cpp.o" -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -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_USBAPI=17 -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_HARDWARESERIAL -DVM_DEBUG_BREAKPAUSE
 
simplesample_mqtt.ino: In function void setup()
 
simplesample_mqtt.ino: 141:16: error: 'MicroDebug' was not declared in this scope
c\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-gcc" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ tools/sdk/include" tools/sdk/lwip/include" bug/core" -c -w -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC -DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM -DARDUINO=10801 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD=\"ESP8266_ESP01\" -DESP8266 -I"C:\Users\Dad\OneDrive\Documents\Arduino\libraries\AzureIoTHub\src" -I"C:\Users\Dad\OneDrive\Documents\Arduino\libraries\AzureIoTProtocol_MQTT\src" -I"C:\Users\Dad\OneDrive\Documents\Arduino\libraries\AzureIoTUtility\src" libraries\ESP8266WiFi\src" libraries\SPI" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\gg4ir53j.n1z\Micro Platforms\default\debuggers\VM_DBG" -I"C:\Program Files (x86)\Arduino\libraries" libraries" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\gg4ir53j.n1z\Micro Platforms\default\debuggers" -I"C:\Users\Dad\OneDrive\Documents\Arduino\libraries" cores\esp8266" variants\generic" g\simplesample_mqtt.c" -o g\simplesample_mqtt.c.o" -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -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_USBAPI=17 -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_HARDWARESERIAL -DVM_DEBUG_BREAKPAUSE
   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!)
 
simplesample_mqtt.c:29: In file included from
 
VM_DBG.h: 103:1: error: unknown type name 'class
   class VisualMicroDebug
 
VM_DBG.h: 104:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 
VM_DBG.h: 405:1: error: unknown type name 'VisualMicroDebug
   extern VisualMicroDebug MicroDebug
Error compiling project sources
 
   error: This hardware might not support the default Serial debugger.
     Try switching the toolbar from 'Debug' to 'Release' and build again. 
           or switch off Automatic Debugging
           or configure the SoftwareSerial debugger option.
Debug build failed for project 'simplesample_mqtt'
VM_DBG.h: 412:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   template<typename T>
 
VM_DBG.h: 426:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   template<typename T>
 
VM_DBG.h: 432:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   template<typename T>
 
VM_DBG.h: 456:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   template<typename T>


  
Back to top
 
IP Logged
 
Rodger
Newbies
*
Offline


Posts: 6
Joined: Feb 4th, 2017
Re: Deep Search error - can't find library (debug + esp8266 + azure lib)
Reply #8 - Feb 13th, 2017 at 5:56am
Print Post  

Everything works just fine now with build 1702.15 Smiley

I have successfully recompiled the Azure + mqtt sample from Microsoft with Deep Search enabled and in Debug Mode.

Thank you kindly for your help and for taking the time to get to the bottom of this. Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint