Downloading and debugging CYW43907 using Jlink Segger
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
This blog discusses how to download and debug an application on CYW43907 using external JTAG device - Jlink Segger.
NOTE: This blog is valid for WICED releases 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)
Connect the Jlink segger to host PC. To download an application using j-link Segger, you need to change the jlink driver to libusbK.
Use Zadig to change the jlink driver.
Check the device manager of host PC to verify that J-link segger appears under libusbK USB devices.
Modify the configuration file( tools/OpenOCD/BCM4390x.cfg) to include the mode flags as follows:
replace reset_config srst_nogate connect_assert_srst with
reset_config trst_and_srst srst_push_pull srst_nogate connect_assert_srst
To build scan application using external JTAG, the make target should contain "JTAG=jlink" in the build string.
Make the target as: snip.scan-CYW943907AEVAL1F-debug JTAG=jlink download run
Please note that the download is using openOCD in WICED SDK.
To debug an application, you need to revert back the driver for jlink from libusbK to Segger. Right click on jlink under libusbK and update driver. Choose "Search automatically for updated driver software". This will install the jlink driver. Jlink will appear as J-link driver under Universal Serial Bus Controllers.
Install JLink on your machine. Follow the instructions:
@SEGGER - The Embedded Experts - Downloads
Disable the Watchdog by adding the following flag in the make file of your application:
GLOBAL_DEFINES += WICED_DISABLE_WATCHDOG
Follow the instructions given in the attached document for setting the debug configurations in WICED SDK.