Community
Participate
Working Groups
Created attachment 208886 [details] test case The following code prints "Hello World" on Windows, but fails on Linux with the error message: Couldn't open file "subdir/prog.out" var base = xdc.loadPackage("ti.platforms.sim64Pxx").packageBase; var os = environment["xdc.hostOS"]; var status = {}; xdc.exec(base + os + "/kelvin -quiet -mem_ignore \"subdir/prog.out\"", {}, status); print(status.output); The test package is attached.
- fixed in xdc-y15 I added a new code to xdc.services.global.Host.exec, which removes all quotes before supplying the command line arguments to Java's ProcessBuilder. ProcessBuilder does not use a shell to execute commands, so the quotes are not needed, and can cause errors as in the attached test case.
verified via a simple xs script, host.xs (see below): [sanblnx02 744] cat host.xs var tools = environment["xdc.rootDir"]; var status = {}; xdc.exec(tools + '/bin/printargs this "is a" test', {}, status); print(status.output); [sanblnx02 745] $TOOLS/vendors/xdc/xdctools_3_23_00_33//Linux/xs -f host.xs /db/toolsrc/library/tools/vendors/xdc/xdctools_3_23_00_33//Linux/bin/printargs this "is a" test [sanblnx02 746] $TOOLS/vendors/xdc/xdctools_3_23_01_39_eng/Linux/xs -f host.xs /db/toolsrc/library/tools/vendors/xdc/xdctools_3_23_01_39_eng/Linux/bin/printargs this is a test [sanblnx02 747]
Unfortunately there does not seem to be a way to pass "s in an argument to a command.
xdctools 3.23.05 GA is available from here: http://www.sanb.design.ti.com/tisb_releases/XDCtools/3_23_05_61/