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
Very Hot Topic (More than 25 Replies) VMBuild does not find board when run as Jenkins job (Read 1839 times)
revvers
Junior Member
**
Offline


Posts: 30
Joined: Sep 11th, 2023
Re: VMBuild does not find board when run as Jenkins job
Reply #20 - Oct 28th, 2024 at 9:03pm
Print Post  
Quote:
What is in your c:\arduino15 folder?

See reply #6: https://www.visualmicro.com/forums/YaBB.pl?num=1728083366/6#6
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12166
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMBuild does not find board when run as Jenkins job
Reply #21 - Oct 30th, 2024 at 12:02am
Print Post  
It sounds like you have at some point installed the board but subsequently moved it manually. However, you needed to move the entire Arduin15 folder. 

In Visual Micro IDE you should be able to install any board packages you need via Board Manager.  After that you should find an Arduino15 folder under "c:\users\[name]\appdata\local\arduino15"

  
Back to top
IP Logged
 
revvers
Junior Member
**
Offline


Posts: 30
Joined: Sep 11th, 2023
Re: VMBuild does not find board when run as Jenkins job
Reply #22 - Oct 30th, 2024 at 9:53pm
Print Post  
  • Closed VS
  • Deleted %localappdata%\arduino15 and D:\Arduino15
  • Opened VS (no boards installed)
    Optional physical folder for downloaded board packages set to D:\Arduino15
  • Installed Arduino UNO R4 Minima via Board Manager successfully
  • Both %localappdata%\arduino15 and D:\Arduino15 were created
    %localappdata%\arduino15 has empty libraries folder
    D:\Arduino15 has board data
  • Project builds successfully in VS
  • VMBuilder fails: Program not found opening settings

Did the same again but cleared optional physical folder and got same results.

Code
Select All
"C:\Program Files\VMicro\VMBuilder\VMBuild.exe" -builder.project_path="PumpControllerFirmware.vcxproj" -builder.build=true -builder.close=true -builder.closeonerror=true
The operation failed with exception: Visual Micro: Program not found opening settings
.ino
System.Exception: Visual Micro: Program not found opening settings
.ino
   at Visual.Micro.ProgramConfiguration.ProgramSettingsReader..ctor(String programFullName, String _SettingsExt)
   at Visual.Micro.ProgramConfiguration.ProgramSettings..ctor(String programFullName, String _SettingsExt)
   at VMBuild.VMBuilder.BuilderWrapperCreate(VMBuilderProject oProject)
   at VMBuild.VMBuilder.RunBuilder()
   at VMBuild.VMBuilder..ctor(VMBuildArgs _vmArgs)
   at VMBuild.Program.Main(String[] args)

"C:\Program Files\VMicro\VMBuilder\VMBuild.exe" -builder.project_path="PumpControllerFirmware.vcxproj" -builder.build=true -builder.close=true -builder.closeonerror=true -builder.packages_path="D:\Arduino15"
The operation failed with exception: Visual Micro: Program not found opening settings
.ino
System.Exception: Visual Micro: Program not found opening settings
.ino
   at Visual.Micro.ProgramConfiguration.ProgramSettingsReader..ctor(String programFullName, String _SettingsExt)
   at Visual.Micro.ProgramConfiguration.ProgramSettings..ctor(String programFullName, String _SettingsExt)
   at VMBuild.VMBuilder.BuilderWrapperCreate(VMBuilderProject oProject)
   at VMBuild.VMBuilder.RunBuilder()
   at VMBuild.VMBuilder..ctor(VMBuildArgs _vmArgs)
   at VMBuild.Program.Main(String[] args)
F:\JenkinsWorkspaces\OrgoFlo96_Nightly_Build\PumpControllerFirmware> 

« Last Edit: Oct 30th, 2024 at 10:24pm by revvers »  

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


Posts: 12166
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMBuild does not find board when run as Jenkins job
Reply #23 - Oct 30th, 2024 at 11:37pm
Print Post  
Thanks for the clear info. Does the cli run under a different user account? What would its users\[username] be?
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12166
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMBuild does not find board when run as Jenkins job
Reply #24 - Oct 31st, 2024 at 1:25am
Print Post  
You will see from the previous post that the issue surrounds the account running the builder process.

To make life easier we have updated the builder to enable it to support the "portability" options that ide projects already support.

The portability option allows a solution (and all the projects within it) to override all usual arduino file locations.

This example will allow the project (solution) in the IDE to also use the new location. The builder doesn't need the folder to be below the solution but it makes life easier if the ide does same:-

  • Delete your c:\arduino15 folder to avoid confusion in this discussion.
  • Where ever your .sln is located copy/move the "users\[name]\appdata\local\arduino15" folder to below it.
  • Rename the arduino15 folder to "arduino-portable"
  • Using the latest VMBuilder is passed these two paths

    • -builder.project_path="PATH TO PROJ.vcxproj" -builder.build=true  -
    • builder.portable_path="PATH TO arduino-portable folder"


Note about libraries: with the portable option, libraries will be located in "arduino-portable\sketchbook\libraries" instead of "mydocuments\arduino\libraries"


fyi: More info when using a folder called arduino-portable below a solution. 

How-to-Encapsulate-a-Board-Package-with-a-Solution.aspx
« Last Edit: Oct 31st, 2024 at 2:01am by Tim@Visual Micro »  
Back to top
IP Logged
 
revvers
Junior Member
**
Offline


Posts: 30
Joined: Sep 11th, 2023
Re: VMBuild does not find board when run as Jenkins job
Reply #25 - Nov 27th, 2024 at 10:32pm
Print Post  
I'm running these current tests using my personal account. I want to make sure it works "by hand" before I script it in Jenkins. Therefore, it does not appear to be an account privilege or related issue.

I'm using the latest VMBuilder: VMBuilder_2024_0926_4.zip

I did as you suggested and got the same result:

Code
Select All
 Directory of C:\Users\...\PumpController\PumpControllerFirmware

11/27/2024  05:15 PM    <DIR>          .
11/27/2024  05:15 PM    <DIR>          ..
11/27/2024  04:50 PM    <DIR>          arduino-portable
10/22/2024  07:48 PM    <DIR>          Libraries
10/22/2024  07:48 PM            51,233 PumpControllerFirmware.ino
10/30/2024  05:17 PM           224,356 PumpControllerFirmware.ino.MINIMA.bin
10/24/2024  02:59 PM             5,809 PumpControllerFirmware.sln
10/30/2024  05:17 PM            74,386 PumpControllerFirmware.vcxproj
10/23/2024  07:13 PM             1,627 PumpControllerFirmware.vcxproj.filters
10/22/2024  07:49 PM    <DIR>          __vm
               5 File(s)        357,411 bytes
               5 Dir(s)  11,742,420,992 bytes free

C:\Users\...\PumpController\PumpControllerFirmware>"C:\Program Files\VMicro\VMBuilder\VMBuild.exe" -builder.project_path="PumpControllerFirmware.vcxproj" -builder.portable_path="arduino-portable" -builder.build=true
The operation failed with exception: Visual Micro: Program not found opening settings
.ino
System.Exception: Visual Micro: Program not found opening settings
.ino
   at Visual.Micro.ProgramConfiguration.ProgramSettingsReader..ctor(String programFullName, String _SettingsExt)
   at Visual.Micro.ProgramConfiguration.ProgramSettings..ctor(String programFullName, String _SettingsExt)
   at VMBuild.VMBuilder.BuilderWrapperCreate(VMBuilderProject oProject)
   at VMBuild.VMBuilder.RunBuilder()
   at VMBuild.VMBuilder..ctor(VMBuildArgs _vmArgs)
   at VMBuild.Program.Main(String[] args)Press any key to continue. 


« Last Edit: Nov 27th, 2024 at 10:39pm by revvers »  

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


Posts: 2495
Joined: Feb 13th, 2019
Re: VMBuild does not find board when run as Jenkins job
Reply #26 - Nov 29th, 2024 at 1:06pm
Print Post  
Thanks for the detail and the update.

Can you confirm the arduino-portable\package_index.json file exists?
  
Back to top
IP Logged
 
revvers
Junior Member
**
Offline


Posts: 30
Joined: Sep 11th, 2023
Re: VMBuild does not find board when run as Jenkins job
Reply #27 - Dec 6th, 2024 at 9:12pm
Print Post  
Simon@Visual Micro wrote on Nov 29th, 2024 at 1:06pm:
Thanks for the detail and the update.

