What does this tool do?

The LPC18xx/43xx DFUSec utility is a Windows PC tool that provides support functions for LPC18xx/43xx microcontroller via USB. The tool is composed of 3 components: the Image Programmer, the LPC-Link 2 Configuration Tool, and the Security Support Tool (v2.00). This tool has been called the LPC18xx/43xx DFU Utility (DFUUtil) or DFUSec in versions prior to v1.10. DFUSec is the common name for the tool that covers all these components,

For instructions on how to use a specific capability of the DFUSec tool, use the menu on the right.

Where to download and download pre-requisites

Update: DFUSec and the LPC-Link 2 Configuration Tool are the same tool. Download DFUSec from the LCT link below and enable 'DFUSEC' mode by unchecking the Link2 lock button on the LCT file menu. As of v2.00 of the LCT, you no longer need to manually install .NET or the driver package - the installer will do that for you if it already isn't installed. WinUSB only needs to be installed on Windows XP machines - it is already part of Win 7/8. All you need to do is download and install the LCT.

Before you can use DFUSec, you'll need to install WINUSB and the Microsoft.NET framework 4.

DFUSec is available in pre-configured packages for the Image Programmer, Link Configuration Tool (LCT), and the (upcoming) Security Tool.

Image Programmer

The Image Programmer uses the USB DFU boot capability of the LPC18xx/43xx devices to program the internal FLASH or EEPROM, or the SPIFLASH on some boards. To do this, a small USB image is first downloaded to the board via USB using DFU and then it communicates with the PC application. To use the Image Programmer, the a USB port must be connected for USB boot with the LPC18xx/43xx device. Most commercial boards - such as boards from Embedded Artists, Hitex, Keil, and NGX - provide this support.

The Image Programmer provides the following capabilities:

  • In circuit programming and re-programming of internal FLASH and internal EEPROM on all LPC18xx/43xx devices via USB
  • In circuit programming and re-programming of some SPIFLASH devices available on LPC18xx/43xx boards
  • Smiple DFU download and execution of an image in IRAM with optional automated download whenever a board is plugged in
  • Optional checksum generation at program time
  • Boot header generation (needed by SPIFLASH or DFU boot)
  • Sequenced program operations for complex image layouts across multiple storage (internal FLASH, internal EEPROM, SPIFLASH) types - a single session can quickly program all storage with a single automated USB sessions
  • Extendable FLASH support - add support for other storage devices in the programming algorithm firmware

LPC-Link 2 Configuration tool

The LPC-Link 2 Configuration Tool is used to load firmware images onto the LPC-Link-2 board ir LPCXpresso V2 boards with the integrated LPC-Link 2 (LINK DFU) interface. This allows loading a firmware image that supports debugging via USB such as JLINK or CMSIS-DAP for development environments other than the LPCXpresso-IDE. To use the tool, select an image for a support LPC-Link 2 boards and follow the in-page instructions.

Security Support Tool (upcoming)

The Security Support Tool will be available with the DFUSec v2.00 release. This component of DFUSec adds the following capabilities:

  • AES key management - key and vector generation, programming, and (limited) key retrieval
  • Encrypted image generation with support for CMAC header
  • Boot mode locking - disable JTAG, USB, or other capabilities for production systems
  • Ability to encrypt FLASH binaries from Image Programmer to allow re-programming a secure board (if not locked)

LPC-Link 2 Configuration Tool

Important Notes : Read before downloading and using

  • The use of the LPC-Link2 Configuration Tool is no longer recommended
  • The functionality offered by this tool has been superseded by LPCScrypt
  • Download LPCScrypt to obtain the latest versions of CMSIS-DAP and J-Link firmware for LPC-Link2 or LPCXpresso V2/V3 boards.

