USB-JTAG Debugging (and/or Serial Wire Debug) with CoreSight™ Serial Wire Viewer and ETM trace capability Other Keil tools such as ULINK2 and ULINK-ME and the Segger J-Link can be used in place of the ULINKpro but these units do not support the ETM, Performance Analysis, and Code Coverage features.
Installing the Software Download and Install 1. Download MDK Core from the Keil website at www.keil.com/mdk5/install. 2. Install MDK into the default folder. You can install into any folder, but for this example the default is C:\Keil_v5. Selecting Software Packs This μVision utility provides the ability to choose various Software Pack versions to be installed.
6. Using Windows Explorer, open the ZIP file and extract it to your desired location (e.g., Documents folder). Once it is extracted, you are ready to import it into the Keil IDE. P a g e 4 | 13...
4. Select the Avnet_ATT_Cellular_IOT.uvprojx. You have now imported the project from the mbed.org IDE. Connecting and Configuring Debug Adapter The ULINKpro supports all SWV features and has ETM Trace support. It also provides Flash programming capabilities. NOTE: When you use the flash programming capabilities, the FRDM-K64F Flash is erased and the OpenSDA boot loader that was previously in the Flash is gone.
Page 7
The new cable provided with the ULINKpro unit may have pin 7 filled with a plastic plug. If so, remove the plastic plug before connecting to the Kinetis target. This is easily done with a sharp needle. Merely pry the plastic pin out.
Configuring μVision v5 With the board assembled and connected to the ULINKpro JTAG unit, perform the tool configuration tasks. These tasks are all performed from the Options dialog. This dialog box is found under the Project menu or button. 1. Enter the Debug tab. From the Options tab, modify the “Debug”, “Linker”, and “C/C++” tabs.
Page 9
5. Move to the Trace tab to set up the trace configuration. 6. Ensure Port 7..0 and Pin 0 is selected so information can be output to the Printf (debug) window. Also verify that Serial Wire Output – Manchester is selected. uVision uses Port 0 and 31. All other ports are not used at this time.
10. From the Options dialog, select the C/C++ tab. At this point, you will add a new define to the project call _ULINK_PRINT. This is added to the end of the Preprocessor Symbols Define filed as shown: Updating the Project Files Because debug/information output is sent to the Debug (printf) viewer when using the ULINK, you need to include new files into the project that will accomplish this.
Modifying IoT Software for ULINKpro Source Code Changes The code changes required to use the ULINKpro are minimal and involve redirecting all printf and puts output to the ITM SWV output. This is accomplished in the project by modifying the following files: config_me.h: By adding the _ULINK_PRINT print define in the “C/C++”...
Running/Debugging the Program After all changes are made, build the project so it operates correctly with μVision and the ULINKpro. 1. Press the debug button to have it flash programmed to the FRDM-K64F board and have the debugger start After the program is flashed into the device and the debugger starts, a screen similar to the following appears: 2.
When using the mbed.org on-line IDE, use the SDA-USB port for outputting debug/information messages. This is intrusive in that it takes time and cycles to send the data out the USB port. When you move to the Keil/ULINKpro environment, you must re-target the debug/information messages.
Need help?
Do you have a question about the ULINKpro and is the answer not in the manual?
Questions and answers