Estoy intentando que GNU MCU Eclipse funcione con mi XMC4800 Relax kit.
Eclipse compila el programa bien. Pero cuando intento flashear o depurar, el código JLink parece colgar en Starting Target CPU...
Esta es la salida que obtengo cuando inicio el depurador:
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...
luego parece que el programa no se actualizó, el programa antiguo todavía se está ejecutando. (He comprobado esto cambiando algunos parámetros simples).
Cuando flasheo el programa con CLI todo funciona como se espera. Ejecuto esta línea (dentro de un 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
Ahora no tengo mucha experiencia con esto, así que tengo problemas para descubrir qué es exactamente lo que está mal. Si alguien me puede mostrar qué va mal, sería un hombre feliz. Ahora mismo solo estoy cambiando las configuraciones al azar ...
Utilicé este tutorial para configurar todo
Todas mis configuraciones se muestran en este álbum: enlace