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:
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:
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.