I am using Lauterbach debugger (TRACE32 interface) on a 7447 processor. I need to load multiple files onto this processor which I do by running commands in the T32 GUI. Idea is to have a script do the job. One way is to call individual .cmm files in the startup.cmm. But this encounters a problem each time the GUI pops-up a dialog box which again requires a manual input. Can anyone tell me how to use command line interface on T32 to achieve the same?
3 Answers
A target program is normally loaded to your CPU's memory with the command
Data.LOAD.Elf myprog.elf
However TRACE32 deletes the symbol data base every time you use Data.LOAD.Elf before loading your new target program. To suppress that use option "/NoClear".
So if you want to load more than one ELF (target program) to your CPU's memory you should do it like this:
Data.LOAD.Elf myprog1.elf
Data.LOAD.Elf myprog2.elf /NoClear
Data.LOAD.Elf myprog3.elf /NoClear
If you use the Data.LOAD commands in one *.cmm script file or in several *.cmm script files is up to you, but I would put it one cript. A dialog box should not pop-up.

- 3,920
- 1
- 13
- 35
In case someone still needs an answer. My script to load elf file:
flash-elf.cmm:
local &fileName
entry &fileName
print "LOAD &fileName"
IF (!FILE.EXIST(&fileName))
(
PRINT "No elf file was flashed"
ENDDO
// T32 will stay opened
)
DO ~~/demo/powerpc/flash/mpc574xg.cmm "PREPAREONLY" // you should choose your cpu script
FLASH.ReProgram ALL
Data.LOAD.Elf &fileName
FLASH.ReProgram off
SYStem.ResetTarget
GO
QUIT
save it either in you home directory (or bin, or any directory that PATH points to) or even next to t32.config (where T32 installed, that's what I use)
now from CMD I call
t32mppc.exe -s ~~/flash-elf.cmm my.elf
Here's an answer on how to control T32 via TCP/UDP https://stackoverflow.com/a/39400777/4875690

- 99
- 6
I have faced the same problem and finally, I have figured out that the popup dialog box has been created from the PRACTICE Script (.cmm).
So just check out your PRACTICE Script (.cmm) and remove the code that is creating the popup dialog box.
The below code is an example for the code that creates Yes/No dialog box from a PRACTICE Script (.cmm)
LOCAL &result
DIALOG.YESNO "Program FLASH memory?"
ENTRY &result
IF &result==FALSE()
ENDDO
PRINT "User clicked Yes."
The above example is from here (https://www2.lauterbach.com/pdf/ide_ref.pdf).
For controlling trace32 via the command line, please check out this (controlling trace32 via command line).

- 43
- 5