FDI ΣYG-S7G2 Modular Development Kit User Guide

July 3, 2024
FDI

ΣYG-S7G2 Modular Development Kit

“`html

Product Information

Specifications:

  • Product Name: SEGGER J-Link
  • Download Speed: Up to 4 MBytes/s
  • Supported CPUs: Wide range
  • Breakpoints: Unlimited in flash memory of MCUs

Product Usage Instructions:

1. SEGGER J-Link Overview

The SEGGER J-Link is a debug probe known for its reliability and
extensive feature set. It offers high download speeds and supports
a wide range of CPUs. Follow the steps below to use the SEGGER
J-Link:

2. Installation

To install the SEGGER J-Link software on your PC, follow these
steps:

  1. Visit SEGGER’s J-Link Downloads page here.

  2. Download the software package compatible with your operating
    system.

  3. Run the downloaded .exe file and follow the onscreen
    instructions to complete the installation.

3. Programming uEZ GUI Units

To program uEZ GUI units using the SEGGER J-Link, refer to the
J-Link User’s manual and online wiki for detailed instructions.
Make sure to connect the J-Link to your unit correctly before
programming.

4. Recovering from a Bad Program

If you encounter issues with a program, follow the recovery
steps mentioned in the user manual. You can also refer to FDI
Examples for guidance on recovering the unit.

Frequently Asked Questions (FAQ):

Q: Can I use SEGGER J-Link with any development

environment?

A: Yes, SEGGER J-Link is compatible with all popular development
environments.

adapters?

A: Visit SEGGER’s website for off-the-shelf adapters compatible
with various MCUs and debug connectors.

“`

JTAG Programming of µEZ GUI yG
Other FDI Products
Copyright ©2024, Future Designs, Inc., All Rights Reserved

Table of Contents
1.0 Introduction………………………………………………………………………………………………………………………. 3 1.1 SEGGER J-Link…………………………………………………………………………………………………………….. 3 1.2 SEGGER J-Link PC Installation………………………………………………………………………………………. 3
2.0 Production Line Programming (Programing with Script Files)………………………………………………… 4 2.1 Associating the Script File with the SEGGER Tools ………………………………………………………….. 4 2.2 Converting HEX Files to Binary Files………………………………………………………………………………. 6 2.3 Setting up the Script File…………………………………………………………………………………………………. 8 2.3.1 NXP LPC1788 ………………………………………………………………………………………………………… 9 2.3.2 NXP LPC4088 ………………………………………………………………………………………………………. 10 2.3.3 NXP LPC4357 ………………………………………………………………………………………………………. 11 2.3.4 Renesas Synergy ……………………………………………………………………………………………………. 12 2.3.5 Renesas RA with multiple flash loader……………………………………………………………………… 13 2.3.6 Renesas RX62N …………………………………………………………………………………………………….. 15 2.3.7 Renesas RX63N …………………………………………………………………………………………………….. 15 2.4 Setting up the hardware ………………………………………………………………………………………………… 16 2.5 Running the Script File …………………………………………………………………………………………………. 17
3.0 Production Programming ………………………………………………………………………………………………….. 19 3.1 Required License …………………………………………………………………………………………………………. 19 3.2 Setting up the J-Flash Project ………………………………………………………………………………………… 19 3.3 Creating *.jflash File with GUI ……………………………………………………………………………………… 19 3.4 Creating a Batch File to run J-Flash ……………………………………………………………………………….. 22
4.0 Recovering from a Bad Program ……………………………………………………………………………………….. 23 4.1 FDI Examples ……………………………………………………………………………………………………………… 23 4.2 Recovering the Unit ……………………………………………………………………………………………………… 23
5.0 Appendix A …………………………………………………………………………………………………………………….. 26
Information in this document is provided solely to enable the use of Future Designs products. FDI assumes no liability whatsoever, including infringement of any patent or copyright. FDI reserves the right to make changes to these specifications at any time, without notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Future Designs, Inc. 996 A Cleaner Way, Huntsville, AL 35805
NOTE: The inclusion of vendor software products in this kit does not imply an endorsement of the product by Future Designs, Inc. 2024 Future Designs, Inc. All rights reserved.
For more information on FDI or our products please visit www.teamfdi.com.
EZ® is a registered trademark of Future Designs, Inc. Microsoft, MS-DOS, Windows, Windows XP, Microsoft Word are registered trademarks of Microsoft Corporation. Other brand names are trademarks or registered trademarks of their respective owners.
FDI PN: MA00053 Revision: Rev 1.09, 05/30/2024 Printed in the United States of America
Page 2 of 26

