I'm trying to use LOADTI to load and run a .out file for a C28x build
and pass it options on the command line. This is of course a C
project, and I've placed a 512-byte .args section into my linker
command file:
--args=512
.args : > SHARED, PAGE = 1
I modified main.js to emit the passed arguments (testEnv.argvArgs)
just before the call to loadProgram():
print("****listing arguments for debugging...");
n = 0;
while (n < testEnv.argvArgs.length)
{
print("testEnv.argvArgs[" + n + "] = " + testEnv.argvArgs[n]);
n++;
}
if (testEnv.argvArgs.length < 2)
{
debugSession.memory.loadProgram(outFile);
}
else
{
debugSession.memory.loadProgram(outFile, testEnv.argvArgs);
}
and have verified they are correct:
****listing arguments for debugging...
testEnv.argvArgs[0] = tst_PHY_cnvEncK4.out
testEnv.argvArgs[1] = -i
testEnv.argvArgs[2] = /cygdrive/y/dspsrdc_csa/emeter/dsp_c28x/sun/tst/tst_PHY_cnvEncK4/inp/Ramp.u16
testEnv.argvArgs[3] = -o
testEnv.argvArgs[4] = /cygdrive/y/dspsrdc_csa/emeter/dsp_c28x/sun/tst/tst_PHY_cnvEncK4/out/Ramp.u16
Done
Target running...
Then I had my .out program iterate through the command-line options
and print them out and they are out-of-order:
argc = 5
0: 1: tst_PHY_cnvEncK4.out
2: 3: -i
4:
So it appears there is something wrong in the loadProgram() method or one of its children.
Any help would be appreciated!
--Randy