This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I have a small hardware test program (using Unity) that uses putchar to output the results of the tests. I would like to run these tests from the command line (NOT inside CCS).
When I use the commands:
debugSession.memory.loadProgram("../Debug/DSP28346_BoardTest.out");
bpExit = debugSession.breakpoint.add("C$$EXIT")
debugSession.target.run()
everything works well and I can see all the putchar() outputs.
However when I load the program into flash (I am using the DSP28346 with external SPI flash which I can write to and boot from) and then run the commands:
debugSession.target.reset()
debugSession.symbol.add("../Debug/DSP28346_BoardTest.out")
// Set a breakpoint at the end of the bootrom code because exit() is in RAM which is only loaded by the bootrom
var bp0 = debugSession.breakpoint.add(0x3FFA1E)
debugSession.target.run()
bpExit = debugSession.breakpoint.add("C$$EXIT")
debugSession.target.run()
This also runs to completion correctly however I see NONE of the cio/putchar output.
I have tried getStdOut(), getStdErr() which return empty strings and beginCIOLogging() which produced an empty log file.
Any info as to how to get it to work would be great.
Thanks
PS: I am running CCS 4.2.4.00033 on Vista using a Signum Systems JTAG-Jet emulator on the TMS320C28346 with SPI flash.
Hello,
Note that C28x only has 2 hardware breakpoints. When using C/IO, the debugger needs to be able to set two breakpoints: one on C$$EXIT (which you did), and one on C$$IO$$. Using any other breakpoints will prevent the debugger from setting these breakpoints and C/IO will fail. There are a lot of hidden breakpoints used(like at main for "run to main", any kind of stepping, trying to halt a running program, etc). Hence it is not recommended to us C/IO for code in flash.
Thanks
ki
Thanks for the quick reply.
Because the 28346 has no flash of its own my entire code is copied out of the external flash using the SPI Boot option (ie the code is booted from flash but all of it is run in ram). As far as I can see this process is completed (ie all code is copied into ram) by the time the boot rom is completed (line 177 of Init_Boot.asm, http://www-s.ti.com/sc/techlit/sprufn5.zip, which is then address 0x3FFA1E in the bootrom).
Therefore I have set a breakpoint at this point (0x3FFA1E) using:
debugSession.breakpoint.add(0x3FFA1E)
I run to this point and THEN set the other breakpoints (exit(), C$$EXIT and C$$IO$$). There is still no cio output after booting from flash and running from ram. It seems that I need to somehow enable the dss to actually check for the cio at these breakpoints.