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] 2  Send TopicPrint
Hot Topic (More than 8 Replies) Visual Micro 2.0 for Vs2022 (Read 4319 times)
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Visual Micro 2.0 for Vs2022
Nov 8th, 2022 at 8:03am
Print Post  
This sound all great, I can not wait to test it.

1/ First installing vs2022
2/ install https://www.visualmicro.com/forums/YaBB.pl?num=1667870341

Then what? is it necessary to install Arduino 2.0?

For my public library on github I will make a backup and wait to upload it.

Quote:
If you would like to try the new project type then remove the .vcxproj from the project folder and then use "File>Open>Arduino Project" which will create a new project for you.


First I deleted the .vcxproj file and then open the solution form the file browser? is that ok? Or do I need to start continue without code and then do file. 

See picture what I get. Don't see open Arduino project? Not sure what you mean.

« Last Edit: Nov 8th, 2022 at 7:23pm by The_Specialist »  
Back to top
 
IP Logged
 
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Re: Cool! Vs2022 IDE2.0 linux
Reply #1 - Nov 8th, 2022 at 5:50pm
Print Post  
Ok I see now. what you mean here https://www.visualmicro.com/forums/YaBB.pl?num=1667870341 by File>Open>Arduino Project.

Is this to open a project a project that used vc++?
« Last Edit: Nov 8th, 2022 at 7:38pm by The_Specialist »  

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


Posts: 228
Joined: Jul 1st, 2020
Re: RC Visual Micro 2.0 for Vs2022
Reply #2 - Nov 8th, 2022 at 10:08pm
Print Post  
if I remove the .vcxproj and open like the picture above I can not load the project anymore.

If I type an include in to the sketch the library has been found, if I use add library in the menu the library is imported.So those things works. Also definition like ARDUINO_ARCH_ESP32 can be autofilled in and it compiles.

What doesn't work for me is...
1/ the sdk of Arduino esp installed in Arduino 1.8.19 is not been found
2/ ARDUINO_ARCH_ESP32 can not open the definition.

Is this version for a Linux kenel like Debian GNU? Or can it also be used in windows?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro 2.0 for Vs2022
Reply #3 - Nov 9th, 2022 at 1:24am
Print Post  
The RC1 version was not creating the new vcxproj type

Please install RC2, delete the vcxproj and then things should work okay.
  
Back to top
IP Logged
 
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Re: Visual Micro 2.0 for Vs2022
Reply #4 - Nov 9th, 2022 at 2:08am
Print Post  
I will try that later. I installed Arduino IDE2 and config it to that it in 2022 folder and installed with git the esp sdk in Visual Studio 2022\Arduino\hardware\espressif\esp32\... I Opened arduino IDE2 and my boards are showen. When I start a new project in the rc version and select in the vm menue arduino2 configuration, I don't see my esp boards. I think it is stil using the Arduino 1.8.19 config, because there I that vs2019 folder I deleted the esp sdk.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro 2.0 for Vs2022
Reply #5 - Nov 9th, 2022 at 2:22am
Print Post  
If you can't see your esp boards you have probably uninstalled them. Use Board Manager to install them again. Visual Micro hasn't changed other than the intellisense engine in the code editor.
  
Back to top
IP Logged
 
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Re: Visual Micro 2.0 for Vs2022
Reply #6 - Nov 9th, 2022 at 2:23am
Print Post  
I found them. I just had to set the document folder in config IDE location in visual micro. 

The first compile with a simple Serial.print dit work! And intellisense seems to work too. I will try tomorrow some more stuff. Good night!
« Last Edit: Nov 9th, 2022 at 2:23am by The_Specialist »  
Back to top
 
IP Logged
 
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Re: Visual Micro 2.0 for Vs2022
Reply #7 - Nov 9th, 2022 at 9:44am
Print Post  
Code (C++)
Select All
#define __CHAR32_TYPE__ unsigned int 



Severity      Code      Description      Project      File      Line      Suppression State
Error (active)      E0046      "__CHAR32_TYPE__" is predefined; attempted redefinition ignored      Sketch2      99f5f38ad68b113c13de29a6\vm-intelli-gcc-defines.h      297      



Code (C++)
Select All
#  if __has_include("sdkconfig.h") 



Severity      Code      Description      Project      File      Line      Suppression State
Error (active)      E0059      function call is not allowed in a constant expression      Sketch2      G:\Documents\Visual Studio soc\soc_caps.h      32      

Edited:
When I did a build the where gone!
« Last Edit: Nov 9th, 2022 at 9:53am by The_Specialist »  
Back to top
 
IP Logged
 
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Re: Visual Micro 2.0 for Vs2022
Reply #8 - Nov 9th, 2022 at 9:53am
Print Post  
The_Specialist wrote on Nov 9th, 2022 at 9:44am:
Code (C++)
Select All
#define __CHAR32_TYPE__ unsigned int 



Severity      Code      Description      Project      File      Line      Suppression State
Error (active)      E0046      "__CHAR32_TYPE__" is predefined; attempted redefinition ignored      Sketch2      99f5f38ad68b113c13de29a6\vm-intelli-gcc-defines.h      297      



Code (C++)
Select All
#  if __has_include("sdkconfig.h") 



Severity      Code      Description      Project      File      Line      Suppression State
Error (active)      E0059      function call is not allowed in a constant expression      Sketch2      G:\Documents\Visual Studio soc\soc_caps.h      32      