The LPC-Link 2 Configuration Tool (LCT) is a Windows tool that installs the CMSIS-DAP/VCOM/LPCSIO or JLINK firmware on LPCXpresso V2/V3 and LPC-Link 2 boards. This package provides the Link Configuration Tool, all necessary Windows drivers, a User Manual, and the source and project files to rebuild the programming algorithm firmware used by the LCT. The V2 version provides expanded capability for LPCXpresso V2/V3 boards with improvements to CMSIS-DAP, a UART bridge connected to the target processor (LPCXpresso V2/V3 boards only), and a LPCSIO bridge that provides communication to I2C and SPI slave devices on LPCXpresso V3 boards. For LPC-Link 2 boards, an updated version of CMSIS-DAP provides faster programming and more stable operation. This version also adds support for J-Link - please see SEGGER's website for more information: for lpc-link2 boards and for LPCXpresso V2/V3 boards.

Firmware included in this package:

  • LPCXpresso V2/V3 boards: CMSIS-DAP debugger + VCOM (UART bridge connected to target processor) + LPCSIO bridge (I2C + SPI + GPIO bridge connected to target processor)
  • LPC-Link 2 boards: CMSIS-DAP firmware
  • LPC-Link 2 and LPCXpresso V2 and V3 boards: J-Link firmware

If you are using LPC-Link 2 or LPCXpresso V2/V3 boards with the LPCXpresso-IDE, you do not need to use this tool.

Note that the LCT requires NET4.5.1 to be installed prior to use. This package will automatically download and install NET4.5.1 if it is needed. The older v1.xx versions of the LCT require NET4 to be download and installed manually prior to use.

Getting Started

Go here to get a quick guide on how to use the LCT tool to install firmware on supported boards. The LCT installer will install a User Manual that shows the LCT steps to program the firmware into your board. This User Manual can be selected from the start menu.

Known issues

  • The LCT may not correctly enumerate when used with a Virtual Machine (VM). It is recommended not to use this on a VM.
  • Version of the LCT >= v2.01 will not work on Windows XP systems. You can only use the v2.00 older version for Windows XP systems. Download it here.

LPCScrypt Overview

Important Note :

From v1.5 onwards, LPCScrypt is the recommenced tool for programming the latest versions of CMSIS-DAP

and J-Link firmware onto LPC-Link2 or LPCXpresso V2/V3 boards.


LPCScrypt is a command-line based, fast flash, EEPROM, OTP and security programming tool for the LPC1800 and LPC4300 series of microcontrollers.

Key features include:

  • Multi-Platform Support (Windows, Mac, Linux)
  • Scriptable command line interface
  • Programming of internal and SPIFI flash
    • Support for a wide range of SPIFI devices (via use of LPCOpen lpcspifilib)
    • Optimised for high speed operation - typically 100-300KB/sec, depending upon flash device, host OS and host computer.
  • Programming EEPROM (internal flash parts only)
  • Programming One-Time Programmable (OTP) memory
  • Images and scripts to program LPC-Link2 and LPCXpresso V2/V3 debug probe firmware

LPCScrypt consists of two parts, a multi-platform command line tool and an MCU firmware monitor.

In use, the firmware monitor is downloaded to the target MCU using USB DFU support built into the on-chip ROM (using USB0 or USB1).

The firmware creates a virtual serial port (VCOM) over USB to communicate with the host.

The LPCScrypt host tool provides a command-line interface to the firmware, giving access to the programmable features of the MCU.

It can be invoked with a single command or a script file containing a sequence of commands.

Standard host tools, such as Windows batch files or Linux/Mac shell scripts, can be used with the LPCScrypt host tool to automate multiple operations,

such as binary file encryption, programming binary files to flash devices, setting boot options, configuring VID/PID, and finally simulating MCU reset.

LPCScrypt is flexible and fast, and is suitable for one off programming and testing or semi-automated production programming.

An enhanced version of LPCScrypt with additional support for the security features of the LPC18S00 and LPC43S00 parts is available,

subject to Export Control regulations. This enhanced version adds:

  • Generating and programming 128 bit AES keys
  • Encrypting and programming secure images

Contact your local NXP representative to obtain the enhanced version.

