T32: FailT32 support for Cortex-M3
Currently working: - Connect/Disconnect, Read CPU info - CMM Script generation and T32 startup via cmake (make runt32) - Read/Write Register, Read Program Pointer - Read/Write Memory - Single Breakpoint - Setting Memory Breakpoint TODO: - Fix mock aspect for T32_GetRam. - Fix Thumb2 bit in function addresses from ELFReader - Evaluate memory breakpoint hit
This commit is contained in:
@ -1,11 +1,36 @@
|
||||
|
||||
## Setup T32 target architecture for startup scripts
|
||||
|
||||
if(EXISTS $ENV{T32SYS})
|
||||
SET(T32_SYS $ENV{T32SYS})
|
||||
message(STATUS "[FAIL*] T32 base directory: T32SYS=${T32_SYS}")
|
||||
else()
|
||||
message(FATAL_ERROR "Please set env variable T32SYS to a valid T32 installation base directory.")
|
||||
endif()
|
||||
|
||||
if(EXISTS $ENV{FAIL_ELF_PATH})
|
||||
SET(T32_ELF_PATH $ENV{FAIL_ELF_PATH})
|
||||
message(STATUS "[FAIL*] T32 ELF under test: ${T32_ELF_PATH}")
|
||||
else()
|
||||
message(FATAL_ERROR "Please set the FAIL_ELF_PATH enviroment variable to the binary under test.")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/cmm)
|
||||
configure_file(config.t32.usb.in ${PROJECT_BINARY_DIR}/cmm/config.t32.usb)
|
||||
configure_file(t32.cmm ${PROJECT_BINARY_DIR}/cmm/t32.cmm COPYONLY)
|
||||
|
||||
set(T32_ARCHITECTURE armm3 CACHE PATH "Setup target architecture for default cmm scripts (currently only armm3)")
|
||||
message(STATUS "[FAIL*] T32 Architecture: ${T32_ARCHITECTURE}")
|
||||
set(T32_EXE "${T32_SYS}/bin/pc_linux/" CACHE INTERNAL "") # TODO: set pc_linux64 for 64 bit systems
|
||||
add_subdirectory(${T32_ARCHITECTURE})
|
||||
|
||||
message(STATUS "[FAIL*] T32 CPU name: ${T32_CPUNAME}")
|
||||
|
||||
message(STATUS "[FAIL*] T32 Architecture: ${T32_ARCHITECTURE}")
|
||||
message(STATUS "[FAIL*] T32 CPU name: ${T32_CPUNAME}")
|
||||
message(STATUS "[FAIL*] T32 Executable: ${T32_EXE}")
|
||||
|
||||
add_custom_target(runt32
|
||||
COMMAND T32CONFIG=${PROJECT_BINARY_DIR}/cmm/config.t32.usb ${T32_EXE} &
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/cmm"
|
||||
COMMENT "Starting Lauterbach."
|
||||
)
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
### Configure cmm Scripts for ARM Cortex-M3
|
||||
|
||||
if(EXISTS $ENV{T32SYS})
|
||||
SET(T32_SYS $ENV{T32SYS})
|
||||
else(EXISTS $ENV{KESOROOTPATH})
|
||||
message(FATAL_ERROR "Please set env variable T32SYS to valid T32 installation base directory.")
|
||||
endif(EXISTS $ENV{T32SYS})
|
||||
|
||||
set(T32_EXE "${T32_EXE}/t32marm" CACHE INTERNAL "")
|
||||
set(T32_CPUNAME STM32F103RG CACHE PATH "CPU name for SYSTEM.CPU call. (e.g. STM32F103RG)")
|
||||
configure_file(armm3cfg.cmm.in ${PROJECT_BINARY_DIR}/cmm/armm3cfg.cmm)
|
||||
configure_file(init.cmm ${PROJECT_BINARY_DIR}/cmm/init.cmm COPYONLY)
|
||||
configure_file(loadelf.cmm ${PROJECT_BINARY_DIR}/cmm/loadelf.cmm COPYONLY)
|
||||
configure_file(t32term.cmm ${PROJECT_BINARY_DIR}/cmm/t32term.cmm COPYONLY)
|
||||
|
||||
|
||||
|
||||
58
debuggers/t32/cmm/config.t32.usb.in
Normal file
58
debuggers/t32/cmm/config.t32.usb.in
Normal file
@ -0,0 +1,58 @@
|
||||
;
|
||||
;please refer the installation guide for more information
|
||||
;about your configuration
|
||||
;
|
||||
;
|
||||
;uncomment the following 3 lines if you don't use already environment variables
|
||||
;changes to the actual directory names are necessary
|
||||
;OS=
|
||||
;SYS=/opt/t32
|
||||
;TMP=/usr/tmp
|
||||
|
||||
;
|
||||
;uncomment the following 4 lines if you use PowerTrace, PowerNexus or PowerDebugEthernet
|
||||
;with onhost driver executable (t32m*) via ethernet interface
|
||||
;the nodename is only the default name, please replace it with the actual node name
|
||||
;PBI=
|
||||
;NET
|
||||
;NODE=t32
|
||||
;PACKLEN=1024
|
||||
|
||||
;uncomment the following 2 lines if you use PowerTrace, PowerNexus, PowerDebugEthernet or
|
||||
;PowerDebugInterface USB with onhost driver executable (t32m*) via USB interface
|
||||
;please refer the installation manual (file icd_quick_installation.pdf) about more details
|
||||
;concerning USB driver installation
|
||||
PBI=
|
||||
USB
|
||||
|
||||
;
|
||||
;uncomment the following 3 lines if you use an ICE or PodbusEthernetController
|
||||
;with standard hostdriver executable (t32cde) via ethernet interface
|
||||
;the nodename is only the default name, please replace it with the actual node name
|
||||
;LINK=NET
|
||||
;NODE=t32
|
||||
;PACKLEN=1024
|
||||
|
||||
;uncomment the following 1 lines if you use SCSI interface (ICE)
|
||||
;LINK=SCSI
|
||||
|
||||
;uncomment the following 3 lines if you want to use TRACE32 fonts
|
||||
;SCREEN=
|
||||
;FONT=DEC
|
||||
;FONT=SMALL
|
||||
|
||||
;uncomment the following 2 lines if you want to use TRACE32 bitmap fonts
|
||||
;SCREEN=
|
||||
;FONTMODE=3
|
||||
|
||||
;uncomment the following 2 lines if you use OPENWINDOWS
|
||||
;SCREEN=
|
||||
;WMGR=OW16
|
||||
|
||||
;uncomment the following 2 lines if you use MOTIF
|
||||
;SCREEN=
|
||||
;WMGR=MOTIF16
|
||||
|
||||
RCL=NETASSIST
|
||||
PACKLEN=1024
|
||||
PORT=@T32_PORTNUM@
|
||||
@ -1,10 +1,10 @@
|
||||
;===== Cortex-M3 Lauterbach initialisation ====
|
||||
|
||||
&appimage="OS.ENV(FAIL_ELF_PATH)"
|
||||
&appimage=OS.ENV(FAIL_ELF_PATH)
|
||||
|
||||
DO init.cmm
|
||||
|
||||
VAr.Frame /LOCALS /CALLER
|
||||
;VAr.Frame /LOCALS /CALLER
|
||||
REGISTER /SPOTLIGHT
|
||||
Data.ListAsm
|
||||
;Data.ListAsm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user