New
Hi all, I need help some help with the following setup:
Hardware: J-Link Lite on XMC4500 relax board
Software: Ubuntu 22.04, JLink version 8.10g, Zephyr main branch
Programming did not work at all until I re-flashed the firmware with JLinkConfig. Now it is (mostly) working *one* time after connecting the board over USB to the
computer, but fails on every subsequent run. As the setup is described in the Zephyr documentation, I guess it was working sometime.
`dmesg` output:
Working case
Display All
Non working case
If I immediately repeat the flashing, it fails (seems it cannot find the JLink):
Display All
The error message `FAILED: Cannot connect to J-Link.` appears after a timeout of several seconds, however if I disconnect the USB cable it immediately fails. So it seems to try to establish a connection but that
does not succeed.
Thanks in advance for your help!
Hardware: J-Link Lite on XMC4500 relax board
Software: Ubuntu 22.04, JLink version 8.10g, Zephyr main branch
Programming did not work at all until I re-flashed the firmware with JLinkConfig. Now it is (mostly) working *one* time after connecting the board over USB to the
computer, but fails on every subsequent run. As the setup is described in the Zephyr documentation, I guess it was working sometime.
`dmesg` output:
Source Code
- [246043.070397] usb 1-4.1: new full-speed USB device number 27 using xhci_hcd
- [246043.206717] usb 1-4.1: New USB device found, idVendor=1366, idProduct=0101, bcdDevice= 1.00
- [246043.206731] usb 1-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
- [246043.206735] usb 1-4.1: Product: J-Link
- [246043.206738] usb 1-4.1: Manufacturer: SEGGER
- [246043.206740] usb 1-4.1: SerialNumber: 000551019312
Working case
Source Code
- west -v flash
- -- west flash: rebuilding
- cmake version 3.22.1 is OK; minimum version is 3.13.1
- Running CMake: /usr/bin/cmake --build zephyrproject/zephyr/build
- ninja: no work to do.
- -- west flash: using runner jlink
- -- runners.jlink: reset after flashing requested
- runners.jlink: JLINKARM_GetDLLVersion()=81007
- -- runners.jlink: JLink version: 8.10g
- runners.jlink: JLink commander script:
- ExitOnError 1
- r
- LE
- loadfile "zephyrproject/zephyr/build/zephyr/zephyr.bin" 0xc000000
- r
- g
- writeDP 1 0
- readDP 1
- q
- -- runners.jlink: Flashing file: zephyrproject/zephyr/build/zephyr/zephyr.bin
- runners.jlink: /opt/SEGGER/JLink_V810g/JLinkExe -nogui 1 -if swd -speed auto -device XMC4500-1024 -CommanderScript /tmp/tmp5rexrq4xjlink/runner.jlink -nogui 1
- SEGGER J-Link Commander V8.10g (Compiled Nov 14 2024 08:47:22)
- DLL version V8.10g, compiled Nov 14 2024 08:46:17
- J-Link Command File read successfully.
- Processing script file...
- J-Link>ExitOnError 1
- J-Link Commander will now exit on Error
- J-Link>r
- J-Link connection not established yet but required for command.
- Connecting to J-Link via USB...O.K.
- Firmware: J-Link Lite-XMC4000 Rev.1 compiled Apr 2 2015 18:25:20
- Hardware version: V1.00
- J-Link uptime (since boot): N/A (Not supported by this model)
- S/N: 551019312
- VTref=3.300V
- Target connection not established yet but required for command.
- Device "XMC4500-1024" selected.
- Connecting to target via SWD
- Performing XMC4500 connection sequence.
- DPv0 detected
- CoreSight SoC-400 or earlier
- Scanning AP map to find all available APs
- AP[1]: Stopped AP scan as end of AP map has been reached
- AP[0]: AHB-AP (IDR: 0x24770011, ADDR: 0x00000000)
- Iterating through AP map to find AHB-AP to use
- AP[0]: Core found
- AP[0]: AHB-AP ROM base: 0xE00FF000
- CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
- Found Cortex-M4 r0p1, Little endian.
- FPUnit: 6 code (BP) slots and 2 literal slots
- CoreSight components:
- ROMTbl[0] @ E00FF000
- [0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7
- [0][1]: E0001000 CID B105E00D PID 003BB002 DWT
- [0][2]: E0002000 CID B105E00D PID 002BB003 FPB
- [0][3]: E0000000 CID B105E00D PID 003BB001 ITM
- [0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU
- [0][5]: E0041000 CID B105900D PID 000BB925 ETM
- Memory zones:
- Zone: "Default" Description: Default access mode
- Cortex-M4 identified.
- Reset delay: 0 ms
- Performing XMC4500 reset
- J-Link>LE
- J-Link>loadfile "zephyrproject/zephyr/build/zephyr/zephyr.bin" 0xc000000
- 'loadfile': Performing implicit reset & halt of MCU.
- Performing XMC4500 reset
- Downloading file [zephyrproject/zephyr/build/zephyr/zephyr.bin]...
- Comparing flash [100%] Done.
- Erasing flash [100%] Done.
- Programming flash [100%] Done.
- J-Link: Flash download: Bank 0 @ 0x0C000000: 1 range affected (65536 bytes)
- J-Link: Flash download: Total: 1.850s (Prepare: 0.087s, Compare: 0.047s, Erase: 1.382s, Program & Verify: 0.286s, Restore: 0.046s)
- J-Link: Flash download: Program & Verify speed: 224 KB/s
- O.K.
- J-Link>r
- Reset delay: 0 ms
- Performing XMC4500 reset
- J-Link>g
- Memory map 'after startup completion point' is active
- J-Link>writeDP 1 0
- Writing DP register 1 = 0x00000000 (0 write repetitions needed)
- J-Link>readDP 1
- Reading DP register 1 = 0x00000040 (0 read repetitions needed)
- J-Link>q
- Script processing completed.
If I immediately repeat the flashing, it fails (seems it cannot find the JLink):
Source Code
- west -v flash
- -- west flash: rebuilding
- cmake version 3.22.1 is OK; minimum version is 3.13.1
- Running CMake: /usr/bin/cmake --build zephyrproject/zephyr/build
- ninja: no work to do.
- -- west flash: using runner jlink
- -- runners.jlink: reset after flashing requested
- runners.jlink: JLINKARM_GetDLLVersion()=81007
- -- runners.jlink: JLink version: 8.10g
- runners.jlink: JLink commander script:
- ExitOnError 1
- r
- LE
- loadfile "zephyrproject/zephyr/build/zephyr/zephyr.bin" 0xc000000
- r
- g
- writeDP 1 0
- readDP 1
- q
- -- runners.jlink: Flashing file: zephyrproject/zephyr/build/zephyr/zephyr.bin
- runners.jlink: /opt/SEGGER/JLink_V810g/JLinkExe -nogui 1 -if swd -speed auto -device XMC4500-1024 -CommanderScript /tmp/tmpuj2ufsvzjlink/runner.jlink -nogui 1
- SEGGER J-Link Commander V8.10g (Compiled Nov 14 2024 08:47:22)
- DLL version V8.10g, compiled Nov 14 2024 08:46:17
- J-Link Command File read successfully.
- Processing script file...
- J-Link>ExitOnError 1
- J-Link Commander will now exit on Error
- J-Link>r
- J-Link connection not established yet but required for command.
- Connecting to J-Link via USB...FAILED: Cannot connect to J-Link.
- Script processing completed.
- FATAL ERROR: command exited with status 1: /opt/SEGGER/JLink_V810g/JLinkExe -nogui 1 -if swd -speed auto -device XMC4500-1024 -CommanderScript /tmp/tmpuj2ufsvzjlink/runner.jlink -nogui 1
does not succeed.
Thanks in advance for your help!