1.0 Introduction
This document outlines the steps to program uEZ GUI units using the SEGGER J-Link and the PC tools provided by SEGGER. Refer to the J-Link User’s manual and online wiki for more details.
https://www.segger.com/admin/uploads/productDocs/UM08001_JLink.pdf https://wiki.segger.com/UM08001_J-Link_/_J-Trace_User_Guide
1.1 SEGGER J-Link SEGGER J-Links are a widely used line of debug probes. They’ve been proven for more than 10 years with over 250,000 units sold, including OEM versions and on-board solutions. They have an extensive feature set, large number of supported CPUs, and compatibility with all popular development environments.
With up to 4 MBytes/s download speed to RAM, flashloaders, and the ability to set an unlimited number of breakpoints in flash memory of MCUs, the J-Link debug probes are a great choice to optimize your debugging and flash programming experience.
More information and a nice matrix showing the different models can be found on their website: https://www.segger.com/products/debug-probes/j-link/.
Off-the-shelf adapters are available for several types of MCUs and debug connectors: https://www.segger.com/products/debug- probes/j-link/accessories/adapters/overview/
1.2 SEGGER J-Link PC Installation To install SEGGER’s J-Link software, visit their website’s J-Link Downloads page here. https://www.segger.com/downloads/jlink/. From this page, select to download the most recent software package based on your operating system. For the purposes of this example, here is what a Windows user would select.

Figure 1: SEGGER J-Link Software Download

Page 3 of 26

Accept SEGGER’s Terms of Use on the following page. From here your computer will download a .zip file of the format “JLink_OOOSSS_VXXXX.exe”. Run the .exe file. Follow the onscreen instructions from the installer, and the SEGGER tools will be installed on your computer.
2.0 Production Line Programming (Programing with Script Files)
Script files can be used to program uEZ GUI units without having a complete IDE toolset installed on your PC. This is useful for non-engineering users who might not have a licensed compiler and tool suite available for every PC, or want to bother with all of the complex set up required for software development; they just want to program units in a production or test environment. Once the SEGGER Tools are installed on the PC a few one-time setups are required to associate the files with the proper program. 2.1 Associating the Script File with the SEGGER Tools This step assumes you have already downloaded and installed the SEGGER tools from their website and installed them on the PC.
1. Double click on the .jlink file, if the file type has not be associated you will see a Windows Dialog similar that in Figure: 3. (You can do this with any .jlink file. We provide a number in our SorceForge uEZDemos directory, located in the “Precompiled FDI Demos” folder. When writing this document, I used uEZGUI-1788-43WQR_Debug.jlink.)
Figure: 2 How do you want to open this file?
2. Click on “More apps” and the dialog box shown in Figure 3 will be displayed.
Page 4 of 26

Figure: 3 How do you want to open this file?
3. Click on the check box “Always use this app to open .jlink files”. 4. Click on the “Look for another app on this PC”. (You may have to scroll down the list to find
this option.) 5. Click on the button. 6. The “Open with” dialog box will open. Browse to the default SEGGER install directory. For a
64-bit Windows installation, it will be “C:Program FilesSEGGERJlink”. Refer to Figure 4. 7. Double click on the file “JLink.exe”.

Figure 4: Windows Open with Dialog.

Page 5 of 26

2.2 Converting HEX Files to Binary Files Most IDEs can be set up to generate a binary file by default. But in many cases, you desire to work with a HEX file and may need to convert it to binary (for example to encrypt it) before being able to program it into the micro-controller. To convert the HEX file to the appropriate type, follow the instructions below. NOTE: The following procedure only works when the entire HEX file is stored inside the internal flash. If the binary file is larger than the internal flash of the MCU it will not program correctly. (Most uEZ GUI models have 512KB of internal flash.)
1. In the Windows Start Menu, SEGGER J-Link subdirectory, click on to open J-Flash, refer to Figure 5. (We were using version V7.82 when we wrote this document.)
Figure 5: J-Flash in the windows Start Menu
2. When J-Flash starts (and until you select “Do not show this message again”) the Welcome to JFlash Dialog Box will appear. Close this dialog box by clicking on the in the top right of the window, Figure 6.
Figure 6: Welcome to J-Flash Dialog Box
3. Within J-Flash a. Let’s open the file you want to convert: i. Within Windows File Explorer, locate the file you wish to convert and drag it into the J-Flash window that states “Drag & Drop data file here”. Page 6 of 26

b. Now, let’s save the file in the binary format needed by J-Link. i. From the top menu, select “File->Save Data File As”. ii. In the “Save as type:” pull down box, select “Binary file (*.bin)”.
iii. Click (see Figure 11).
Figure 7: Save data file as Dialog
c. In the “Enter address range” dialog box: i. Do not adjust the Start address or End address as these are calculated automatically from the HEX file. Refer to Figure 8.
Figure 8: Enter address range dialog
ii. Click to save the file. d. The file is now in an alternate format for use by a script file. Notice in Figure 9 that the
bin file is considerably smaller than the hex file.
Figure 9: Converted binary file.
Note: When using a hex file with multiple ranges, separate bin files will need to be created to avoid creating multi-gigabyte files that will attempt to program non-existent ranges. This procedure can be done from the J-Flash command line also.
Page 7 of 26

2.3 Setting up the Script File The script files are unique to each MCU and type of release. Below are various script files that FDI uses during testing and release. You can find the examples for each uEZGUI in /uEZ_v2.14.000/uEZDemos/Utilities/ProgramScripts/ of a uEZ release on Sourceforge. For more information on the scripting within the script files see the J-Link User’s Manual and wiki. When using a hex file, a single hex file can contain both internal flash and external flash for the application, and will require no extra parameters for the “loadfile” command. When using bin files, a separate file and starting address will need to be provided for each region. For newer Cortex-M MCUs with common quad, octal, or 16-bit SPI external flash no special configuration or loader will be required, SEGGER will provide this for targeted pin-outs and common flash parts. For some MCUs registers may need to be setup before programming as shown in the LPC1788 example and Appendix A. Normally erase should be called over a specific range (as shown in LPC1788 example) and the normal erase command may not erase the external flash. If external flash is fully erased it can potentially take several minutes to complete depending on the size of the flash. Be careful that a J-Link can erase the non-volatile EEPROM of some MCUs when calling the erase command. For some MCUs, SEGGER will have a separate named device to prevent accidentally disabling the JTAG interface. On these MCUs the text “(allow XXX)” will need to be added to the device name to program the full chip, otherwise the protected region will not be programmed. Note that LPC1788, LPC4088, and LPC4357 do not have this protection in SEGGER J-Link. The CRP region will need to be manually avoided. Note that specifically in a .jlink file there should NOT be any spaces after the last character on the line or the script will fail. Below are some examples of the required names.
Please refer to “LPC Code Read Protection Readme.pdf” in the uEZ release for more details.
Page 8 of 26

2.3.1 NXP LPC1788
The example scripts below were taken from the uEZ 2.14 release in the the directory: “/uEZ_v2.14.000/uEZDemos/Utilities/ProgramScripts/LPC17XX_ProgramScripts”

LPC1788.jlink
ExitOnError 1 usb 0 device LPC1788 si SWD speed 1000
rx 200 h w4 0x400FC1A0 0x20 w4 0x400FC104 0x01 w4 0x400FC080 0x00 w4 0x400FC08C 0xAA w4 0x400FC08C 0x55 w4 0x400FC10C 0x01 w4 0x400FC000 0x3A w4 0x400FC040 0x01
erase 0x0, 0x7FFFF loadfile “LPC1788.hex”

