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) ESP8266 Apple HomeKit Compile Issue (Read 2381 times)
Davidoff_007
Junior Member
**
Offline


Posts: 22
Joined: May 13th, 2022
ESP8266 Apple HomeKit Compile Issue
May 14th, 2022 at 3:37am
Print Post  
Hello Guys,

has anyone tried to get this package to work on Visual Micro?

i am testing this example: "MultipleAccessories.zip" it comes with 3 files, one to set the wifi settings and one to set the Apple Home Kit parameters and the other is to set the Code.

The example compiles successfully and uploaded to the ESP8266 with no issue, but when i try to compile it with Visual Micro i get a lot of errors, and it won't compile,

one issue is that it is complaining about missing the "ESP8266mDNS.h",
and the other error is:

ld.exe: Arduino-HomeKit-ESP8266-master\storage.c.o: in function homekit_storage_reset
storage.c:137: undefined reference to _EEPROM_start
ld.exe: D:\libraries\Arduino-HomeKit-ESP8266-master\src\storage.c:140: undefined reference to _EEPROM_start


i tried everything i can think of but can't get this example to compile successfully.

Please assist and mention where is the issue and how to resolve it.

I would appreciate all your help,

Best Regards,

Davidoff
  

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


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #1 - May 14th, 2022 at 3:38am
Print Post  
attached example that is having issues compiling in Visual Studio 2022.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 Apple HomeKit Compile Issue
Reply #2 - May 14th, 2022 at 7:22pm
Print Post  
Thanks for the info. Please provide the information requested in the yellow area above.
  
Back to top
WWW  
IP Logged
 
Davidoff_007
Junior Member
**
Offline


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #3 - May 14th, 2022 at 7:32pm
Print Post  
hi Tim,

as per your request i have attached the output of the verbose with and without the class that the code is complaining about, knowing that this class was not an issue with the Arduino IDE compilation.

Thank you,
Davidoff
  
Back to top
 
IP Logged
 
Davidoff_007
Junior Member
**
Offline


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #4 - May 14th, 2022 at 7:34pm
Print Post  
attachment 1
  

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


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #5 - May 14th, 2022 at 7:35pm
Print Post  
attachment 2
« Last Edit: May 14th, 2022 at 7:37pm by Davidoff_007 »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 Apple HomeKit Compile Issue
Reply #6 - May 14th, 2022 at 9:21pm
Print Post  
Before I answer. There are two answers, one simple and one complex. 

I need to know which is relevant.

Questions

  • Is there a reason for such complicated configuration?
  • Do you understand the dofference between arduino downloaded packages and sketch book folder?
  • Have you ever installed an Arduino library before?
  • Do you know how to use advanced shared Visual Micro projects?


Thanks
  
Back to top
WWW  
IP Logged
 
Davidoff_007
Junior Member
**
Offline


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #7 - May 15th, 2022 at 3:56am
Print Post  
hi Tim,

to answer your questions:


- Is there a reason for such complicated configuration?

this is not my code, i didn't write it, it is a package available to download from the programmer, i am using it to be able to control the ESP8266 module from Apple Home Kit.


Do you understand the dofference between arduino downloaded packages and sketch book folder?
yes i do understand that, but the package compiles successfully on the Arduino IDE, but the Visual Micro complains about a missing library and error in one of the c classes, so i am not sure why it should fail in visual studio.

Have you ever installed an Arduino library before?
yes of course, i install a lot of libraries, but this specific one is a customized package that is not available in the library
Do you know how to use advanced shared Visual Micro projects?
No, i have not worked yet with that, but does that help to resolve the issue with that package? if yes, please provide instructions.

Thank you,
Davidoff.
  
Back to top
 
IP Logged
 
Davidoff_007
Junior Member
**
Offline


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #8 - May 15th, 2022 at 3:59am
Print Post  
The log files that i mentioned:

1- "without_mDNS.txt" : this was executed without including the line: #include <ESP8266mDNS.h>
2- "with_mDNS_001.txt": This is executed when including in the code the line:  #include <ESP8266mDNS.h>


i hope this is clear now.

Thank you
  
Back to top
 
IP Logged
 
Davidoff_007
Junior Member
**
Offline


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #9 - May 15th, 2022 at 4:01am
Print Post  
Also, just to let you know the package was downloaded from this site:

https://www.arduinolibraries.info/libraries/home-kit-esp8266

if that helps.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 Apple HomeKit Compile Issue
Reply #10 - May 15th, 2022 at 2:47pm
Print Post  
Is the arduino ide compiing exact same code from same locations?

Please provide verbose output from th arduino ide.

Thanks

« Last Edit: May 15th, 2022 at 2:51pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Davidoff_007
Junior Member
**
Offline


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #11 - May 15th, 2022 at 5:56pm
Print Post  
i already attached the verbose output in these 2 files:

1- "without_mDNS.txt"
2- "with_mDNS_001.txt"
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 Apple HomeKit Compile Issue
Reply #12 - May 15th, 2022 at 5:58pm
Print Post  
Sorry but I meant verbose output from arduino ide. file>preferences>compile verbose.

Thanks
  
Back to top
WWW  
IP Logged
 
Davidoff_007
Junior Member
**
Offline


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #13 - May 16th, 2022 at 2:32am
Print Post  
yes i know , the 2 files are the output from  file>preferences>compile verbose. did you look at them to see if this is what you need or not?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 Apple HomeKit Compile Issue
Reply #14 - May 16th, 2022 at 12:02pm
Print Post  
The two files are visual micro build outputs. They are not outputs from the arduino ide.
  
Back to top
WWW  
IP Logged
 
Davidoff_007
Junior Member
**
Offline


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #15 - May 16th, 2022 at 1:33pm
Print Post  
hi Tim,

yes i am sorry i didn't see that, i thought you were talking about the visual micro verbose.
i have attached now a copy from the verbose from Arduino IDE as per your request.

please let me know if you are able to figure out the issue.

Thank you,
Davidoff
  

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


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #16 - May 16th, 2022 at 1:35pm
Print Post  
here is another copy of the Arduino IDE verbose without the warning.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 Apple HomeKit Compile Issue
Reply #17 - May 16th, 2022 at 4:40pm
Print Post  
Thanks. As suggested previously you have been a bit confused with config paths. In Visual Micro you should leave all empty paths sich as "Sketchbook" and "ContributionsPath". When you leave them empty Visual Micro uses the defaults that are set or configured in the Arduino IDE.

In the Arduino IDE you have set the SketchBook location to B:\Projects. That means that it will use libraries from "B:\Projects\Libraries". (Arduino finds the libraries that you install in the "sketchBook\Libraries" folder).

In Visual Micro you have set the sketchBook location to "B:\VisualMicro" therefore libraries would be expected in "B:\VisualMicro\Libraries"

In the Arduino IDE you are using the esp8266 package as expected. You installed the 8266 package using the Arduino IDE board manager and the package is installed into the standard Arduino package location. users\[youname]\app_data\arduino15\packages

In Visual Micro you have configured downloaded packages to reside in the "B:\VisualMicro" folder. That means you are using a different esp8266 package than you are using in the Arduino IDE

In the Arduino IDE you are working with code from "B:\Projects\contact_homekit\ContactSensor_HomeKit"

In Visual Micro you are working with code from "B:\VSProjects\ContactSensor_HomeKit"

I can't see any part of this that can be fairly compared with the Arduino IDEĀ  Smiley

I can see you have some good thought about managing code and seperation but my recommendation would be to step back until you have a clearer view of things.

These two actions will cause visual micro to use the same core and libraries that are being used in the arduino ide

  • Clear the contributions path that you have set in either "IDE locations" or "Global options".
  • Clear the sketchbook folder you have set in the "IDE locations".
  • Delete the package and library you have added to your disk


After that you can open the same "B:\Projects\contact_homekit\ContactSensor_HomeKit" in Visual Micro that you are using in the Arduino IDE. After that it will build the same as the Arduino IDE using the same configuration as the Arduino IDE

After you prove you have same system in Arduino and Visual Micro you will be welcome to create a new thread asking for advice about consolidating toolchains, libraries and project code into an isolated location for easier source control.

Does this help?





« Last Edit: May 16th, 2022 at 4:40pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Davidoff_007
Junior Member
**
Offline


Posts: 22
Joined: May 13th, 2022
Re: ESP8266 Apple HomeKit Compile Issue
Reply #18 - May 16th, 2022 at 7:14pm
Print Post  
hello,

yes thank you for the information, your comments gave me a hint on where the issue is.
basically Arduino IDE was pointing to the ESP8266 board version 2.5.1, but arduino IDE was using version 3.0.1, once i updated in visual micro the ESP8266 board with that same version 3.0.1, the file compiled successfully.

Thank you very much,

please close this ticket.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 Apple HomeKit Compile Issue
Reply #19 - May 16th, 2022 at 8:59pm
Print Post  
Excellent, well done.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint