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

cross mob

Downloading through Jlink Segger in WICED SDK 6.2 and future releases

lock attach
Attachments are accessible only for community members.

Downloading through Jlink Segger in WICED SDK 6.2 and future releases

PriyaM_16
Moderator
Moderator
Moderator
250 replies posted 100 replies posted 50 replies posted

This blog dicusses the download procedure on CYW43907 using external JTAG device - Jlink Segger in WICED SDK 6.2 and future releases.  Blog Downloading and debugging CYW43907 using Jlink Segger is valid only for SDKs prior to WICED SDK 6.2.

 

The hardware connections to connect CYW943907AEVAL1F's JTAG with j-link are tabulated below:

 

CYW943907AEVAL1F

Segger jlink

Signal

Pin

Signal

Pin

3v3

J9_04

VTref

1

GPIO_6_JTAG_TRST_N

J3_01

nTRST

3

Ground

J3_04

GND

4

GPIO_4_JTAG_TDI

J3_03

TDI

5

GPIO_3_JTAG_TMS

J3_07

TMS

7

GPIO_2_JTAG_TCK

J3_09

TCK

9

GPIO_5_JTAG_TDO

J3_05

TDO

13

RESET_N

J9_03

RESET

15

The switches in SW4 on CYW943907AEVAL1F need to be closed to use an external JTAG. (By default the switches are open)

 

pastedImage_0.png

 

To Download the application, we need J-Link tool: Please download J-Link tool from SEGGER website and install it. As CYW4390x was not a part of the supported devices list of SEGGER J-LInk, we need to make use of flashloader tool from SEGGER to drive the sflash of CYW4390x. Please copy flashloader_CYW4390x_QSPI.elf as attached here to the Devices/Cypress/ folder in Segger Installation directory (should look something like this: C:\Program Files (x86)\SEGGER\JLink_V640\Devices\Cypress). Modify JLInkDevices.xml in the same directory for adding CYW4390x in support list.

<<JLinkDevices.xml>>

    ********************************************************************

      <Device>

        <ChipInfo Vendor="Cypress" Name="CYW43907" Core="JLINK_CORE_CORTEX_R4" WorkRAMAddr="0x004A0000" WorkRAMSize="0x00100000" JLinkScriptFile="Devices/Broadcom/BCM43907.JLinkScript" />

        <FlashBankInfo Name="QSPI Flash" BaseAddr="0x14000000" MaxSize="0x08000000" Loader="Devices/Cypress/flashloader_CYW4390x_QSPI.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />

      </Device>

    ********************************************************************

 

 

For programming the image via J-Link connector, the JLink path need to be declared in WICED build string. Add the path of JLink.exe from the downloaded J-Link tool.

 

Example: For downloading test.console application, make the target as follows

test.console-CYW943907AEVAL1F JTAG=jlink-native  JLINK_PATH="C:/Program\ Files\ \(x86\)/SEGGER/JLink_V630c/" JLINK_EXE="JLink.exe" download run

 

To debug through J-Link, you need to create your own J-Link debug configuration in WICED Studio, details about which can be found out in the attached document.

Attachments
0 Likes
3963 Views
Comments
Anonymous
Not applicable

I was able to almost get the JLInk Segger working for the ble_wifi_introducer demo app with the following make target:

demo.ble_wifi_introducer-NEB1DX_01 JTAG=jlink-native JLINK_PATH="C:/Program\ Files\ \(x86\)/SEGGER/JLink_V616j/" JLINK_EXE="JLink.exe" JLINK_DEVICE=STM32F429ZI JLINK_SPEED=auto JLINK_INTERFACE=JTAG JLINK_AUTO_CONNECT=1 download debug

Adding this here because of all the other options I had to specify that weren't included here.  It did not work until I added JLINK_DEVICE, JLINK_SPEED, JLINK_INTERFACE, and JLINK_AUTO_CONNECT options.

Now if can just get past the "auto-loading has been declined by your 'auto-load safe-path' issue that cropped up after I figured this part out.

Hope this helps anyone who stumbles onto this page in the future.

NaFi_2915566
Level 3
Level 3
First like received First like given

you also need to follow the instructions in the correct response to Re: Flash CYW43907 with Segger standard tools (J-Flash, J-Flash Lite, Command Line) . After that I did not need to add the parameters from the previous response.  They were already in BCM94390x_targets.mk as defaults.

RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Thanks for bringing it to our notice. We have updated the blog post accordingly.

PeRa_4144941
Level 2
Level 2
First solution authored First like received First reply posted

FYI, I just downloaded SEGGER JFlash v6.44d (for Windows) from their web site, and CYW43907 was already included in the Devices\Cypress directory.  Which was nice.