Jlink issue while using CW 10.5

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

Jlink issue while using CW 10.5

1,344 Views
cencongsu
Contributor I

I try to use jlink under CW 10.5, but I have issue:

44728_44728.pngpastedImage_0.png

44828_44828.pngpastedImage_1.png

 

The configuration is:

44829_44829.pngpastedImage_2.png

 

I use the same CW10.5 and Jlink to debug the other project, it is ok, that means the jlink and the connection and the board are OK.

 

And I replace the Jlink with multilink, it is ok too.  So what is the probable cause for this jlink issue?

Labels (1)
Tags (1)
0 Kudos
14 Replies

1,139 Views
cencongsu
Contributor I

So, my question is, how to use jlink under codewarrior?

I modify the connection type to "J-link\J-trace for ARM", it works for some project, but not for the other, I really don't know why?

I don't even know if it is CW bug.

We paid for the software and now we found that it is so difficult to use!

0 Kudos

1,139 Views
trytohelp
NXP Employee
NXP Employee

Hi,

I don't have this JLink interface but the JLink Lite device only.

On my side I've never met problem with board using a JLink connection.

Following your info it seems the device is working fine for some projects but not for other ones.

What is the board used ?

      Is it TWR or other Eval one ?

Is there a specific reason explaining why you're not using the default JLink debug connection ?

When you create the project you can select the Segger debug connection.

Don't think it will work better but you will have a clean project Debug configuration.

Is it possible to have the project reproducing the behavior ?

I will check with colleagues if somebody has the JLink interface.

To have all details, do you use this interface:

    SEGGER - The Embedded Experts - J-Trace ARM

Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,139 Views
cencongsu
Contributor I

I am using development board TWR-K60F120M, and I was trying to import the fNET2.7.5 demo project "twrk60f12m_shell_boot" to CW10.5 and debug it.

I have Jlink so I create a new debug configuration to use Jlink:

pastedImage_2.png

pastedImage_5.png

When I start downloading the target, then the error occurs:

First,

pastedImage_0.png

After downloading the target, another error:

pastedImage_3.png

pastedImage_4.png

Today I find out if I don't download the uninitialized data:

pastedImage_6.png

Everything is fine.

But for my other projects, it doesn't have this issue. Why the uninitialized data option will have impact for this?

0 Kudos

1,139 Views
BlackNight
NXP Employee
NXP Employee

This really looks like the memory map (linker file and/or the memory map used in the debugger configuration) either not seem to match your device, or you have a hardware/connection problem.

Can you verify that the memory map in the linker, and the memory configuration in the launch config are matching?

I hope this helps,

Erich

0 Kudos

1,139 Views
BlackNight
NXP Employee
NXP Employee

About the memory configuration file used: it is in the target settings of the debug/launch configuration here:

pastedImage_0.png

0 Kudos

1,139 Views
BlackNight
NXP Employee
NXP Employee

Another thought: I see that you have 'verify' enabled ini the 'perform standard download' section:

I have that on my side disabled, because the J-Link will do the verify internally too, so no need to verify things twice.

As for the selection of 'uninitialized data': if that turned on, the debugger will download all the RAM areas present in the application memory map.

Basically write all RAM areas. So if your memory map does not match the device map, issues could arise.

Erich

0 Kudos

1,139 Views
cencongsu
Contributor I

I don't have a clue. I paste the mem file and the lcf file here, actually, these two files are included in the fNET 2.7.5 source package, they should be fine. And it works well if I use Multillink, but if I want to use Jlink, I have to deselect the option "uninitialized data" as I have mentioned above. I really want to find out the root cause for this issue to avoid potential risk for my project.

MK60FN1M0.mem:

______________________________________________________________________________

// Memory Configuration File

//

// Description:

//  A memory configuration file contains commands that define the legally accessible

//  areas of memory for your specific board. Useful for example when the debugger

//  tries to display the content of a "char *" variable, that has not yet been initialized.

//  In this case the debugger may try to read from a bogus address, which could cause a

//  bus error.

//

// Board:

//  Kinetis K60FN1M0

//

// Reference:

//  -

// All reserved ranges read back 0xBABA...

reservedchar 0xBA

usederivative "MK60F15"

//         Memory Map:

//         ----------------------------------------------------------------------

range      0x00000000 0x000FFFFF 4 ReadWrite    // 1024KB Code Flash

reserved   0x00100000 0x13FFFFFF

range      0x14000000 0x14003FFF 4 ReadWrite    // 16KB Programming accelleration RAM

reserved   0x14004000 0x1FFEFFFF

range      0x1FFF0000 0x1FFFFFFF 4 ReadWrite    // 64KB On chip SRAM (TCML)

range      0x20000000 0x2000FFFF 4 ReadWrite    // 64KB On chip SRAM (TCMU)

