Error in running trace32 with command line

2019-08-18 21:59发布

I have a .cmm file which helps in debugging of Qcomm chipsets.

This file has a line : cd ../../../../../modem_proc

When I run this same cmm file using T32 GUI, it runs fine and does the work. But when I am trying to run the same file using windows command line using,

C:\T32\bin\windows64>t32mqdsp6.exe -c C:\T32\config.t32 -s D:\path\to\xxx.cmm

Following error is thrown in T32: syntax error in B::cd ../../../../../modem_proc

What am I missing here? I have no hands-on experience with T32 what-so-ever.

2条回答
ら.Afraid
2楼-- · 2019-08-18 22:21

The problem probably results from different working directories. Type

PRINT OS.PWD()

in the GUI and add it to the top of the script. I'd suspect they are different.

Don't use working directory relative paths, instead use paths relative to the script, e.g.

CD ~~~~/../../../../modem_proc

The four tilde (~) symbols mean "directory of the currently executed script". There's still a possible issue with this solution when using multiple GUIs and the intercom, but for most use-cases this should be OK.

查看更多
冷血范
3楼-- · 2019-08-18 22:24

When starting TRACE32 (up to build 99518) without option "-s", it starts a default script t32.cmm form your TRACE32 installation directory. But t32.cmm is not executed, when "-s" is used.

So probably your t32.cmm is changing your working directory. If so you can fix the issue by adding the line

DO ~~/t32.cmm 

to the top of your script xxx.cmm.

See also https://www.lauterbach.com/frames.html?help_autostart.html

The default working path is also set by the TRACE32 configuration file. That is the file passed with "-c". So if your are using a different configuration file than C:\T32\config.t32 when starting your TRACE32 GUI the normal way, then you should use that configuration file also when starting TRACE32 from the command line.

To get the path of the configuration file usually used, start TRACE32, execute command AREAand then command PRINT OS.PCF()

Furthermore dev15 is probably right here https://stackoverflow.com/a/53671657/4727717: Use paths relative to the PRACTICE script (cmm-file) by starting each path with four tildes.

查看更多
登录 后发表回答