Edited:
When I did a build the error(s) where gone!

« Last Edit: Nov 9th, 2022 at 10:00am by The_Specialist »  
Back to top
 
IP Logged
 
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Re: Visual Micro 2.0 for Vs2022
Reply #9 - Nov 9th, 2022 at 10:27am
Print Post  
I cloned my lib that was written with 2019. I tested the connection to the WiFi and it works with me. 

You did adjust the sequence form the add libraries. Great! Thanks.

I will try to connect some clients this afternoon.
  
Back to top
 
IP Logged
 
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Re: Visual Micro 2.0 for Vs2022
Reply #10 - Nov 10th, 2022 at 8:12am
Print Post  
I check on code my c++ version and it tells me I am using C++11 Embarrassed
Code (C++)
Select All
void checkCPlusPlusversion() {
    if (__cplusplus == 202002) Serial.println("C++20<n");
    else if (__cplusplus == 201703L) Serial.println("C++17<n");
    else if (__cplusplus == 201402L) Serial.println("C++14<n");
    else if (__cplusplus == 201103L) Serial.println("C++11<n");
    else if (__cplusplus == 199711L) Serial.println("C++98<n");
} 



My project property tells me that C++14 is in use. Can I use C20 for esp arduino?  If I change it change back after restart.
« Last Edit: Nov 10th, 2022 at 9:50am by The_Specialist »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: Visual Micro 2.0 for Vs2022
Reply #11 - Nov 10th, 2022 at 11:11am
Print Post  
Thanks for the update and detail.

The current system is setting it to GNUC++14 as part of setting the intellisense properties, which is why it reverts back after restarting.

The Property Page setting only affects intellisense, and does not affect the standard which is often specified in the actual build pattern.

We are working on refining this element of the system to tie these together more closely, and we will update when we have a Release Candidate available.
  
Back to top
IP Logged
 
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Re: Visual Micro 2.0 for Vs2022
Reply #12 - Nov 11th, 2022 at 12:27am
Print Post  
I think they best match. For to today C17 is possible for Esp Arduino. the C17 had some improvements with vectors if I am not mistaken. The default is C11 arduino. I work today with external C and it went wel.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro 2.0 for Vs2022
Reply #13 - Nov 12th, 2022 at 12:04am
Print Post  
Thanks, Yes the release next week deduces the language standard automatically for the current board (where possible).
  
Back to top
IP Logged
 
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Re: Visual Micro 2.0 for Vs2022
Reply #14 - Nov 20th, 2022 at 12:59am
Print Post  
Installation failed on the first time I run the setup. 

1) uninstalled the previous version
2) opened visual studio and closed
3) and than installed the RC3 version.

Second run it installed successfully.

PS: I couldn't get the the install log.
« Last Edit: Nov 20th, 2022 at 1:08am by The_Specialist »  

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


Posts: 228
Joined: Jul 1st, 2020
Re: Visual Micro 2.0 for Vs2022
Reply #15 - Nov 20th, 2022 at 1:13am
Print Post  
sorry, I have... See attachment.

My c and c++ version is still the same. I suspect you just implemented some functionality. Not new versions...

If we imported a lib, it's always on top of the code. Can it be imported on the cursor? It will give you also insights if it is imported in a header file or the sketch.

I have now imported libs without issue. Now I have imported https://github.com/bertmelis/espMqttClient
and that lib doesn't have a proper library.properties filled in with includes=*.h. When importing it in to vm only the #include <Config.h> is reqonized by intellisens.

Thoughts to make it able to import this lib. https://github.com/esphome/esphome
It's a very interesting lib that's now only working for platform.IO. Since you have a linux based platform, could it be possible to import this? The source code contains many .py files...
« Last Edit: Nov 20th, 2022 at 11:29am by The_Specialist »  

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


Posts: 228
Joined: Jul 1st, 2020
Re: Visual Micro 2.0 for Vs2022
Reply #16 - Nov 20th, 2022 at 6:29pm
Print Post  
Is it realy needed to import the lib in to the code when the library.properties is not filled in?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: Visual Micro 2.0 for Vs2022
Reply #17 - Nov 21st, 2022 at 12:47pm
Print Post  
For the Language settings we will set "gnu99" for C code, and "gnu++11" for C++ code, which is derived from the compilation patterns for the ESP32 in its' platform.txt.

The library #includes are imported at the top of the sketch for safety and simplicity for all users.

When importing the espMqttClient, do the intellisense errors resolve after saving the sketch? (we cannot replicate this currently)

The esphome project referenced does not seem to be an Arduino Library, and from the notes on this page (
Code
Select All
https://github.com/esphome/esphome-core 

) it seems that this has been changed to be built using the python system they supply.  There does appear to be a library for the esp-home core, but it seems to be lagging behind the above link:
Code
Select All
https://github.com/hajdbo/ESPHome-Core 



To use a library you will always need the *.h references in your code for it to work when compiling, unless I am misunderstanding your last point?
  
Back to top
IP Logged
 
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Re: Visual Micro 2.0 for Vs2022
Reply #18 - Dec 7th, 2022 at 9:21am
Print Post  
The library #includes are imported at the top of the sketch for safety and simplicity for all users.

Can you let the view jump, where the code is imported?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro 2.0 for Vs2022
Reply #19 - Dec 7th, 2022 at 1:21pm
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint