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) Problem compiling for Z-Uno 2 - .ino not found (Read 3660 times)
principia
Junior Member
**
Offline


Posts: 19
Joined: Aug 31st, 2012
Problem compiling for Z-Uno 2 - .ino not found
Sep 23rd, 2021 at 4:21pm
Print Post  
Tim
I have added the published Z-Uno 2 board definition to my Arduino IDE setup (1.8.16) and I can compile blink with no errors. When I create a new project in VS 2019 (latest versions of VS and Visual Micro) for the Z-Uno 2 board I get the errorĀ  - Input sketch "C:\Users\Andy\AppData\Local\Temp\VMBuilds\Blink\Z-Uno2G_zuno2\Debug\Blink.ino" doesn't exists!.

I'm using the VS 2019 + Visual Micro successfully for various Arduino boards so I think that my setup is OK.

I've checked the AppData\...\Debug folder which does exist and contains blink.cpp but not blink.ino.

I've attached the VS Output Window text. Could you please have a look at this?
  

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: Problem compiling for Z-Uno 2 - .ino not found
Reply #1 - Sep 23rd, 2021 at 9:47pm
Print Post  
We will have to install the package and look into the source of _make" 

The zme_make is run via a build event hook. It is passed the location of the Blink.ino. Can confirm the .ino exists this will prove the file has been correctly copied to the temmp build folder by visual micro? If the file exists, which is should, then we will look at why zme_make says it does not.

Code
Select All
"C:\Users\Andy\AppData\Local\Temp\VMBuilds\Blink\Z-Uno2G_zuno2\Debug/Blink.ino" 

  
Back to top
WWW  
IP Logged
 
principia
Junior Member
**
Offline


Posts: 19
Joined: Aug 31st, 2012
Re: Problem compiling for Z-Uno 2 - .ino not found
Reply #2 - Sep 24th, 2021 at 7:39am
Print Post  
I've checked the ..\Debug directory and there is no Blink.ino. When i execute a clean build the ..\Debug directory is populated with Blink.cpp, .VM_ProjectPreProcessor.cache.txt, \core, \.vmpreproc and \.vm_sys

The Zuno-2 board download URL is https://rus.z-wave.me/files/z-uno/g2/beta-index/package_z-wave2.me_index.json

When you first open a new project there may be an intellisense error on custom_cdecl.h not found - this file is auto generated by the Zuno pre-processor and goes away after the first build.
  
Back to top
 
IP Logged
 
principia
Junior Member
**
Offline


Posts: 19
Joined: Aug 31st, 2012
Re: Problem compiling for Z-Uno 2 - .ino not found
Reply #3 - Sep 25th, 2021 at 8:22am
Print Post  
Update: manually copying Blink.ino into ..\VMBuilds\...\Debug\ enables a successful build.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem compiling for Z-Uno 2 - .ino not found
Reply #4 - Sep 25th, 2021 at 2:27pm
Print Post  
The tool should be looking for the .CPP.

I forgot that when I replied before.

Using the .into should be referenced from the project folder and in a project with multiple ino files it's going to be an issue.

Does the project build okay in the Arduino IDE?
  
Back to top
WWW  
IP Logged
 
principia
Junior Member
**
Offline


Posts: 19
Joined: Aug 31st, 2012
Re: Problem compiling for Z-Uno 2 - .ino not found
Reply #5 - Sep 25th, 2021 at 4:09pm
Print Post  
The project builds from the Arduino IDE - tested by opening the sketch directly which is in the same location as the VS2019 .sln file.

There is only a single .ino source file in the project. No other .ino or .cpp files and no source sub-folders.

The VS2019 / Visual Micro error message says the .ino file cannot be found. The .cpp file does exist in the correct VMBuild folder but there is no .ino file. I noted your comment about expecting a .cpp file but this is not consistent with the error message.

As mentioned previously, manually copying the .ino file to the VMBuild folder enables a successful build.

I've looked at Boards.txt and extracted in the attached file the "recipe" and what the VS2019 output window records as the substitutions. it looks as if {build.project_name} goes to the .ino filename.

Hope this helps
Andy
  

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: Problem compiling for Z-Uno 2 - .ino not found
Reply #6 - Sep 25th, 2021 at 10:43pm
Print Post  
Thanks, we will take a look. 

When arduino project is compiled all .ino files are combined into a .cpp that is created in a temp folder. The .cpp has some other manipulations such as adding prototypes and other arduino specific code references. It is the .cpp that is built, not the .ino. Therefore the toolchain you are using is actually looking at the wrong file.

Having said that, if the Arduino IDE is copying and leaving the original .ino files in the temp folder then Visual Micro should do the same. The reference you see to "{build.project_name}" should probably be "{build.project_name}.cpp". There might even be a build propery with the full "ino.cpp" code file name.  However, we will look at a solution same as arduino ide. 





  
Back to top
WWW  
IP Logged
 
principia
Junior Member
**
Offline


Posts: 19
Joined: Aug 31st, 2012
Re: Problem compiling for Z-Uno 2 - .ino not found
Reply #7 - Sep 26th, 2021 at 8:34am
Print Post  
Tim, thanks for your help and hints. I've now established that the zme_make executable and the python scripts that it calls generate the .ino file and not the Arduino IDE itself. I'll try and work out why the same does not happen on the VisualMicro project. I'll let you know what the results are and if there might be any VisualMicro problems.
  
Back to top
 
IP Logged
 
principia
Junior Member
**
Offline


Posts: 19
Joined: Aug 31st, 2012
Re: Problem compiling for Z-Uno 2 - .ino not found
Reply #8 - Sep 28th, 2021 at 2:59pm
Print Post  
Simon, Tim
Thanks for the update which I've installed on VS2019. I've built my "blink" test program with VS2019 and the Arduino IDE and compared the two ".hex" files. They are identical except for one record at the start which I assume is a timestamp or similar. The test project has an included .h file that references a .cpp - all correct with this too.

So it all looks good - thank you for your efforts. VisualMicro has been my preferred "Arduino" platform for many years, I really like it as a seasoned MS C++ and C# developer.

I will post on the Z-Uno forum to let those developers know that VisualMicro supports the Z-Uno G2.

Andy
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2142
Joined: Feb 13th, 2019
Re: Problem compiling for Z-Uno 2 - .ino not found
Reply #9 - Sep 29th, 2021 at 11:47am
Print Post  
Thanks for confirming, and we have re-released the VS2022 build of this version (21.09.17.2) to resolve a separate unrelated issue (in case you have both installed).
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

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