Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

WICED Smart J-Link Debugger

WICED Smart J-Link Debugger

Anonymous
Not applicable
RevisionChange DescriptionDate
1.0Initial08/08/14
1.1Added J-Link Cable for Reference08/11/14

 

WICED Smart J-Link Debugger

 

The WICED Smart J-Link Debugger is a Software debugger combined with Segger J-Link Debug Probe.

  1. The J-Link Debug Probe is shown below and the link is located here: SEGGER - The Embedded Experts

JLINK_Debugger.JPG

Figure 1: J-Link Segger Debugger

2.  Schematic of cable adapter to the J-Link 20 Pin connector:

Cable_Schematic.JPG

Figure 2: J-Link Segger Debugger Interface Connector

3.  Shown below is the connection to the BCM20737TAG_Q2 Board:

J-Link_Connector.JPG

Figure 3: J-Link Connection to BCM20737TAG_Q2 Board

4.  The Smart Designer J-Link setup procedure:

 

  1. Start SDK

  2. Connect USB to Top Port PC
  3. BCM20737TAG_Q2 Board Switch configuration for programming:

     JLINK_Pic.png

Figure 4: Boot ROM, Reset and Switch Buttons

    1. Please refer to the Quick Start Guide: http://community.broadcom.com/docs/DOC-1602

  1. Configuration for Push Button Switches
    1. BOOT ROM Push Button
    2. RESET Button
  2. Push Button Sequence:
    1. Press and Hold BOOT ROM Button
    2. Press and Hold RESET Button
    3. Release RESET Button
    4. Release BOOT ROM Button
  3. SDK Commands
    1. Run Clean
    2. Run PWM-Tones App
  4. Run Debugger:
    1. Remove USB and Insert Battery
    2. Return Switches to opposite program
    3. Connect J-Link USB Connector to PC
    4. Connect J-Link to Board - See Figure 3 above.
    5. Push Reset
    6. Run GDB Server
    7. Click OK – Observer 2 Green Lights
    8. Click Bug Icon in SDK (Top Middle Section)
    9. Click “I” Icon (Under Navigate Menu) – Instruction Mode

   Click “I” once then press F5 3 times.


Note: R3 (the 10K pulldown on RXd) must be removed for the debugger to work.


Please let us know if you have any issues.

Thanks

JT

2928 Views
Comments
StBa_721356
Level 5
Level 5
50 likes received 25 likes received 10 likes received

We tested this and it indeed works 🙂

Regarding step 2: I assume that this only necessary once, right?

It would be good to give more information about how to use the J-Link adapter.

Here is what we do:

1. we have a Segger J-Link Base

2. we use the following connection between the J-Link and the BCM20737TAG_Q2 board:

pin 1 (VTref) -> J10 pin 1 (VDDIO)

pin 4 (GND) -> J10 pin 4 (GND)

pin 7 (SWDIO) -> J10 pin 2 (SWDIO)

pin 9 (SWCLK) -> J10 pin 3 (SWDCK)

pin 15 (RESET) -> TP3 (RESET_N)

In the Segger J-Link GDB Server application we use the following settings:

- Connection to J-Link: USB

- Target device: Cortex-M3

- Target interface: SWD

- Speed: Auto selection

Is this all correct?

asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Your connections look right. From the TAG03 schematic, the debug header is J10:

pastedImage_0.png

The standard 20 pin JTAG connector hooks up to this like this (VDDIO == PWR_VIO):

pastedImage_1.png

I use the following options with J-Link GDB server:

pastedImage_2.png

pastedImage_3.png

Then select WICED Smart debug from the debug configurations menu (the bug icon in the tool bar) and the IDE should start the debug perspective, which will look something like this:

pastedImage_4.png

Open the 'Expressions' window (from Window->Show View) and type in spar_debug_continue - the default value is 0x00. Change this to a non-zero value and hit Resume button (or F8).

You should be able to set breakpoints by double-clicking on the left margin in the code window when the CPU is stopped. You can step (instruction/source lines) into/over and out using the IDE buttons. Once you resume, I see that Eclipse cannot halt the processor (Suspend button in the IDE). A future release of the SDK should fix this problem. But in the meantime, use J-Link Commander tool to halt the processor.

pastedImage_6.png

Now switch back to the IDE window and you should see that the processor has stopped (generally at 0x59C, a NOP instruction)

StBa_721356
Level 5
Level 5
50 likes received 25 likes received 10 likes received

So the RESET line does not have to be connected to TP3?

asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Not necessary unless you also want to reset from the debugger (though it definitely is a bit more convenient than pushing the reset button on the board).

Anonymous
Not applicable

It says above that "Note: R3 (the 10K pulldown on RXd) must be removed for the debugger to work." But on the modules of the BCM2073x parts, UART_RX is pulled low through an internal pulldown resistor.

Does that mean that it will not be possible to do use the JLink debugger on the modules?

Anonymous
Not applicable

Hello myang,

Correct.  The JLINK can't be used on the modules.

Thanks for asking this important question.

JT

StBa_721356
Level 5
Level 5
50 likes received 25 likes received 10 likes received

WIll there be a MacOS X version of the IDE for SDK 2.1.0 which can be used for debugging?

Anonymous
Not applicable

Hello Stefan,

We should have the SDK 2.1 for Mac next week if all goes well.

I believe the JLINK Debugger supported GDB so there should be no issues

Thanks

JT

Anonymous
Not applicable

I have three questions.

1. I have IAR JLINK like this, can I use it to debug?

IAR: J-Link / J-Link KS

IAR J-Link / IAR J-Link KS are OEM versions of J-Link, sold by IAR.

Limitations
IAR J-Link / IAR J-Link KS can not be used with Keil MDK.

This limitation can NOT be lifted; if you would like to use J-Link with Keil MDK,
you need to buy a separate J-Link.

Licenses
No licenses are included.
All licenses can be added.

2. If I want to debug, is it possible to use eclipse kepler to run the debugger? Or I have to use wiced smart installer sdk IDE?

3. Can I debug BCM20732S?

asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

1. I don't know enough about the IAR version of J-Link to say if it will work or not, but I guess you can try to use it, you might get lucky.

2. Eclipse only offers a nice GUI frontend to GDB debugger. In theory, you should be able to configure any release of Eclipse to invoke GDB binaries. See debug configurations menu in Eclipse in WICED IDE for the options we use. However, this is not a supported debugging method. So some of the automation that is built in the WICED IDE will not work.

3. In theory, it should work. You have to implement the SETUP_APP_FOR_DEBUG_IF_DEBUG_ENABLED() and BUSY_WAIT_TILL_MANUAL_CONTINUE_IF_DEBUG_ENABLED() macros defined in SDK 2.1 yourself. None of the Eclipse WICED IDE automation is available with SDK 1.1. But you should be able to use command line GDB and/or other GUI front ends for debugging.

Anonymous
Not applicable

I'm attempting to connect j-link EDU  debugger following the steps above.

1. assembled and connected the 20-pin cable to J-10 connector, using the above schematic;

2. trying to run the JlinkGDBServer.  ( using the settings, recommended above).

However, at this stage the J-links reports a failure to connect to the target.

It is quite possible I missed some steps.

I would appreciate all advices how to  find and to resolve the issue.

Thanks.

JLink.png

Anonymous
Not applicable

Actually, I resolved the issue.

It was actually my fault, the downloaded application has not been build for debug.

Anonymous
Not applicable

I am using J-Link Plus instead of J-Link Pro. Will that work for debugging on SDK V2.2 and BCM920737TAG.

I followed all the steps mentioned in "WICED-Smart-AB200-R.pdf". But I am unable to connect to GDB server. I am simply using Heart rate monitor example and modified the makefile.mk file to add DEBUG = 1 and in heart_rate_monitor.c added 2 lines at the bottom of the create function

void heart_rate_monitor_create(void)

{

...

// Add below lines at the end of the function

SETUP_APP_FOR_DEBUG_IF_DEBUG_ENABLED();

BUSY_WAIT_TILL_MANUAL_CONTINUE_IF_DEBUG_ENABLED();

}

Performed all the steps mentioned in the document and I am not able to connect to CPU. (Screen shot attached below)

What will I need to do to get this thing to debug mode.

Anonymous
Not applicable

Hi, is there any way to use the J-Link lite with the BCM20732 on the BCM20732_TAG ? Thks

MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Unfortunately there is not as J-Link support was added in SDK 2.X, and this SDK is only supported on the newer firmware used by the BCM20736/37.

Contributors