Jlink: Can not connect to J-Link via USB.GDI: => DI_ERR_NONFATAL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Jlink: Can not connect to J-Link via USB.GDI: => DI_ERR_NONFATAL

4,700 Views
Kairos
Contributor I

Hi all.

 

Hope that somebody could help me. I have a problem with CW 10.2 running on a Debian and with the access to the onboard build JLink debugger in the kwikstik board.

 

I installed the drivers of the JLink on the debian and on a terminal I access to the board with no problems with the JLinkExe aplication provided by Segger.

 

But when I try to program or debug my CW 10.2 application over the board I receive allways the following output:

 

=== CodeWarrior GDI protocol log ===
GDI DLL: /opt/Freescale/CodeWarrior_MCU_10.2/MCU/CodeWarrior/CodeWarrior_Plugins/Debugger/Protocols/../../Support/ARM/gdi/arm_jlink_gdi.so
CPU: K40DX256Z

GDI: DiGdiOpen()
GDI: => DI_OK
GDI: DiGdiGetFeatures()
GDI: => DI_OK
GDI: Identification: ARM Cortex M4 J-Link emulator, Version: 1.0.0, MeeAvailable: false, NrCpusAvailable: 1
GDI: DiGdiAddCallBack(cb_type = 0x4000)
GDI: => DI_OK
GDI: DiGdiInitIO()
INF:
Jlink: DLL version V4.41g
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : USB device, Value : 0, R) => DI_OK
INF:
Jlink: Can not connect to J-Link via USB.GDI: => DI_ERR_NONFATAL
GDI: The Debugger can not connect to the J-Link device
GDI: DiGdiClose()
GDI: => DI_OK

 

It's clear that I have a mistake on the configuration of the CW 10.2 that no knows how access to the JLink.

 

Somebody have experienced something like that? How can I fix it?

 

Thanks in advance.

 

 

 

0 Kudos
2 Replies

1,045 Views
DarthVader
Contributor II

Hi, I am facing similar problems.

 

I was running CW 10.2 in Ubuntu and playing with TWR-k20D72M. I intalled all the drivers for segger jlink, I have 2 different, the black and the yellow from IAR.

 

I downloaded the example projects from

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=TWR-K20D72M&fpsp=1&tab=Design_Tools_T...

 

I did several things:

 

1-used OSJTAG to test low_power_demo, hello_world, etc.. This works although the usb OSJTAG is a little bit slow.

2-I wanted to work with JLink and then my problems started. At the beginning I was not able to flash de device from the debug button, the debug session starts but debugs the previous code in the flash of the k20. I had to explicitly flash using the flash tool from CW and then I can debug but periodically the debug session jumps to some assembler files or startup files in

\Freescale\CW MCU v10.2\MCU\ARM_EABI_Support\ewl\EWL_Runtime\Runtime_ARM\Source\startup.c

 

then I decided to update CW just in case new updates solve the problem. After installing all the updates that the tool proposed me I have not been able to compile again the example projects. Every time I ask to compile it complaints about a linker problem

 

Description    Resource    Path    Location    Type
Internal-Symbol not found: __SP_INIT    hello_world             C/C++ Problem
Link Failed.

 

I unzipped again everything and restarted CW using a new workspace and imported the example (hello_world). It does not compile as well.

 

So, now I can neither run the examples using the OSJTAG nor the JLINK

 

any idea? i've re-installed cw 4 times (2 in linux and now 2 in windows)

 

0 Kudos

1,045 Views
DarthVader
Contributor II

let me also add the error I get when I try to download code to the k20 tower board using the segger jtag. This is trying to program an fresh project created with new bareboard wizard.

 

 

 

Executing Initialization File: C:\Documents and Settings\me\workspace_cw\test/Project_Settings/Debugger/init_kinetis.tcl
radix x
cmdwin::eclipse::config hexprefix 0x
cmdwin::eclipse::config MemIdentifier p
cmdwin::eclipse::config MemWidth 32
cmdwin::eclipse::config MemAccess 32
cmdwin::eclipse::config MemSwap off
cmdwin::reg Core Debug Registers/DEMCR = 0x1000001
failed on register write: DEMCR
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_FUNCTION0 = 0x0
failed on register write: DWT_FUNCTION0
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_FUNCTION1 = 0x0
failed on register write: DWT_FUNCTION1
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_FUNCTION2 = 0x0
failed on register write: DWT_FUNCTION2
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_FUNCTION3 = 0x0
failed on register write: DWT_FUNCTION3
cmdwin::reg Flash Patch and Breakpoint Unit Registers/FP_COMP0 = 0x0
failed on register write: FP_COMP0
cmdwin::reg Flash Patch and Breakpoint Unit Registers/FP_COMP1 = 0x0
failed on register write: FP_COMP1
cmdwin::reg Flash Patch and Breakpoint Unit Registers/FP_COMP2 = 0x0
failed on register write: FP_COMP2
cmdwin::reg Flash Patch and Breakpoint Unit Registers/FP_COMP3 = 0x0
failed on register write: FP_COMP3
cmdwin::reg Flash Patch and Breakpoint Unit Registers/FP_COMP4 = 0x0
failed on register write: FP_COMP4
cmdwin::reg Flash Patch and Breakpoint Unit Registers/FP_COMP5 = 0x0
failed on register write: FP_COMP5
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_CTRL = 0x40000000
failed on register write: DWT_CTRL
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_CYCCNT = 0x0
failed on register write: DWT_CYCCNT
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_CPICNT = 0x0
failed on register write: DWT_CPICNT
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_EXCCNT = 0x0
failed on register write: DWT_EXCCNT
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_SLEEPCNT = 0x0
failed on register write: DWT_SLEEPCNT
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_LSUCNT = 0x0
failed on register write: DWT_LSUCNT
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_FOLDCNT = 0x0
failed on register write: DWT_FOLDCNT
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_COMP0 = 0x0
failed on register write: DWT_COMP0
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_COMP1 = 0x0
failed on register write: DWT_COMP1
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_COMP2 = 0x0
failed on register write: DWT_COMP2
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_COMP3 = 0x0
failed on register write: DWT_COMP3
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_MASK0 = 0x0
failed on register write: DWT_MASK0
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_MASK1 = 0x0
failed on register write: DWT_MASK1
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_MASK2 = 0x0
failed on register write: DWT_MASK2
cmdwin::reg Data Watchpoint and Trace Unit Registers/DWT_MASK3 = 0x0
failed on register write: DWT_MASK3
cmdwin::reg Instrumentation Trace Macrocell Registers/ITM_LAR = 0xc5acce55
failed on register write: ITM_LAR
cmdwin::reg Instrumentation Trace Macrocell Registers/ITM_TER = 0x0
failed on register write: ITM_TER
cmdwin::reg Instrumentation Trace Macrocell Registers/ITM_TPR = 0x0
failed on register write: ITM_TPR
cmdwin::reg Instrumentation Trace Macrocell Registers/ITM_TCR = 0x0
failed on register write: ITM_TCR
cmdwin::reg Instrumentation Trace Macrocell Registers/ITM_LAR = 0x1
failed on register write: ITM_LAR
cmdwin::reg Embedded Trace Funnel Registers/ETF_FCR = 0x300
failed on register write: ETF_FCR
cmdwin::reg System Control Registers/SCB_VTOR = 0x20000000
failed on register write: SCB_VTOR

 

 

Failed to resume target process., ARM GDI Protocol Adapter : An error occurred while trying to write memory. The Debugger can not write memory.

0 Kudos