program.sh

!/bin/sh # /opt/SEGGER/JLink is default symlink dir of new SEGGER releases

/opt/SEGGER/JLink/JLinkExe -CommanderScript “LPC1788.jlink” if [ $? = “0” ] then
exit 0 else
echo “Error programing unit!” 1>&2 echo echo Check that power is properly applied to the unit echo Check that the Segger J-Link is connected to the USB HUB echo and the ready light is solid Green echo Check that the Segger J-Link is connected to the unit
echo cat JLink.log exit 1
fi

rx 200 g qc
program.bat
@ECHO off REM Change to current path of batch script cd /d %~dp0 “C:Program FilesSEGGERJLinkJLink.exe” -CommanderScript “LPC1788.jlink” > JLink.log.txt REM JLink.exe only has two values for ERRORLEVEL: 0 and 1 REM see https://wiki.segger.com/J-Link_Commander#JLink.exe_return_value

IF ERRORLEVEL 1 goto ERROR goto END
:ERROR ECHO Error programing unit! ECHO ECHO Check that power is properly applied to the unit ECHO Check that the Segger J-Link is connected to the USB Port ECHO and the ready light is solid Green ECHO Check that the Segger J-Link is connected to the unit ECHO more JLink.log.txt pause
exit 1
:END
exit 0

Page 9 of 26

2.3.2 NXP LPC4088
The example scripts below were taken from the uEZ 2.14 release in the the directory: “/uEZ_v2.14.000/uEZDemos/Utilities/ProgramScripts/LPC40XX_ProgramScripts”

LPC4088.jlink
ExitOnError 1 usb 0 device LPC4088 si SWD speed 1000
rx 200 h w4 0x400FC1A0 0x20 w4 0x400FC104 0x01 w4 0x400FC080 0x00 w4 0x400FC08C 0xAA w4 0x400FC08C 0x55 w4 0x400FC10C 0x01 w4 0x400FC000 0x3A w4 0x400FC040 0x01
erase 0x0, 0x7FFFF loadfile “LPC4088.hex”

program.sh

!/bin/sh # /opt/SEGGER/JLink is default symlink dir of new SEGGER releases

/opt/SEGGER/JLink/JLinkExe -CommanderScript “LPC4088.jlink” if [ $? = “0” ] then
exit 0 else
echo “Error programing unit!” 1>&2 echo echo Check that power is properly applied to the unit echo Check that the Segger J-Link is connected to the USB HUB echo and the ready light is solid Green echo Check that the Segger J-Link is connected to the unit
echo cat JLink.log exit 1
fi

rx 200 g qc
program.bat
@ECHO off cd /d %~dp0 “C:Program FilesSEGGERJLinkJLink.exe” -CommanderScript “LPC4088.jlink” > JLink.log.txt REM JLink.exe only has two values for ERRORLEVEL: 0 and 1 REM see https://wiki.segger.com/J-Link_Commander#JLink.exe_return_value

IF ERRORLEVEL 1 goto ERROR goto END
:ERROR ECHO Error programing unit! ECHO ECHO Check that power is properly applied to the unit ECHO Check that the Segger J-Link is connected to the USB Port ECHO and the ready light is solid Green ECHO Check that the Segger J-Link is connected to the unit ECHO more JLink.log.txt pause
exit 1
:END
exit 0

Page 10 of 26

2.3.3 NXP LPC4357
Note: J-Link can only program this LPC by connecting to the Cortex-M4. When using a Cortex-M0 project use the corresponding Cortex-M4 script or project to program the Cortex-M0 hex file. The Cortex-M0 can interfere with programming as normally when connecting to the Cortex-M4 and issuing the halt command, the Cortex-M0 may stay running in the background. Issuing the erase region command, halting immediately, or connecting to the Cortex-M0 first and halting it (not shown) are possible workarounds. This example shows erasing 2 different regions. This examples shows how to change the reset type.
The example scripts below were taken from the uEZ 2.14 release in the the directory: “/uEZ_v2.14.000/uEZDemos/Utilities/ProgramScripts/LPC43XX_ProgramScripts”

