I'm trying to make GNU MCU Eclipse work with my XMC4800 Relax kit.
Eclipse compiles the program fine. But when I try to flash or debug the code JLink seems to hang on Starting Target CPU...
This is the output I get when I start the debugger:
SEGGER J-Link GDB Server V6.32b Command Line Version
JLinkARM.dll V6.32b (DLL compiled May 8 2018 18:28:22)
Command line: -if swd -device XMC4800-F144x2048 -endian little -speed 1000 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: XMC4800-F144x2048
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link Lite-XMC4200 Rev.1 compiled Apr 5 2017 11:59:07
Hardware: V1.00
S/N: 591105020
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x2000FF3C)
Read 2 bytes @ address 0x00000000 (Data = 0xFF3C)
Received monitor command: speed 1000
Target interface speed set to 1000 kHz
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x08000200)
Received monitor command: regs
R0 = E000ED08, R1 = 00000263, R2 = 02000080, R3 = C8000201
R4 = 00000536, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 0C000004, R10= 00000000, R11= 00000000
R12= 00000000, R13= 1FFE8800, MSP= 1FFE8800, PSP= 00000000
R14(LR) = 000000ED, R15(PC) = 08000200
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Received monitor command: speed auto
Select auto target interface speed (1875 kHz)
Received monitor command: flash breakpoints 1
Flash breakpoints enabled
Received monitor command: semihosting enable
Semi-hosting enabled (Handle on BKPT)
Received monitor command: semihosting IOClient 1
Semihosting I/O set to TELNET Client
Read 4 bytes @ address 0x08000200 (Data = 0xD074F8DF)
Read 2 bytes @ address 0x08000200 (Data = 0xF8DF)
Downloading 40 bytes @ address 0x00000000 - Verify failed
Downloading 2 bytes @ address 0x00000028 - Verify failed
Writing register (PC = 0x00000028)
Read 4 bytes @ address 0x00000028 (Data = 0xF0116801)
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x08000200)
Received monitor command: regs
R0 = E000ED08, R1 = 00000263, R2 = 02000080, R3 = C8000201
R4 = 00000536, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 0C000004, R10= 00000000, R11= 00000000
R12= 00000000, R13= 1FFE8800, MSP= 1FFE8800, PSP= 00000000
R14(LR) = 000000ED, R15(PC) = 08000200
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x08000200 (Data = 0xD074F8DF)
Read 2 bytes @ address 0x08000200 (Data = 0xF8DF)
Read 4 bytes @ address 0x000000EC (Data = 0x489BE004)
Read 2 bytes @ address 0x000000EC (Data = 0xE004)
Read 4 bytes @ address 0x000000EC (Data = 0x489BE004)
Read 2 bytes @ address 0x000000EC (Data = 0xE004)
Starting target CPU...
then it looks like the program wasn't flashed, the old program is still running. (I checked this by changing some simple parameters).
When I flash the program with CLI everything works as expected. I run this line (inside a makefile):
echo -e "connect\ndevice XMC4800-F144x2048\nspeed 1000\nsi swd\nloadfile xmc4800-ecat-slave.hex\ng\nqc\n" | ../JLink_Linux_V632b_x86_64/JLinkExe
Now I don't have a lot of experience with this, so I have trouble finding out what exactly is going wrong. If someone can show me whats going wrong I would be a happy man. Right now I'm just randomly changing settings...
I used this tutorial to set everything up
All my settings are shown in this album: https://i.sstatic.net/caiu3.jpg
Verify failed
lines \$\endgroup\$