LPCScrypt Downloads

  Download Notes
  LPCScrypt Documentation Please download and read the documentation before installing/using LPCScrypt
Windows Installer v1.5.2 build 588 Supported platforms: Windows Vista or later, 32 or 64 bit
Mac OS X Installer v1.5.2 build 588 Supported platforms: Mac OS X Mountain Lion (10.8.5) or later
Linux Installer v1.5.2 build 588 Supported platforms: LPCScrypt is only tested and supported on recent distributions of Ubuntu and Fedora (32 or 64 bit). It *may* work on other distributions but we cannot provide support if it does not.

LPCScrypt LPC-Link2 configuration

LPC-Link2 can operate as both a debug probe and an development board for the LPC4370 MCU.

For exploring the LPC4370 with LPCScrypt:

• To boot from USB0: JP1 not fitted.

• To boot from SPIFI: JP1 fitted.

Note The MCU on the LPC-Link2 has no internal flash.

LPC-Link2 Debug Probe Firmware Programming

LPCScrypt is supplied with scripts to enable the programming of CMSIS-DAP and J-Link firmware images

into LPC-Link2 and LPCXpresso V2/V3 boards.

To make use of this functionality, configure the selected board to DFU Boot, then connect to the host computer via USB.

To install CMSIS-DAP debug firmware, open a command shell and call the program_CMSIS script:

\scripts\program_CMSIS

To install J-Link debug firmware, open a command shell and call the program_JLINK script:

\scripts\program_JLINK

For Windows uses, shortcuts to these scripts are available from the LPCScrypt entry on the Start menu.

Note

File paths in this document use Windows directory separators, on Linux or Mac OSX these must be replaced with ‘/’

These scripts will boot the LPCScrypt firmware on the selected board and

then choose the appropriate firmware image and program it into flash.

Once completed, follow the onscreen instructions to make use of the programmed debug probe.

For more information, please read the following sections for a detailed explanation of this procedure.

Note

The scripts offer the option to repeat the programming sequence to enable multiple debug probes to be programmed in sequence.

Debug Firmware Variants and Drivers

4.1 Firmware Variants

Separate firmware images are available for each LPC-Link2 variant for the following debug probe protocol implementations:

4.1.1 CMSIS-DAP

The CMSIS-DAP debug probe images allow debugging from any compatible toolchain,

including IAR EWARM, Keil MDK, as well as NXP’s LPCXpresso IDE.

As well as providing debug probe functionality, the default CMSIS-DAP image also provides:

• Support for SWO Trace capture from the LPCXpresso IDE

• Support for Power Measurement from the LPCXpresso IDE

• UART bridge connected to the target processor (LPCXpresso V2/V3 boards only),

• LPCSIO bridge that provides communication to I2C and SPI slave devices (LPCXpresso V3 boards only).

For more information please see:

http://www.lpcware.com/content/project/lpc-usb-serial-io-library

Note

If these additional features are not required, a version supporting debug features only is also provided.

For information on script options, see Section 7.2.

Note

LPCXpresso IDE does not require a CMSIS-DAP image to be programmed into the debug probe flash,

as it will normally be downloaded directly into the probe after power up.

However it can use a pre-programmed version if one is present.

4.1.2 Segger J-Link

J-Link is a trademark of Segger Embedded Software Solutions. More information about JLink can be found at: http://www.segger.com

Important Note

Please ensure that you read Segger’s licensing terms for these debug probe firmware images before using them.

For information on the use of J-Link with LPC-Link2 and LPCXpresso V2/V3, please see:

https://www.segger.com/lpc-link-2.html

https://www.segger.com/jlink-lpcxpresso-ob.html

The J-Link debug probe images allow the LPC-Link2/LPCXpressoV2/V3 board to operate as a J-Link debug probe

that works with tool chains that support the J-Link protocol such as IAR EWARM, Keil MDK, Rowley CrossWorks,

Atollic TrueSTUDIO, OpenOCD compatible tools as well as GDB-based tool chains such as emIDE.

J-Link can also be used with LPCXpresso IDE.

For details see:

https://www.segger.com/nxp-lpcxpresso.html

4.2 Drivers

You may need to install additional Windows drivers in order to make use of your debug probe.

For CMSIS-DAP, the Windows driver package if not already installed – for example by LPCXpresso IDE – can be found at:

http://www.lpcware.com/content/nxpfile/lpcxpresso-link2-usb-driverpackage

For J-Link, please check the Segger website for more information.

Programming (LPC-Link2)

To program a standalone LPC-Link2, first of all ensure that jumper JP1 is NOT fitted so that the probe will be DFU bootable at power on.

Figure 5.1. LPCLink2 DFU Boot

Then connect the board to your host computer over the debug link USB connector and in a command shell run either:

<LPCScrypt Install Dir>\scripts\program_CMSIS

or

<LPCScrypt Install Dir>\scripts\program_JLINK

Note:

The script will automatically detect the debug probe type and select the appropriate firmware version.

Once programming is complete, disconnect the board from the host, fit JP1, then reconnect the board to the host computer.

You should see the debug probe enumerate on the host’s USB system.

Advanced

LPC-Link2 is a dual purpose debug probe and test board.

The board contains a single LPC4370 MCU and 1MB of SPIFI flash memory.

Where as, LPCXpresso V2/V3 boards, contain a dedicated 43xx debug MCU (connected via the lower left USB port)

with internal Flash memory in addition to the target MCU.

Since the debug firmware is stored in the flash memory of the debug MCU, different images are required for these board.

7.1 Script steps

This section describes the operations carried out by the program_CMSIS and program_JLINK scripts.

The scripts perform the following steps:

1. Boots the debug probe with the LPCScrypt firmware.

• this is performed by calling the script \scripts \bootLPCScrypt

• if this operation succeeds, then the script will continue, otherwise, the script will terminate with an error

2. Tests for successful communication between the host and LPCScrypt

• \bin\LPCScrypt print 0x1234 is repeatedly called until sucessful communication is achieved.

• a ‘.’ is printed for each attempt 3. Identify the debug probe MCU.

• \bin\LPCScrypt querypart is called to return the part name

• based on the result, the flash type SPIFI or BANKA is selected

4. The appropriate image file is located in the LPCScrypt firmware directory based on the identified debug probe MCU.

• if this cannot be found an error will be generated and the script will terminate

5. LPCScrypt is called to program the image onto the chosen board.

• \bin\LPCScrypt program

• if the program operation should fail, an error will be generated and the script will terminate

6. If no error has been generated, the steps will be repeated for the next device to be connected.

Note:

• for LPC-Link2, the firmware is stored in the SPIFI flash memory at 0x14000000,

so the board must be configured to boot from SPIFI memory for the CMSIS-DAP

or J-Link firmware to be used after programming (by connecting the jumper JP1)

• for LPCXpresso V2/V3 boards, the firmware is stored in flash BankA at 0x1A000000,

so the board must be re-configured to boot from BankA for the CMSIS-DAP or J-Link firmware

to be used after programming (by removing DFU Link jumper)

LPCScrypt, DFUSec : USB FLASH download, programming, and security tool, LPC-Link 2 Configuration tool, Firmware Programming的更多相关文章

  1. MDK st-link下载STM32程序出现Internal command error和Error:Flash download failed. Target DLL

    MDK st-link下载STM32程序出现Internal command error和Error:Flash download failed. Target DLL   是因为目标板的芯片处于休眠 ...

  2. Error:Flash Download Failed-"Cortex-M3"

    Error:Flash Download Failed-"Cortex-M3"出现一般有两种情况: 1.SWD模式下,Debug菜单中,Reset菜单选项(Autodetect/H ...

  3. UEFI Bootable USB Flash Drive - Create in Windows(WIN7 WIN8)

    How to Create a Bootable UEFI USB Flash Drive for Installing Windows 7, Windows 8, or Windows 8.1 In ...

  4. Flash Download Failed-"Cortex-M3"

    rror:Flash Download Failed-"Cortex-M3"出现一般有两种情况: 1.SWD模式下,Debug菜单中,Reset菜单选项(Autodetect/HW ...

  5. Stm32_调试出现 Error:Flash Download Failed-"Cortex-M3"

    rror:Flash Download Failed-"Cortex-M3"出现一般有两种情况: 1.SWD模式下,Debug菜单中,Reset菜单选项(Autodetect/HW ...

  6. WinSetupFromUSB – Install Windows XP from USB Flash Drive

    http://myeeeguides.wordpress.com/2008/11/15/winsetupfromusb-install-windows-xp-from-usb-flash-drive/ ...

  7. Windows 7 USB DVD Download Tool

    1.下载.安装.运行Windows 7 USB DVD Download Tool: 百度官方下载 http://rj.baidu.com/soft/detail/20458.html 2.点击&qu ...

  8. CF# Educational Codeforces Round 3 A. USB Flash Drives

    A. USB Flash Drives time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  9. Codeforces Educational Codeforces Round 3 A. USB Flash Drives 水题

    A. USB Flash Drives 题目连接: http://www.codeforces.com/contest/609/problem/A Description Sean is trying ...

随机推荐

  1. 20155203 2016-2017-3 《Java程序设计》第5周学习总结

    20155203 2016-2017-3 <Java程序设计>第5周学习总结 教材学习内容总结 课堂知识总结 封装是继承的基础,继承是多态的基础.多态是用父类声明对象的引用,用子类生成对象 ...

  2. 第10月第5天 v8

    1. brew install v8 http://www.cnblogs.com/tinyjian/archive/2017/01/17/6294352.html http://blog.csdn. ...

  3. vsftp服务器部署

    环境:CentOS 6.6 目标:个人虚机部署vsftp服务器,供测试使用. 说明:步骤已改写为脚本,直接添加用户与对应的密码列表,调用函数名即可 ########################## ...

  4. MongoDB 之 Limit 选取 Skip 跳过 Sort 排序 MongoDB - 7

    我们已经学过MongoDB的 find() 查询功能了,在关系型数据库中的选取(limit),排序(sort) MongoDB中同样有,而且使用起来更是简单 首先我们看下添加几条Document进来 ...

  5. 《区块链100问》第13集:比特币和Q币有哪些不同?

    比特币是一种去中心化的数字资产,没有发行主体.Q币是由腾讯公司发行的电子货币,类似于电子积分,其实不是货币. Q币需要有中心化的发行机构,Q币因为腾讯公司的信用背书,才能被认可和使用.使用范围也局限在 ...

  6. Maven部署dao工程到私服上——(十三)

    1.修改settings.xml 需要在客户端即(部署dao工程)的电脑上配置 maven环境,并修改 settings.xml 文件,配置连接私服的用户和密码 . 此用户名和密码用于私服校验,因为私 ...

  7. springMVC版本和jdk版本不匹配造成的问题

    一个简单的例子项目,使用springMVC的版本是3.2,jdk的版本是1.7,使用的是注解的处理器适配器和处理器映射器.spring的xml配置文件中单独配置每个handler,可以正常的使用,如果 ...

  8. linux系统时间不同步解决办法(同步本地时间)

    改变/etc/目录下的localtime文件,既可以改变当前的时区 1.方法是到/usr/share/zoneinfo目录下找到你要相对应的时区文件,例如上海在/usr/share/zoneinfo/ ...

  9. LINUX下 USB转串口 【转】

    转自:http://blog.163.com/smilexiao_11015461/blog/static/2122052182012102410399459/ 1.将设备u口插入pc2.输入#lsm ...

  10. 基于Consul的数据库高可用架构【转】

    几个月没有更新博客了,已经长草了,特意来除草.本次主要分享如何利用consul来实现redis以及mysql的高可用.以前的公司mysql是单机单实例,高可用MHA加vip就能搞定,新公司mysql是 ...