LPC43XX.jlink

program.sh

ExitOnError 1 usb 0 device LPC4357_M4 si SWD speed 12000 RSetType 2 rx 200 h
erase 0x1a000000, 0x1a07FFFF erase 0x1b000000, 0x1b07FFFF loadfile “LPC4357_M4.hex”
rx 200 g qc

!/bin/sh /opt/SEGGER/JLink/JLinkExe -CommanderScript “LPC43XX.jlink” if [ $?

= “0” ] then
exit 0 else
echo “Error programing unit!” 1>&2 echo
echo Check that power is properly applied to the unit echo Check that the Segger J-Link is connected to the USB HUB echo and the ready light is solid Green echo Check that the Segger J-Link is connected to the unit
echo
cat JLink.log exit 1
fi

program.bat

@ECHO off cd /d %~dp0 “C:Program FilesSEGGERJLinkJLink.exe” -CommanderScript “LPC43XX.jlink” > JLink.log.txt REM JLink.exe only has two values for ERRORLEVEL: 0 and 1 REM see https://wiki.segger.com/J-Link_Commander#JLink.exe_return_value

IF ERRORLEVEL 1 goto ERROR goto END
:ERROR ECHO Error programing unit! ECHO ECHO Check that power is properly applied to the unit ECHO Check that the Segger J-Link is connected to the USB Port ECHO and the ready light is solid Green ECHO Check that the Segger J-Link is connected to the unit ECHO more JLink.log.txt pause
exit 1
:END
exit 0

Page 11 of 26

2.3.4 Renesas Synergy
The example below is for the FDI SYG-70CP-BA or SYG-S7G2-SOM (Cortex-M4). Other Renesas Synergy parts will be similar.

S7G2.jlink

program.sh

ExitOnError 1 usb 0 device R7FS7G27H si SWD speed 12000
rx 100 h
erase 0x0, 0x3FFFFF loadfile “S7G2.hex”
rx 100 g qc

!/bin/sh # /opt/SEGGER/JLink is default symlink dir of new SEGGER releases

/opt/SEGGER/JLink/JLinkExe -CommanderScript “S7G2.jlink” if [ $? = “0” ] then
exit 0 else
echo “Error programing unit!” 1>&2 echo
echo Check that power is properly applied to the unit echo Check that the Segger J-Link is connected to the USB HUB echo and the ready light is solid Green echo Check that the Segger J-Link is connected to the unit
echo
cat JLink.log exit 1
fi

program.bat

@ECHO off REM Change to current path of batch script cd /d %~dp0 “C:Program FilesSEGGERJLinkJLink.exe” -CommanderScript “S7G2.jlink” > JLink.log.txt REM JLink.exe only has two values for ERRORLEVEL: 0 and 1 REM see https://wiki.segger.com/J-Link_Commander#JLink.exe_return_value

IF ERRORLEVEL 1 goto ERROR goto END
:ERROR ECHO Error programing unit! ECHO ECHO Check that power is properly applied to the unit ECHO Check that the Segger J-Link is connected to the USB Port ECHO and the ready light is solid Green ECHO Check that the Segger J-Link is connected to the unit ECHO more JLink.log.txt pause
exit 1
:END
exit 0

Page 12 of 26

2.3.5 Renesas RA with multiple flash loader
This example shows how to use the multiple flash loader which is available on several CortexM33/M55/M85 MCUs to access a quad SPI on a specific set of pins (at address 0x60000000). The QSPI can be read back and erased as shown. If the hex file contains data for the QSPI, it will be programmed automatically. See the following page for more details: https://wiki.segger.com/JLink_Multiple_Flashloader
RA4M2_CM33.jlink
ExitOnError 1 usb 0 si SWD speed 1000
rx 200 h
savebin test.bin, 0x60000000, 0x800000 erase 0x0, 0x7FFFF erase 0x60000000, 0x7FFFF loadfile “RA4M2_CM33.hex”
rx 200 g qc
program.sh

!/bin/sh # Note that this is a 1 line command below:

/opt/SEGGER/JLink/JLinkExe -CommanderScript “RA4M2_CM33.jlink” -device “R7FA4M2AD?BankAddr=0x60000000&Loader=CLK@P214_nCS@P207_D0@P211_D1@P210_D2@P209_D3@P208”
if [ $? = “0” ] then
exit 0 else
echo “Error programing unit!” 1>&2 echo echo Check that power is properly applied to the unit echo Check that the Segger J-Link is connected to the USB HUB echo and the ready light is solid Green echo Check that the Segger J-Link is connected to the unit echo cat JLink.log exit 1 fi
program.bat
@ECHO off REM Change to current path of batch script cd /d %~dp0 REM Note that this is a 1 line command below: “C:Program FilesSEGGERJLinkJLink.exe” -CommanderScript “RA4M2_CM33.jlink” -device
Page 13 of 26

“R7FA4M2AD?BankAddr=0x60000000&Loader=CLK@P214_nCS@P207_D0@P211_D1@P210_D2@P209_D3@P208”

JLink.log.txt REM JLink.exe only has two values for ERRORLEVEL: 0 and 1 REM see https://wiki.segger.com/J-Link_Commander#JLink.exe_return_value IF ERRORLEVEL 1 goto ERROR goto END :ERROR ECHO Error programing unit! ECHO ECHO Check that power is properly applied to the unit ECHO Check that the Segger J-Link is connected to the USB Port ECHO and the ready light is solid Green ECHO Check that the Segger J-Link is connected to the unit ECHO more JLink.log.txt pause exit 1 :END exit 0
Note: In the J-Link initialization process the loader needs to be selected at or before the target device is selected.
Page 14 of 26

Note: Several different types of Renesas RX are supported by SEGGER J-Link, but require specific pin adapters for each major family. Most RX devices support slower JTAG clock rates than Cortex-M. SEGGER J-Link can run a faster clock than Renesas E1 Lite or E2 Lite.
See the following for details: https://www.segger.com/products/production/flasher/accessories/adapters/rx- adapter/ https://www.segger.com/products/production/flasher/accessories/adapters/rx- fine-adapter/
2.3.6 Renesas RX62N The example script below was tested with a uEZ graphical demo programmed from a SEGGER J-Link Ultra+ using a 20 to 14 pin Renesas adapter in combination with the FDI HW specific adapter.
uEZGUI-RX62N-35QT_HEW.jlink
ExitOnError 1 usb 0 device RX62N si jtag jtagconf -1,-1 speed 4000 loadfile “uEZGUI-RX62N-35QT_HEW.hex” rx 200 g qc
2.3.7 Renesas RX63N The example script below was tested with a uEZ graphical demo programmed from a SEGGER J-Link Ultra+ using a 20 to 14 pin Renesas adapter in combination with the FDI HW specific adapter.
DK-TS-RX63N_HEW.jlink
ExitOnError 1 usb 0 device RX63N si jtag jtagconf -1,-1 speed 2000 rx 500 loadfile “DK-TS-RX63N_HEW.hex” r g qc
Page 15 of 26

2.4 Setting up the hardware After completing the steps in section 2.1, Associating the Script File with the SEGGER Tools, section 2.3, Setting up the Script File the software setup is complete!
Now it is time to connect the hardware to the PC in preparation for programming:
1. Plug the J-Link’s USB cable into a free USB port on the PC. Note: The driver for the J-Link Lite will install automatically. If this is the first time using the device let the driver installation complete before proceeding.
2. Refer to Figure 10. On the right are the two different J-Link Lite boards that FDI includes in our kits. Determine which you are using then do one of the two steps below: a. If using the JLink-Lite-ARM: i. Connect the FDI JLINK- ARM-AD adapter to the J-Link Lite ARM using the 20pin cable. The FDI JLink- ARM-AD adapter comes with uEZ GUI kits that contain the J-Link Lite ARM and are also available at DigiKey. Refer to Figure 11.
NOTE: FDI JLINK-ARM-AD adapters are included with FDI Development Kits. If you need to purchase additional adapters they can be purchased from Digi-Key at this link: https://www.digikey.com/en/products/detail/JLINK-ARM- AD/6221039-ND/2631978
b. If using the JLink-Lite-Cortex-M: Some uEZ GUIs use an alternate connector that is the standard Cortex-M pinout and do not require an adapter.
i. Connect the J-Link Lite Cortex-M board to the cable and plug in into your target board.
c. If using the J-Link Base, J-Link Plus, J-Link Ultra+, Flasher ARM, etc: Some uEZ GUIs use an alternate connector that is the standard Cortex-M pinout and WILL require the 9-Pin Cortex-M Adapter. https://www.segger.com/products /debug-probes/j-link/accessories/adapters/9-pincortex-m-adapter/
i. Connect the J-Link Lite Cortex-M board to the cable and plug in into your target board.
Page 16 of 26

Figure 10: FDI JLINK-ARM-AD Adapter with J-Link Lite ARM and J-Link Lite Cortex-M
Figure 11: FDI JLINK-ARM_AD connected to UEZGUI-4088-43WQN-BA
NOTE: Some MCUs advise that power be applied before JTAG is connected to the unit. Refer to the manufacture’s documentation for more details on the specific board being programmed. Current LPC1788, LPC4088, LPC4357, RX62N, and RX63N FDI products can have JTAG and power connected in either order. 3. Connect power to the uEZ GUI. 2.5 Running the Script File 1. Double click the *.jlink file. A window like Figure 12 will appear to indicate that the unit was programed successfully. (Slight variations to this window appear as SEGGER makes changes to their software.)
Page 17 of 26

Figure 12: Successful Programming of uEZGUI-4357-70WVN-BA with SEGGER Tools v7.82
Page 18 of 26

3.0 Production Programming
Production programming is done using the J-Flash software. J-Flash returns a code that indicates the success (or failure) of the programming operation. This allows the production control program (maybe a batch file) to know if a device is programmed successfully (or not). This is the recommended method (from SEGGER) for volume programming unless the J-Link SDK is used. 3.1 Required License Use of the J-Flash utility requires a full featured J-Link (PLUS, PLUS Compact, ULTRA+, PRO, JTrace) or an additional license for the J-Link base model. 3.2 Setting up the J-Flash Project J-Flash projects can either be set up using the SEGGER GUI interface or by manually creating a text file with the appropriate parameters. This document outlines the procedure for creation within the GUI. The J-Flash program should remain in the normal installation directory. Using the calling script the created jflash project file and hex/bin files can be placed anywhere on the PC. 3.3 Creating *.jflash File with GUI
1. Open J-Flash via the Windows Start menu
Figure 13: J-Flash Windows Start Menu
2. In the “Welcome to J-Flash” Dialog Box, click in the radio button [Create new project] Page 19 of 26

Figure 14: J-Flash Welcome Dialog
3. Click [Start J-Flash] 4. In the Create New Project Dialog Box Click on the […] icon in the Target device area, Figure
15.
Figure 15 Target Device Setup, part 1
5. In the Target Device Settings Dialog Box, narrow the list by typing NXP into the Manufacturers Box.
6. Now type “LPC4088” into the Device search box.
Figure 16 Target Device Setup, part 2
7. Click on the line that shows “Cortex-M4” in the Core box, Figure 16 8. Click 9. In the Create New Project Dialog Box, click [OK] to accept the default settings.
Page 20 of 26

Figure 17 New project Setup
10. In the main J-Flash window, use Windows File Explorer to drag the HEX or BIN file into JFlash. NOTE: If you drag in a BIN file, you will need to provide the starting address.
11. Figure 17 shows our new project is complete.

Figure 18 New Project Review
12. From the File Menu, select [Save Project As]. 13. In the Save project as Dialog Box,

Page 21 of 26

