;-------------------------------------------------------------------------- ; ; ; PEEDI sample target configuration file ; ; Ronetix GmbH ; ; Supported devices : STM32 H7 (Cortex-M7), e.g. STM32H74x/75x, H72x/73x ; ; Boards : e.g. NUCLEO-H745ZI-Q (only the Cortex-M7 is used) ; ; Example : ../testsuite/nucleo_h745_swo (SWO) ; ; Revision : 1.0 ; ; Date : November 15, 2026 ; ; The file is delivered "AS IS" without warranty or condition of any ; kind, either express, implied or statutory. This includes without ; limitation any warranty or condition with respect to merchantability or ; fitness for any particular purpose, or against the infringements of ; intellectual property rights of others. ; ;-------------------------------------------------------------------------- ;-------------------------------------------------------------------------- ; The following section contains licenses that are required for PEEDI to ; operate. These licenses must be filled before using this file. ; The [LICENSE] section may contain license keys for one or more PEEDIs. ; ; Example: ; [LICENSE] ; KEY = UPDATE_24MAY2010, 1111-1111-1111-1 ; KEY = XXXXX, 2222-2222-2222-2 ; ; The [LICENSE] section may point to an external file which contains ; license keys for one or more PEEDIs. The external file must include ; the text [LICENSE] followed by all keys. ; ; Example: ; [LICENSE] ; FILE = tftp://192.168.3.10/license.txt ; or ; FILE=eep:license.txt ; or ; FILE = ftp://user:password@192.168.3.10/license.txt ; ; ; PEEDI is shipped with license keys stored in "eep:license.txt" and ; printed on a label on the bottom side of PEEDI. ; [LICENSE] FILE=eep:license.txt ;-------------------------------------------------------------------------- [DEBUGGER] PROTOCOL = gdb_remote ; debug protocol REMOTE_PORT = 2000 ; TCP/IP port FLASH = FLASH_STM32 ; flash section to be used when programming via gdb ;FLASH = FLASH_GDB ; flash section, FLASH at address 0 [TARGET] PLATFORM = Cortex-M_SWD ;PLATFORM = Cortex-M [PLATFORM_Cortex-M] JTAG_CHAIN = 5, 4 ; list of TAP controllers in the JTAG chain JTAG_CLOCK = 100, 2000 ; JTAG Clock in [kHz] TRST_TYPE = OPENDRAIN ; type of TRST output: OPENDRAIN or PUSHPULL RESET_TIME = 20 ; length of RESET pulse in ms; 0 means no RESET RESET_TYPE = RST_NOGATE ; RST is asserted during the connect phase CORE0 = Cortex-M,1 CORE0_STARTUP_MODE = RESET ; stop the core immediately after reset CORE0_ENDIAN = LITTLE ; core is little endian CORE0_BREAKMODE = SOFT ; breakpoint mode CORE0_INIT = INIT_STM32H7_SWO CORE0_FLASH0 = FLASH_STM32 ; FLASH section CORE0_FLASH1 = FLASH_STM32_DIRECT ; FLASH section CORE0_FLASH2 = FLASH_GDB CORE0_WORKSPACE = 0x20000000, 0x2000 ; workspace for agent programming CORE0_SWO = 0, 2001 ; ITM stimulus port 0 -> TCP port 2001 ;CORE0_SWO = 1, 2002 ; ITM stimulus port 1 -> TCP port 2002 ;CORE0_SWO = DWT, 2003 ; DWT packets (PC samples) -> TCP port 2003 CORE0_PATH = "tftp://192.168.3.10" ; default path ;CORE0_PATH = "card:" [PLATFORM_Cortex-M_SWD] SWD_CLOCK = 100, 2000 ; SWD Clock in [kHz] RESET_TYPE = RST_NOGATE ; RST is asserted during the connect phase TRST_TYPE = OPENDRAIN ; type of TRST output: OPENDRAIN or PUSHPULL RESET_TIME = 20 ; length of RESET pulse in ms; 0 means no RESET CORE0 = Cortex-M ;CORE0_RESET_MODE = sysresetreq ; software reset: sysresetreq or vectreset CORE0_STARTUP_MODE = RESET ; stop the core immediately after reset CORE0_ENDIAN = LITTLE ; core is little endian CORE0_BREAKMODE = SOFT ; breakpoint mode CORE0_INIT = INIT_STM32H7_SWO CORE0_FLASH0 = FLASH_STM32 ; FLASH section CORE0_FLASH1 = FLASH_STM32_DIRECT ; FLASH section CORE0_FLASH2 = FLASH_GDB CORE0_WORKSPACE = 0x20000000, 0x2000 ; workspace for agent programming CORE0_SWO = 0, 2001 ; ITM stimulus port 0 -> TCP port 2001 ;CORE0_SWO = 1, 2002 ; ITM stimulus port 1 -> TCP port 2002 ;CORE0_SWO = DWT, 2003 ; DWT packets (PC samples) -> TCP port 2003 ; PC profiling: counters for 0x24000000..0x240003FF, one per halfword, ; read them after a halt with "memory read16 0x60000000 ..." (virtual address). ; With CORE0_PROFILING the PC samples are not forwarded to the DWT port. ;CORE0_PROFILING = 0x24000000, 0x400, 0x60000000, 1 CORE0_PATH = "tftp://192.168.3.10" ; default path ;CORE0_PATH = "card:" ;----------------------------------------------------------------------- ; STM32H7: SWO (ITM) output on PB3/TRACESWO, Manchester encoding ; ; Trace path (RM0399): CM7/CM4 ITM -> SWTF funnel (0x5C004000) -> ; SWO (0x5C003000) -> PB3. The SWO clock is the trace clock (after reset ; HSI 64 MHz): SWO bit rate = 64 MHz / (SWO_CODR + 1) = 4 MHz. ;----------------------------------------------------------------------- [INIT_STM32H7_SWO] mem or 0x580244E0 0x00000002 ; RCC_AHB4ENR: GPIOBEN (PB3 is AF0 TRACESWO after reset) mem or 0x5C001004 0x00700000 ; DBGMCU_CR: TRACECLKEN | D1DBGCKEN | D3DBGCKEN mem write 0x5C004FB0 0xC5ACCE55 ; SWTF: unlock mem or 0x5C004000 0x00000003 ; SWTF_CTRL: ENS0 (CM7) | ENS1 (CM4) mem write 0x5C003FB0 0xC5ACCE55 ; SWO: unlock mem write 0x5C003010 15 ; SWO_CODR: prescaler, 64 MHz / 16 = 4 MHz mem write 0x5C0030F0 1 ; SWO_SPPR: 1 = Manchester (PEEDI) mem or 0xE000EDFC 0x01000000 ; DEMCR: TRCENA mem write 0xE0000FB0 0xC5ACCE55 ; ITM: unlock mem write 0xE0000E80 0x00010009 ; ITM_TCR: TraceBusID = 1, TXENA, ITMENA mem write 0xE0000E40 0x0000000F ; ITM_TPR: unprivileged access to all ports mem write 0xE0000E00 0xFFFFFFFF ; ITM_TER: enable all stimulus ports ; PC sampling for profiling: PCSAMPLENA, CYCTAP = CYCCNT[10], POSTPRESET = 15, ; CYCCNTENA -> one PC sample every 16 * 1024 cycles (~3900/s at 64 MHz) ;mem write 0xE0001000 0x0000121F ; DWT_CTRL ;----------------------------------------------------------------------- ; show the STM32H7 variant: run $h7_id.tcl ;----------------------------------------------------------------------- [h7_id.tcl] set dev_id [mrw 0x5C001000] puth $dev_id if {== $dev_id 0x10016483} {puts "STM32H72x/73x"} \ {== $dev_id 0x20036450} {puts "STM32H74x/75x"} \ {puts "unknown CPU"} [FLASH_STM32] CHIP = STM32 ; flash chip, detected automatically BASE_ADDR = 0x08000000 ; flash is mapped at 0x08000000 ACCESS_METHOD = AGENT ; use agent programming AUTO_ERASE = NO ; erase before program FILE = test32k.bin 0x8000000 ; file to program [FLASH_STM32_DIRECT] CHIP = STM32 ; flash chip, detected automatically BASE_ADDR = 0x08000000 ; flash is mapped at 0x08000000 ACCESS_METHOD = DIRECT ; use direct programming AUTO_ERASE = NO ; erase before program FILE = test32k.bin 0x8000000 ; file to program [FLASH_GDB] ; used when programming via gdb CHIP = STM32 ; flash chip, detected automatically BASE_ADDR = 0x0 ; flash is mapped at 0x00000000 ACCESS_METHOD = AGENT ; use agent programming AUTO_ERASE = NO ; erase before program FILE = test32k.bin 0x0 ; file to program [SERIAL] ; serial port configuration BAUD = 115200 STOP_BITS = 1 PARITY = NONE TCP_PORT = 0 [TELNET] PROMPT = "stm32h7> " ; telnet prompt ;BACKSPACE = 127 ; comment out for autodetect [DISPLAY] BRIGHTNESS = 20 ; LED indicator brightness VOLUME = 25 ; beeper volume [ACTIONS] ; user defined scripts ;AUTORUN = 2 ; executed on every target connect 1 = erase 2 = prog 3 = dump_ram 4 = dump_flash [erase] ; erase flash flash erase [prog] ; program flash flash prog [dump_ram] ; dump RAM memory dump 0x24000000 0x8000 tftp://192.168.3.10/ram.bin [dump_flash] ; dump FLASH memory dump 0x08000000 0x20000 tftp://192.168.3.10/flash.bin