Nu-Link Command Tool User Manual - V2.05
Nu-Link Command Tool User Manual - V2.05
ARM® Cortex® -M
32-bit Microcontroller
NuMicro® Family
Nu-Link Command Tool
User Manual
Nuvoton is providing this document only for reference purposes of NuMicro microcontroller based system
design. Nuvoton assumes no responsibility for errors or omissions.
All data and specifications are subject to change without notice.
Table of Contents
1 OVERVIEW ......................................................................................... 4
1.1 Supported Chips ....................................................................................... 4
2 NU-LINK COMMAND TOOL ..................................................................... 8
2.1 Installing the Nu-Link Command Tool .............................................................. 8
2.2 Launching the Nu-Link Command Tool ........................................................... 10
2.3 Limitation of Using Multiple Nu-Link Dongles .................................................... 11
2.4 Command Format .................................................................................... 11
2.4.1 Nu-Link ID ...................................................................................................... 12
2.4.2 Options ......................................................................................................... 12
2.4.3 Example for Programming APROM ........................................................................ 28
List of Figures
Figure 1-1 Nu-Link Command Tool System Block Diagram ............................................................ 4
Figure 2-1 Language Selection Form .............................................................................................. 8
Figure 2-2 Setup Wizard Form ......................................................................................................... 8
Figure 2-3 Install Path Selection Form ............................................................................................. 8
Figure 2-4 Shortcut Path Setting Form ............................................................................................ 9
Figure 2-5 Installation Information Confirmation Form..................................................................... 9
Figure 2-6 Setup Completely Form .................................................................................................. 9
Figure 2-7 Open Windows Command Prompt ............................................................................... 10
Figure 2-8 Launch Nu-Link.exe by Using Windows Command Prompt ........................................ 10
Figure 2-9 Multiple Nu-Link ICE Dongle Connection Illustration. ................................................... 11
Figure 2-10 Use -d Command to Dump Data from Device to File ................................................. 13
Figure 2-11 Use -l Command to Display Nu-Link ID ...................................................................... 14
Figure 2-12 Use -r Command to Read Config 0 Value .................................................................. 16
Figure 2-13 Use -w Command to Write Config 0 Value ................................................................. 18
Figure 2-14 Use -v Command to Verify Config 0 Value ................................................................. 20
Figure 2-15 Use -e Command to Erase Chip ................................................................................. 22
Figure 2-16 Use -reset Command to Reset Target Chip ............................................................... 23
Figure 2-17 Use -p Command to Display the Part Number of Target Chip ................................... 24
Figure 2-18 Use -version Command to Display Application and Nu-Link Firmware Version ........ 25
1 OVERVIEW
The Nu-Link Command Tool is a Win32 console application consisting of functions to access
®
Flash memory embedded in a NuMicro MCU via a Nu-link dongle. Besides, it also provide
functions to update Nu-Link dongle firmware. All these functions are enabled by input options
which will be introduced in Chapter 2.
With the Nu-Link Command Tool, users are able to erase, program and dump Flash according to
their requirements. In other words, users can create their customized Flash programming tool. In
Chapter 3, a simple Windows application program is introduced for reference.
NU-LINK COMMAND TOOL USER MANUAL
M0518 series
M0518AE
M0519 series
M0519AE
M0564 series
M0564AE
M058S series
M058SAN
Mini51 series
Mini51/Mini52/Mini54AN
Mini51/Mini52/Mini54DE
Mini55DE
Mini57 series
Mini57DE
Mini58 series
Mini58DE
NM1120 series
NM1120AE
NM1200 series
NM1500 series
NM1510AE
NM1530AE
NM1520AE
NM1810 series
NM1810AE
NM1820 series
NM1820AE
NUC029 series
NUC029AN
NUC029AE
Nano100 series
Nano100AN
Nano100BN
Nano103 series
Nano103AE
Nano112 series
Nano102AN
Nano112AN
NUC100 series
NUC100AN
NUC100BN
NUC100CN
NUC100DN
NUC121 series
NUC121AE
NUC125AE
NUC122 series
NU-LINK COMMAND TOOL USER MANUAL
NUC122AN
NUC123 series
NUC123AN
NUC123AE
NUC126 series
NUC126AE
NUC131 series
NUC131AE
NUC200 series
NUC200AN
NUC220AN
NUC230AE
NUC240AE
NUC400 series
NUC442AE
NUC472AE
M2351 series
M2351AE
M451 series
M451AE
M452AE
M453AE
M451MAE
M480 series
M481AE
M482AE
M483AE
M484AE
M485AE
M487AE
8051 1T series
N76E885
Windows XP
The Nu-Link Command Tool can support up to 8 Nu-Link dongles on Windows XP. However,
there is a known problem when using multiple Nu-Link ICE dongles. The programming and
response time will be increased while using multiple Nu-Link ICE dongles. The programming
performance will be decreased if more and more Nu-Link ICE dongles are used. The OS
operating performance may decrease significantly if some Nu-Link ICE dongle connections are
created.
Windows 7
User can connect 4 USB 4-port hubs to PC and connect 4 Nu-Link ICE dongles into each hub.
Note: NuLink is the execution name of Nu-Link Command Tool and it is case sensitive.
2.4.1 Nu-Link ID
Each Nu-Link has one ID. User can select a corresponding ID to control a specified Nu-Link
dongle.
2.4.2 Options
Options Description
-version Display Nu-Link Command Tool and firmware of Nu-Link ICE dongle version
>NuLink –l
Example:
>NuLink –l
>NuLink [Nu-Link ID] -r SPIFLASH [file] address [value1] size [value2] channel [value3]
Remark:
If more than one Nu-Link ICE dongles plug into one PC and no Nu-Link ID is specified, the command
might not work.
Example:
Display UCID value from chip on screen.
Read APROM data of target chip with Nu-Link ID 0x12345678 and save data to file.
Read SPI flash data of target chip with range (0x0~0x1000) and save data to file.
>NuLink –r CFG0
>NuLink [Nu-Link ID] -w SPIFLASH [file/value] address [value1] channel [value2] key0 [value3]
key1 [value4]
Remark:
If more than one Nu-Link ICE dongles plug into one PC and no Nu-Link ID is specified, the command
Example:
Program 0xFFFFFFFE value to config0 through Nu-Link ID 0x12345678.
Program APROM data of target chip with Nu-Link ID 0x12345678 from file.
Program SPI flash data of target chip with base address 0x0 from file.
Remark: Secure key0 of SPI flash is 0x123 and Secure key1 of SPI flash is 0x456. Use non-zero
value of secure key to encrypt file data and program encrypted data to SPI flash. Use zero value of
secure key to program file data to SPI flash without encrypted.
Remark:
If more than one Nu-Link ICE dongles plug into one PC and no Nu-Link ID is specified, the command
might not work.
Example:
Verify Config0 with data 0xFFFFFFFE through Nu-Link ID 0x12345678.
Verify LDROM data of target chip with Nu-Link ID 0x12345678 from file.
Verify SPI flash data of target chip with base address 0x0 from file.
>NuLink [Nu-Link ID] –e SPIFLASH address [value1] size [value2] channel [value3]
Remark:
If more than one Nu-Link ICE dongles plug into one PC and no Nu-Link ID is specified, the command
might not work.
Example:
Erase LDROM data of target chip.
>NuLink –e LDROM
>NuLink –e APROM
>NuLink –e DATAROM
Erase whole chip data including config0, config1, config2, config3, LDROM, APROM, DATAROM,
SPROM, SPROM2, SPROM3, KPROM.
>NuLink –e all
Example:
Reset target chip with Nu-Link ID 0x12345678.
>NuLink –reset
>NuLink –p
Remark:
This command only supports one Nu-Link ICE dongle plugged into one PC.
Example:
Display the part number of target chip.
>NuLink –p
NU-LINK COMMAND TOOL USER MANUAL
Figure 2-17 Use -p Command to Display the Part Number of Target Chip
2.4.2.9 Display Nu-Link Command Tool and Firmware Version of Nu-Link ICE Dongle
Command: Display Nu-Link Command Tool and firmware of Nu-Link ICE version.
>NuLink –version
Remark:
This command only supports one Nu-Link ICE dongle plugged into one PC.
The Nu-Link firmware version is the firmware version of Nu-Link ICE dongle plugged into current PC.
The current application version is the version of Nu-Link Command Tool.
Example:
Display Nu-Link Command Tool and Firmware of Nu-Link ICE Dongle Version.
>NuLink –version
Figure 2-18 Use -version Command to Display Application and Nu-Link Firmware Version
>NuLink –update
Remark:
This command only supports one Nu-Link ICE dongle plug into one PC.
If the Nu-Link firmware version and the current application version are different, the firmware version
will be updated to current application version by executing the command.
Example:
Update firmware of Nu-Link ICE dongle.
>NuLink –update
NU-LINK COMMAND TOOL USER MANUAL
Example:
Disconnect from target chip with Nu-Link ID 0x12345678.
>NuLink –disconnect
The following step is an example about writing “APROM.bin” file data to APROM of target chip and
verifying and reading data after writing APROM data. Finally, the target chip will be reset.
>NuLink –e APROM
>Nulink –reset
3.1 Environment
The Vendor UI Tool is based on the Nu-Link Command Tool. Therefore, user needs to install
the Nu-Link Command Tool before executing Vendor UI.
The default path of execution file of the Nu-Link Command Tool is “C:\Program Files\Nuvoton
Tools\NuLink Command Tool”.
A prebuilt execution version is located at “C:\Program Files\Nuvoton Tools\NuLink Command
Tool\NuLinkVendorUI.exe”.
Step3:
Click the “LDROM”, “APROM” or “Data” button to select a bin file from disk.
The command of cmd.exe has length limit. For Microsoft Windows XP or later, the maximum
length of the string that you can use at the command prompt is 8191 characters. For Microsoft
Windows 2000 or Windows NT 4.0, the maximum length of the string that you can use at the
command prompt is 2047 characters.
For example, if the command length is over the limit, the cmd.exe will display “Command format
Error!!!” message.
NU-LINK COMMAND TOOL USER MANUAL
Figure 3-3 Display Error Message Due to Command Length is Too Long
Step 4:
Click the “Update” button and start to update program through all connected Nu-Link devices.
All connected Nu-Link device ID will be listed in the list section below the “Update” button.
4 SPECIFIC SERIES
5 REVISION HISTORY
Important Notice
Nuvoton Products are neither intended nor warranted for usage in systems or equipment, any
malfunction or failure of which may cause loss of human life, bodily injury or severe property
damage. Such applications are deemed, “Insecure Usage”.
Insecure usage includes, but is not limited to: equipment for surgical implementation, atomic
energy control instruments, airplane or spaceship instruments, the control or operation of
dynamic, brake or safety systems designed for vehicular use, traffic signal instruments, all
types of safety devices, and other applications intended to support or sustain life.
All Insecure Usage shall be made at customer’s risk, and in the event that third parties lay
claims to Nuvoton as a result of customer’s Insecure Usage, customer shall indemnify the
damages and liabilities thus incurred by Nuvoton.