reserved   0x20010000 0x21FFFFFF

range      0x22000000 0x221FFFFF 4 ReadWrite    // Aliased to TCMU SRAM bitband

reserved   0x22200000 0x3FFFFFFF

reserved   0x60000000 0xDFFFFFFF // Flexbus for external memory

reserved   0xE0100000 0xFFFFFFFF

______________________________________________________________________________

And here is the MK60FN1M0_flash.lcf I use:

______________________________________________________________________________

# Default linker command file.

MEMORY {

fnet_bootloader (RX) : ORIGIN = 0x00000000, LENGTH = 0x0000C000 # 48KB reserved for FNET bootloader

m_interrupts  (RX) : ORIGIN = 0x0000C000, LENGTH = 0x00000410

m_text        (RX) : ORIGIN = 0x0000C410, LENGTH = 0x000E3BF0 #0x00100000-0x410 /*Ints*/-0x1000/*Params*/-0xC000/*Boot*/

fapp_paramsrom   (RW)  : ORIGIN = 0x000FF000, LENGTH = 0x00001000 # 4KBytes = Last logical-block resevrd for params.

vectorram     (RWX) : ORIGIN = 0x1FFF0000, LENGTH = 0x00000410 #

m_data        (RWX) : ORIGIN = 0x1FFF0410, LENGTH = 0x0001EBF0 #0x00020000-0x00000410-0x00001000/*Stack*/

}

KEEP_SECTION { .vectortable }

KEEP_SECTION { .fapp_params }

SECTIONS {

.vectorram : {} > vectorram

.interrupts :

{

    __vector_table = .;

    * (.vectortable)

    . = ALIGN (0x10);

} > m_interrupts

.app_text:

{

  ALIGNALL(10);

    * (.init)

    * (.text)

  .= ALIGN(0x10) ;

  * (.rodata)

  .= ALIGN(0x10) ;

    ___ROM_AT = .;

} > m_text

.app_data: AT(___ROM_AT)

{

  *(.FNET_RAM) #Flash driver "in ram" function.

    * (.sdata)

    * (.data)

  .= ALIGN(0x10) ;

    *(.ARM.extab)

  .= ALIGN(0x10) ;

       __exception_table_start__ = .;

    EXCEPTION

       __exception_table_end__ = .;

  .= ALIGN(0x10) ;

       __sinit__ = .;

    STATICINIT

  .= ALIGN(0x10) ;

} > m_data

.bss :

{

  .= ALIGN(0x10) ;

  __START_BSS = .;

  * (.bss)

  __END_BSS = .;

  .= ALIGN(0x10) ;

} >> m_data

_romp_at = ___ROM_AT + SIZEOF(.app_data);

.romp : AT(_romp_at)

{

    __S_romp = _romp_at;

    WRITEW(___ROM_AT);

    WRITEW(ADDR(.app_data));

    WRITEW(SIZEOF(.app_data));

    WRITEW(0);

    WRITEW(0);

    WRITEW(0);

}

__SP_INIT = . + 0x00001000;

__heap_addr = __SP_INIT;

__heap_size = 0x00000000;

# ====== Definitions used by FNET Application. =======

  .params :

  {

  *(.fapp_params)

  } > fapp_paramsrom

__VECTOR_RAM = ADDR(.vectorram);

}

______________________________________________________________________________

0 Kudos

1,139 Views
BlackNight
NXP Employee
NXP Employee

I suggest you give CW for MCU 10.6 a try. Your 10.5 version is pretty old. 10.6 comes with updated Segger run control, so this might be an issue fixed since then.

You can install 10.6 while still having the 10.5 installed (no need to uninstall things).

Erich

0 Kudos

1,139 Views
cencongsu
Contributor I

I have tried the CW 10.6, the issue remains the same.

0 Kudos

1,139 Views
trytohelp
NXP Employee
NXP Employee

Hi,

I don't have exactly the same interface on my side.

Probably we should create a SR to continue to handle this problem.

Now do you have contacted the FNET Embedded TCP/IP Stack forum ?

May be they could help you or people met similar issue with FNET project.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,139 Views
BlackNight
NXP Employee
NXP Employee

That dialog says 'PnE' so it looks you try to connect to a P&E Multilink, and not to a Segger J-Link?

Are you using the wrong launch configuration?

Erich

0 Kudos

1,139 Views
cencongsu
Contributor I

The debug configuration is created for P&E Multilink, but I have modified the connection type to use Jlink:

pastedImage_0.png

0 Kudos

1,139 Views
BlackNight
NXP Employee
NXP Employee

I see that you have it configured for JTAG. Are you shure it is not SWD?

0 Kudos

1,139 Views
cencongsu
Contributor I

Yes, it is JTAG. The jlink can found the MCU via JTAG:

pastedImage_0.png

0 Kudos