a. Surf to where you desire this .jflash file to be located b. Enter a file name c. Click [Save] Figure 19 Save project as
3.4 Creating a Batch File to run J-Flash A batch file is useful to simplify the process for the production line and can also be called from an automated PC based tester. The following text initiates the JFlash.exe program with the appropriate parameters, erases the chip, auto programs, and exits the application with a return code. The second part of the batch file only serves to provide some useful debugging information.
program.bat
ECHO off “C:Program FilesSEGGERJLinkJFlash.exe” -openprjC:fdiProductsuEZGUI-1788-43WQRuEZGUI-1788-43WQRFCT.jflash -openC:fdiProductsuEZGUI-1788-43WQRuEZGUI-1788-43WQR.hex -erasechip -auto -startapp ­exit IF ERRORLEVEL 1 goto ERROR goto END :ERROR ECHO Error programing unit! ECHO ECHO Check that power is properly applied to the unit ECHO Check that the SEGGER J-Link is connected to the PC ECHO and the ready light is solid Green ECHO Check that the SEGGER J-Link is connected to the unit ECHO If in a fixture check that the connection to the fixture ECHO is properly interest ECHO If problems persist, insect the area of the board around U1 and Y2 ECHO more JFlashARM.log pause :END
Page 22 of 26

4.0 Recovering from a Bad Program
Should a board become unresponsive it may be possible to recover the unit using known good code. Follow the instructions in Production Line Programming (Programing with Script Files) to setup the PC, if you have not already done so. 4.1 FDI Examples Example script files and working demos can be found in the uEZ Release Package, available on sourceforge.net. The latest uEZ release can be found at: https://sourceforge.net/projects/uez/files/ After extracting the files, the standard demo files can be found in the folder “Precompiled FDI Demos”. 4.2 Recovering the Unit Units that have been corrupted can be recovered by shorting the ISP Entry pin to ground. This may be required if the PLL is not getting setup properly causing the J-Link to be unable to communicate; or if a unit was programmed with a start address containing something other than the correct start address of the internal flash. The later can happen when the project is setup for the FDI Bootloader, which requires a 64KB offset, but the Base Bootloader is not correctly installed by the user prior to programming. Typical symptoms of this issue would be a solid status LED on the unit (not flashing) and a failure message from the IDE or script file. Below are screen shots from the CrossWorks and IAR IDEs and running a script file showing the typical error message related to this issue.
Page 23 of 26

Figure 20: CrossWorks IDE JTAG failure Figure 21: IAR JTAG Failure Message

Figure 22: IAR JTAG Failure Message

Page 24 of 26

Figure 23: J-Link Script file error message
1. Unplug the JTAG connector and power off the unit. 2. Place the unit LCD down. 3. Using tweezers short pins 3 and 4 of the ISP header, keep the pins shorted until step 6 has
completed. Once the unit has started erasing/programming the short can be carefully removed.
Figure 24: uEZGUI-4088-43WQN-BA ISP Header
Page 25 of 26

Figure 25: Page 1 of the uEZGUI-4088-43WQN-BA Schematic
4. Power ON the unit. 5. Plug in the JTAG connector. 6. Run the script file.
5.0 Appendix A
Some versions of the SEGGER Tools require additional commands to properly program the LPC1788 and/or the LPC4088. Newer versions may not require these steps. The command “w4” is used to write 4 bytes or 1 32-bit word to a memory location.
· w4 0x400FC1A0 0x20 ­ Set the OSCEN bit in the System Controls and Status register to enable the main oscillator
· w4 0x400FC104 0x01 ­ Set the CCLKDIV bits in the CPU Clock Selection Register to set the input clock to divide by 1 to produce the CPU clock
· w4 0x400FC080 0x00 ­ Clear the bits of the PLL Configuration register for PPL0 · w4 0x400FC08C 0xAA ­ Write the first sequence value to the PLL0 Feed register · w4 0x400FC08C 0x55 ­ Write the second sequence value to the PLL0 Feed register · w4 0x400FC10C 0x01 ­ Set the CLKSRC to the main oscillator as the sysclk and PLL0 clock
source in the Clock Source Selection register · w4 0x400FC000 0x3A ­ Write the reset value in to the Flash Accelerator configuration register · w4 0x400FC040 0x01 ­ Place the processor into user mode by writing to the MAP bit of the
Memory Mapping Control register
Page 26 of 26

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

Related Manuals