Last active
September 2, 2024 02:11
-
-
Save patois/4d32ac437f32682b49f3480569ae0ec6 to your computer and use it in GitHub Desktop.
Configuration files for debugging Tricore Binaries with IDA 7.4 and TRACE32 Simulator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install TRACE32 for Tricore from https://www.lauterbach.com/frames.html?download_demo.html | |
2. place ida.cmm into the TRACE32 installation folder | |
3. overwrite config.t32 found in the TRACE32 installation folder with the one provided | |
4. change the "SYS" variable of this config.t32 file to point to your TRACE32 install folder | |
5. edit %IDADIR%\cfg\gdb_arch.cfg as described in the provided "gdb_arch.cfg" file | |
6. open the file "demo.elf" from the TRACE32 installation folder with IDA | |
7. In IDA, go to "Debugger -> Select debugger", pick "Remote GDB debugger" | |
8. Go to "Debugger -> Debugger options -> Set specific options", tick the | |
"Run a program..." checkbox, then click "choose a configuration" (which should fill | |
the "command line" edit field) and confirm. | |
9. Go to "Debugger -> Process options...", fill the hostname (127.0.0.1) and port (30000) | |
text fields | |
10. "Start process" (F9) or "Run to cursor" (F4) will start TRACE32 in the background and | |
will allow the file loaded into IDA to be debugged using the TRACE32 simulator's GDB | |
backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Modification of default | |
; TRACE32 configuration file. | |
; | |
; - enables GDB Backend for Trace32 | |
; on TCP port 30000. | |
; - Please adjust "SYS" variable to | |
; point to your TRACE32 path | |
; ========================== | |
; Environment Variables | |
OS= | |
ID=T32_SIMTC | |
SYS=C:\tools\simtc | |
; Connection to Host | |
PBI=SIM | |
; Screen Settings | |
SCREEN= | |
HEADER=TRACE32 TriCore Instruction Set Simulator | |
; Printer Settings | |
PRINTER=WINDOWS | |
GDB=NETASSIST | |
PACKLEN=1024 | |
PORT=30000 | |
PROTOCOL=TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; add the following line to the ".tc1766" section of your gdb_arch.cfg configuration file | |
; which is found within %IDADIR%\cfg\ - also, adjust path to TRACE32: | |
cmdline c:\tools\simtc\t32mtc.exe -c c:\tools\simtc\config.t32 -s c:\tools\simtc\ida.cmm "%i" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; file is to be placed into TRACE32 for Tricore folder | |
; (trial version: https://www.lauterbach.com/frames.html?download_demo.html) | |
LOCAL &arg1 | |
;======================================================================== | |
; initialize and start the debugger | |
RESet | |
SYStem.CPU tc397xe | |
SYStem.Up | |
;======================================================================== | |
; load demo program | |
&arg1=PRACTICE.ARG(0) | |
Data.LOAD.ELF &arg1 | |
; open some windows | |
WinCLEAR | |
Register.view | |
List.asm | |
ENDDO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment