7.Segger J-LINK でどのようにInfineon devicesをデバッグできますか?
7.Segger J-LINK でどのようにInfineon devicesをデバッグできますか?
The Segger GDB server provided with TrueSTUDIO v3.0.0 does not have support for Infineon devices. This guide describes how to set up a working debug session for Infineon devices by using a beta version of Segger GDB server.- Use the latest Segger GDB server beta, 4.43g (beta) or later.http://www.segger.com/beta-software-version.html
- Set debug interface to SWD.
- Replace the Initialization script, located at the Startup commands tab in the Debug Configurations dialog, with one of the following scripts:
Script for FLASH:
# Default GDB command file (FLASH) for J-LINK and Infineon XMC4500.
# Flash device
monitor flash device = XMC4500
# Set JTAG speed to 30 kHz
monitor speed 30
# Set GDBServer to little endian
monitor endian little
# Reset the chip to get to a known state.
monitor reset
# Set auto JTAG speed
monitor speed auto
# Setup GDB FOR FASTER DOWNLOADS
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
# Enable flash download
monitor flash download = 1
# Load the program executable
load
# Set a breakpoint at main().
break main
# Run to the breakpoint.
continue
Script for RAM:
# Default GDB command file (RAM) for J-LINK and Infineon XMC4500.
# Flash device
monitor flash device = XMC4500
# Set JTAG speed to 30 kHz
monitor speed 30
# Set GDBServer to little endian
monitor endian little
# Reset the chip to get to a known state.
monitor reset
# Set auto JTAG speed
monitor speed auto
# Setup GDB FOR FASTER DOWNLOADS
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
# Load the program executable
load
# Interrupt vector in RAM
#set *0xe000ed08 = 0x10000000
# Set a breakpoint at main().
break main
# Run to the breakpoint.
continue
NOTE! When debugging in RAM there is problems restarting the debug process. User will have to terminate the debug session and start it again.