VS Arduino
Visual Micro >> Visual Studio 2017, 2019, 2022 >> ESP8266 Apple HomeKit Compile Issue
https://www.visualmicro.com/forums/YaBB.pl?num=1652499454

Message started by Davidoff_007 on May 14th, 2022 at 3:37am

Title: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 14th, 2022 at 3:37am
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
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=HomeKit_ESP8266-1_2_0.zip ( 732 KB | 1 Download )

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 14th, 2022 at 3:38am
attached example that is having issues compiling in Visual Studio 2022.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=MultipleAccessories.zip ( 3 KB | 1 Download )

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Tim@Visual Micro on May 14th, 2022 at 7:22pm
Thanks for the info. Please provide the information requested in the yellow area above.

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 14th, 2022 at 7:32pm
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

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 14th, 2022 at 7:34pm
attachment 1
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=without_mDNS.txt ( 240 KB | 3 Downloads )

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 14th, 2022 at 7:35pm
attachment 2
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=with_mDNS_001.txt ( 69 KB | 3 Downloads )

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Tim@Visual Micro on May 14th, 2022 at 9:21pm
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

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 15th, 2022 at 3:56am
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.

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 15th, 2022 at 3:59am
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
   

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 15th, 2022 at 4:01am
Also, just to let you know the package was downloaded from this site:

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

if that helps.

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Tim@Visual Micro on May 15th, 2022 at 2:47pm
Is the arduino ide compiing exact same code from same locations?

Please provide verbose output from th arduino ide.

Thanks


Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 15th, 2022 at 5:56pm
i already attached the verbose output in these 2 files:

1- "without_mDNS.txt"
2- "with_mDNS_001.txt"

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Tim@Visual Micro on May 15th, 2022 at 5:58pm
Sorry but I meant verbose output from arduino ide. file>preferences>compile verbose.

Thanks

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 16th, 2022 at 2:32am
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?

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Tim@Visual Micro on May 16th, 2022 at 12:02pm
The two files are visual micro build outputs. They are not outputs from the arduino ide.

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 16th, 2022 at 1:33pm
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
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Arduino_Verbose.txt ( 499 KB | 10 Downloads )

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 16th, 2022 at 1:35pm
here is another copy of the Arduino IDE verbose without the warning.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Arduino_Verbose_without_warning_on.txt ( 40 KB | 5 Downloads )

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Tim@Visual Micro on May 16th, 2022 at 4:40pm
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Ā  :)

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?






Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Davidoff_007 on May 16th, 2022 at 7:14pm
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.

Title: Re: ESP8266 Apple HomeKit Compile Issue
Post by Tim@Visual Micro on May 16th, 2022 at 8:59pm
Excellent, well done.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.