February 20, 2019 at 23:51 #23916
I am adding some automation scripts to my VisualGDB embedded project using the ‘Custom Step’ hooks in Properties. It appears that the %PATH% environment variable in Win10 is not being transmitted correctly to the child-process. It is restricting the ability of custom scripts to call programs/utilities that would normally be on the user’s path. I prepared a simple project to demonstrate this. The project calls a very simple script ‘printer.bat’ in the ‘C/C++–>Custom Step–>Custom post-compile tool’ that prints out the %PATH% variable and arguments to the console.
The script contains:
echo %0 %1
The built output of the LEDBlink with custom-step that results is as follows:C++123456789101>------ Build started: Project: EmbeddedProject1, Configuration: Debug VisualGDB ------1>LEDBlink.c1>1>%PATH%;C:\SysGCC\arm-eabi/bin1>"printer.bat" "LEDBlink.c"1>Linking ../VisualGDB/Debug/EmbeddedProject1...1>------------------- Memory utilization report -------------------1>Used FLASH: 772 bytes out of 256KB (0%)1>Used SRAM: 32 bytes out of 64KB (0%)========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ====================
Note that ‘printer.bat’ did not receive the %PATH% correctly. I am hoping this can be corrected and not an issue with underlying GCC toolchain. It looks like that at some point, some code does not expand %PATH% before executing the custom-step. Or maybe it has to do with that forward-slash that has snuck its way into the toolchain directory string. Any guidance would be appreciated, thanks.February 21, 2019 at 00:25 #23917
Looks like your support period has expired. Please renew your key here or let us know the updated email if you have purchased a different one and we will help you resolve this.May 13, 2022 at 00:09 #32628
I determined the same problem with the path variable (Windows 10, Visual Studio Pro 2019 16.11.14; VisualGDB 5.6R5 build 4569).
The follwing batch script will print a not expanded path variable. Seems to be a mistake by adding the compiler bin path to the path variable.
<span style=”text-decoration: underline;”>batch script:</span>
<span style=”text-decoration: underline;”>output:</span>
PATH=%PATH%;c:\sysgcc\arm-eabi/binMay 13, 2022 at 08:06 #32630
Unfortunately, it is hard to suggest anything specific based on the description you provided.
In order for us to provide any help with this, we need to be able to reproduce the problem on our side.
Please provide complete and detailed steps to reproduce the issue as described below:
- The steps should begin with launching Visual Studio. They should include every step necessary to create the project from scratch and reproduce the issue, as many issues are triggered by specific combination of project/target settings.
- The steps should include the expected/observed behavior, so that we could follow them on our side and compare the outcome.
You must be logged in to reply to this topic.