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
Normal Topic Latest VM update changes 'Release' folder target? (Read 1299 times)
FrankP
Senior Member
****
Offline


Posts: 251
Joined: Oct 19th, 2011
Latest VM update changes 'Release' folder target?
Dec 13th, 2022 at 7:26pm
Print Post  
I use the 'boards.txt' option to run a post-build macro for over-the-air (OTA) programming of a Teensy 3.5.  The macro connects to the Teensy over an RF serial connection, and sends the .hex file to a updater routine running on the Teensy.  To make this work, the macro expects the .HEX file to be located in the 'C:\Users\Frank\Documents\Arduino\WallE3_AnomalyRecovery_V2\Release' folder.  

This has worked well for me for the last year or so, but it started failing when I tried it on a newly-created project, using VM 2.2022.1128-4.  Now the .HEX file appears in the 'C:\Users\Frank\Documents\Arduino\DistanceReportingProb_V1\obj\ARM\Release' folder.  

Before I start editing my macro to point to the new location, I'm wondering if the above change is something to do with the update, or some screw-up on my part.  Looking at the Configuration manager for the 'release' configuration, I see the platform has changed from 'x86' to 'ARM' and I can see in the verbose compile output that the 'new' configuration does indeed put release files in the .\obj\ARM\Release' folder. 

Am I doing something wrong here, or is this the way it is supposed to be going forward?

I ran out of attachment space, so I sent the verbose compile output via email, with a link to this post.
« Last Edit: Dec 13th, 2022 at 7:34pm by FrankP »  

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


Posts: 251
Joined: Oct 19th, 2011
Re: Latest VM update changes 'Release' folder target?
Reply #1 - Dec 13th, 2022 at 8:11pm
Print Post  
Here's my 'boards.txt' file:

Code
Select All
# Teensy OTA Demo build property overrides
# 10/05/21 gfp - trying to run a post-build command
# 10/15/21 gfp - change to use Tera Term macro vs custom C# program
# 10/30/21 gfp - change to use {build.project_path}\TeensyOTA1.ttl instead of hard-coded path
# 10/31/21 gfp - rev to use 'recipe.hooks.deploy.preupload' vs 'recipe.hooks.postbuild' so only runs on F5
# 11/01/21 gfp - added enclosing "s as workaround for Visual Micro parsing problem

#02/15/22 double sets of " marks no longer required
#recipe.hooks.deploy.preupload.1.pattern=cmd.exe /c ""c:\Program Files (x86)\teraterm\ttpmacro.exe" /v "{build.project_path}\TeensyOTA1.ttl" "{vm.runtime.build.final_output_path}" {serial.port} {build.project_name}"
recipe.hooks.deploy.preupload.1.pattern=cmd.exe /c "c:\Program Files (x86)\teraterm\ttpmacro.exe" /v "{build.project_path}\TeensyOTA1.ttl" "{vm.runtime.build.final_output_path}" {serial.port} {build.project_name} 



which shows that my 'TeensyOAT1.ttl' file takes '{vm.runtime.build.final_output_path}' as an input argument.  In the verbose compile output I see:

Code
Select All
Line  557: rtingProb_V1\bin\ARM\Release\ 



but the actual output target is 'C:\Users\Frank\Documents\Arduino\DistanceReportingProb_V1\obj\ARM\Release\'.  One says 'bin' and the other one says 'obj'.  Is this something I did wrong, or a VM issue?

Frank



  
Back to top
 
IP Logged
 
FrankP
Senior Member
****
Offline


Posts: 251
Joined: Oct 19th, 2011
Re: Latest VM update changes 'Release' folder target?
Reply #2 - Dec 13th, 2022 at 9:11pm
Print Post  
I manually copied the 'obj' file and renamed it to 'bin'.  Now my over-the-air (OTA) post-compile macro works fine. So, it appears that VM has a problem somewhere - either it should be saving the 'release' output to 'bin' or the build property should refer to 'obj' rather than 'bin'.

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Latest VM update changes 'Release' folder target?
Reply #3 - Dec 13th, 2022 at 9:32pm
Print Post  
I suspect that the feature you are using to copy the compiler output locally after a build is "vMicro>Compiler>Always Copy Build Output To Intermediate"

The build always happens elsewhere and is only copied if you enable that feature. Otherwise the hex won't be anywhere below the project.

The "Intermediate Folder" relates to the "Intermediate Directory" property shown on "right click project name > properties > general"

Often the property value looks like this
$(ProjectDir)obj\$(Platform)\$(Configuration)\

You are right in as much as these properties can be set for a specific platform and configuration or for all. Notice the "Configurations" drop down list on the project properties page contains an "All Configurations" selection, allowing you to set your desired output path for all configurations.

Visual Micro doesn't mind which platform or configuration you use. The selection only affects intellisense and with newer project types ARM or ARM64 is best.

If you have upgraded your project to the new format (for better intellisense) then this will have altered and it is possible the Intermediate Directory has default to a different place.

Hopefully you find this expains things and how you can change it.
  
Back to top
IP Logged
 
FrankP
Senior Member
****
Offline


Posts: 251
Joined: Oct 19th, 2011
Re: Latest VM update changes 'Release' folder target?
Reply #4 - Dec 13th, 2022 at 10:12pm
Print Post  
Thanks for the explanation, but I think all it did was make my headache worse  Tongue

I have attached screenshots of the 'old' and 'new' configuration setup.  As you can see, the default (I almost never change the defaults - I'm too dumb too figure out what is better or worse, and my memory is too bad to remember what I did six hours ago, let alone six months/years!) configuration path in the  projects before this latest upgrade 

'output' =  $(SolutionDir)$(Configuration)\ 
'intermediate' = $(Configuration)\

But in the new setup, I see

'output' =  $(ProjectDir)bin\$(Platform)\$(Configuration)\
'intermediate' = $(ProjectDir)obj\$(Platform)\$(Configuration)\

OK, so I see there is a anceReportingProb_V1\obj\ARM\Release\' in the verbose compile build properties output, so I guess I can change my 'boards.txt' file to use it instead of 'vm.runtime.build.final_output_path' as the controlling parameter for my macro file.

In the verbose output from the new project I see:

Code
Select All
	Line  554: nceReportingProb_V1\obj\ARM\Release\
	Line  555: vm.runtime.build.intermediate_output_enabled=false
	Line 1180: # Copy build result to 'Project>Property Pages>Intermediate Directory' 



and in the old project I see:

Code
Select All
	Line  555: 	Line  555: 3_AnomalyRecovery_V2\Release\
	Line  556: vm.runtime.build.intermediate_output_enabled=false
	Line 1379: # Copy build result to 'Project>Property Pages>Intermediate Directory'=C:\Users\Frank\Documents\Arduino\WallE3_AnomalyRecovery_V2\Release\
	Line  556: vm.runtime.build.intermediate_output_enabled=false
	Line 1379: # Copy build result to 'Project>Property Pages>Intermediate Directory' 



Interestingly, both these sets show that the copy to intermediate option is 'disabled', even though the file copy is happening in both cases - ????

However, it does look like the 'vm.runtime.build.intermediate_output_path' build output parameter does point to the proper place in both the new and old setups:

old configuration: C:\Users\Frank\Documents\Arduino\WallE3_AnomalyRecovery_V2\Release\' compiler output
new configuration: C:\Users\Frank\Documents\Arduino\DistanceReportingProb_V1\obj\ARM\Release\


Yep - worked fine on new project, and on an older project, using the same 'boards.txt' file for both - YAY!!

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint