Simon@Visual Micro wrote on Sep 3
rd, 2024 at 8:54am:
Thanks for the report.
The {vm.runtime.build.intermediate_output_path} wiill work if you Enable the below option, we will check why this behaviour has changed:
vMicro > Compiler > Always Copy Build Output to Intermediate}
If you add the use_shell_execute=true property for your hook:
recipe.hooks.postbuild.1.use_shell_execute=true
And remove the "cmd.exe /c" from your hook it should mean the full INO filename is passed through to your program.
Does this get it working again?
I enabled 'vMicro > Compiler > Always Copy Build Output to Intermediate'
I added the recipe.hooks.postbuild.1.use_shell_execute=true line and changed the 'preupload.1.pattern to
'recipe.hooks.deploy.preupload.1.pattern="c:\Program Files (x86)\teraterm\ttpmacro.exe" /v "{build.project_path}\TeensyOTA1.ttl" "{vm.runtime.build.intermediate_output_path}" {serial.port} {build.project_name}'
Now my board.txt file is:
# 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}
#12/13/22 per this thread (
https://www.visualmicro.com/forums/YaBB.pl?num=1670959583/3#3), now using 'intermediate_output_path' vs 'final_output_path'
#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.intermediate_output_path}" {serial.port} {build.project_name}
#09/03/24 added per response to my post regarding {vm.runtime.build.intermediate_output_path} not being replaced with actual path
recipe.hooks.deploy.preupload.1.pattern="c:\Program Files (x86)\teraterm\ttpmacro.exe" /v "{build.project_path}\TeensyOTA1.ttl" "{vm.runtime.build.intermediate_output_path}" {serial.port} {build.project_name}
recipe.hooks.postbuild.1.use_shell_execute=true
Then I compiled my code and it all worked properly - yay!!
Thanks for the help. But now I'm curious as to why it works on my old system and not on the new one. Looking at the vMicro versions, I have 2024.722.2208 on my new PC, and 2024.620.2203 on my old PC (both these version numbers were taken from the 'Extensions->Manage Extensions->Arduino IDE for Visual Studio 2022' selection). I did note that on my old PC an update is offered for VM - could that be the reason it still works on my old PC?
Thanks again for getting me back in business!
Frank