Can you confirm the arduino-portable\package_index.json file exists?


Yes. Confirmed. (forgive the delay)
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2495
Joined: Feb 13th, 2019
Re: VMBuild does not find board when run as Jenkins job
Reply #28 - Dec 12th, 2024 at 2:24pm
Print Post  
Thanks for the update, and apologies for the delay in replying here.

In the command line, can you change the -builder.project_path to be the fully qualified path to the VCXPROJ File?
  
Back to top
IP Logged
 
revvers
Junior Member
**
Offline


Posts: 30
Joined: Sep 11th, 2023
Re: VMBuild does not find board when run as Jenkins job
Reply #29 - Dec 12th, 2024 at 8:15pm
Print Post  
Bingo! At least it started to compile. However, it is complaining about exceeding path length, even though it is only 121 characters, by my count. Maybe internally it is combining paths? I may be able to make this work. (Somehow the copy/paste is not getting everything, but you get the idea...)

Code
Select All
"C:\Program Files\VMicro\VMBuilder\VMBuild.exe"
-builder.project_path="C:\Users\...\PumpControllerFirmware.vcxproj" -builder.build=true
Compiling 'PumpControllerFirmware' for 'Arduino UNO R4 Minima (minima)'
The operation failed with exception: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
   at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.InternalGetDirectoryName(String path)
   at System.IO.FileInfo.get_DirectoryName()
   at Visual.Micro.MiroAppAPI.SketchBuilder._build(String lbuildPath, Boolean verbose, Boolean PreProcessOnly)
   at Visual.Micro.MiroAppAPI.SketchBuilder._build(Boolean verbose)
   at Visual.Micro.MiroAppAPI.SketchBuilder.build(Boolean verbose)
   at VMBuild.VMBuilder._CompileDo(VMBuilderProject oProject, Boolean isRebuild)
   at VMBuild.VMBuilder.RunBuilder()
   at VMBuild.VMBuilder..ctor(VMBuildArgs _vmArgs)
   at VMBuild.Program.Main(String[] args)Press any key to continue. 

« Last Edit: Dec 12th, 2024 at 11:26pm by revvers »  
Back to top
 
IP Logged
 
revvers
Junior Member
**
Offline


Posts: 30
Joined: Sep 11th, 2023
Re: VMBuild does not find board when run as Jenkins job
Reply #30 - Dec 12th, 2024 at 11:12pm
Print Post  
Worked! I think the fully qualified project path may have been the issue all along.

Thank you so much for the help. Let's hope it works in the Jenkins job.

Code
Select All
"C:\Program Files\VMicro\VMBuilder\VMBuild.exe"
-builder.project_path="F:\JenkinsWorkspaces\...\PumpControllerFirmware.vcxproj" -builder.build=true -builder.clean=true -builder.rebuild=true
Project PumpControllerFirmware temp build files have been removed
Compiling 'PumpControllerFirmware' for 'Arduino UNO R4 Minima (minima)'
  Using previously compiled file: \Release\core\cmb_fault.S.o

Program size: 223448 bytes (used 85% of a 262144 byte maximum) (419.31 secs)
Minimum Memory Usage: 12096 bytes (37% of a 32768 byte maximum)

End
Press any key to continue. 

  
Back to top
 
IP Logged
 
revvers
Junior Member
**
Offline


Posts: 30
Joined: Sep 11th, 2023
Re: VMBuild does not find board when run as Jenkins job
Reply #31 - Dec 13th, 2024 at 1:15am
Print Post  
So close...
Code
Select All
robocopy "C:\Users\...\AppData\Local\arduino15" "%WORKSPACE%\arduino-portable" /S 


Code
Select All
"C:\Program Files\VMicro\VMBuilder\VMBuild.exe" -builder.project_path="F:\JenkinsWorkspaces\...\PumpControllerFirmware.vcxproj"
-builder.portable_path="F:\JenkinsWorkspaces\...\arduino-portable"
-builder.build=true -builder.close=true -builder.closeonerror=true -builder.clean=true -builder.rebuild=true
-builder.output_directory="F:\JenkinsWorkspaces\...\dist"
Project PumpControllerFirmware temp build files have been removed
Compiling 'PumpControllerFirmware' for 'Arduino UNO R4 Minima (minima)'

cc\7-2017q4\arm-none-eabi\include\c++\7.2.1\stdlib.h:In file included from
1.2.0\cores\arduino\api\Interrupts.h:from
1.2.0\cores\arduino\api\ArduinoAPI.h:from
1.2.0\cores\arduino\arduino.h:from
F:\JenkinsWorkspaces\...\PumpControllerFirmware.ino:from

cc\7-2017q4\arm-none-eabi\include\c++\7.2.1\cstdlib:fatal error  bits/c++config.h  No such file or directory
:#include <bits/c++config.h>
:^~~~~~~~~~~~~~~~~~


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

« Last Edit: Dec 13th, 2024 at 8:05pm by revvers »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2495
Joined: Feb 13th, 2019
Re: VMBuild does not find board when run as Jenkins job
Reply #32 - Dec 13th, 2024 at 2:48pm
Print Post  
Thanks for the update, and glad there is progress...

Can you confirm the full path to the project?

(I suspect the path to the project folder is making the path to the core files too long for the underlying compiler statement as they are within the arduino-portable folder).
  
Back to top
IP Logged
 
revvers
Junior Member
**
Offline


Posts: 30
Joined: Sep 11th, 2023
Re: VMBuild does not find board when run as Jenkins job
Reply #33 - Dec 13th, 2024 at 8:05pm
Print Post  
I don't have the "path length issue" in the Jenkins job (shorter fully qualified paths) but I get a missing include file error during 'Deep Search'. I copy arduino15 to arduino-portable before building.

See: https://www.visualmicro.com/forums/YaBB.pl?num=1728083366/31#31
« Last Edit: Dec 13th, 2024 at 8:06pm by revvers »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2495
Joined: Feb 13th, 2019
Re: VMBuild does not find board when run as Jenkins job
Reply #34 - Dec 16th, 2024 at 10:29am
Print Post  
Thanks for the update, can you confirm the full path to the vcxproj file so we can replicate the same setup?

The suspected path length issue doesn't present itself when installing/copying the files around in windows, but seems to be a problem for the paths gcc uses internally.
  
Back to top
IP Logged
 
revvers
Junior Member
**
Offline


Posts: 30
Joined: Sep 11th, 2023
Re: VMBuild does not find board when run as Jenkins job
Reply #35 - Dec 16th, 2024 at 9:35pm
Print Post  
Code
Select All
builder.project_path="F:\JenkinsWorkspaces\xxxxxxxxx_Nightly_Build\
PumpControllerFirmware\PumpControllerFirmware.vcxproj" 



My comment before about copy/paste is that I don't seem to be able to enter long strings without spaces into this forum post. It seems to be truncating them. So above, I put a return in the middle so you can at least see the entire string.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2495
Joined: Feb 13th, 2019
Re: VMBuild does not find board when run as Jenkins job
Reply #36 - Dec 17th, 2024 at 6:49pm
Print Post  
Thanks for clarifying, and we are looking into why the forum struggles with some paths.

From some more testing it seems that the location of the arduino-portable folder is essentially too deep down the file structure.

If I use a path thats 48 chars or less, with the arduino-portable folder beneath it, then it works, otherwise I get the same c==config error.

e.g C:\ArduinoIDE\JenkinsWorkspaces\CompileTimeTest -- Works
C:\ArduinoIDE\JenkinsWorkspaces\CompileTimeTest1 -- Fails

On a separate point it looks like your vcxproj and sln files are at the same level, which currently means the whole arduino-portable folder is being cloned to the build folder during build.  We will get this fixed, however it is often best to have the project in its own folder below the solution, and keeps multi-project solutions much cleaner.

e.g.
PumpControllerFirmware\PumpControllerFirmware.sln
PumpControllerFirmware\arduino-portable\
PumpControllerFirmware\PumpControllerFirmware\PumpControllerFirmware.vcxproj
PumpControllerFirmware\PumpControllerFirmware\PumpControllerFirmware.ino

That is as simple as creating a new folder "PumpControllerFirmware" in the projects current folder, and moving everything into it except the .vs folder, arduino-portable folder, and the sln file.  Then the sln file can be edited in notepad to amend the path to the vcxproj file.

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