05022024

Last update2016/05/28 14:38

Back 現在地: Home パートナー segger-tools J-Link SDK

J-Link SDK

J-Link SDK

 

The J-Link DLL is a standard Windows DLL typically used from "C" (Visual Basic or Delphi projects are also doable).
It makes the entire functionality of J-Link available thru the exported functions. The functionality includes things such as halting / stepping the ARM core, reading / writing CPU and ICE registers and reading / writing memory. Therefore it can be used in any kind of application accessing an ARM core.

The J-Link ARM SDK comes with different sample applications in source code which demonstrate the usage of the J-Link DLL API. The following table gives a short overview about the sample applications which come with the SDK:

Name Description
DCCTest.c Sample application which demonstrates DCC communication with the target CPU by using the J-Link DCC API functions.
FlashDownload.c Uses the J-Link DLL flash download functionality (does not need an additional license) in order to download a .bin file into the internal flash memory of a microcontroller

ReadId.c

Sample application which reads out and shows the JTAG-ID of the target device

Sample_RAWTRACE.c

Sample application which demonstrates the usage of the RAWTRACE API functions
TestHW.c Several hardware tests like checking memory, target power and core ID
Main.c Source code of J-Link commander. This tool permits some simple commands such as memory dump, halt, step, go and Id-check as well as some more in-depths analysis of the state of the ARM core and the ICE breaker module.


The standard DLL does not have API functions for flash programming. However, the functionality offered can be used to program the flash. In that case a flashloader is required.

Supported CPU cores

The J-Link SDK always supports all cores which are also supported by the current version of the J-Link software,
such as:
  • ARM7TDMI
  • ARM7TDMI-S
  • ARM720T
  • ARM920T
  • ARM922T
  • ARM926EJ-S
  • ARM946E-S
  • ARM966E-S
  • ARM1136
  • ARM1156
  • ARM1176
  • Cortex-M0
  • Cortex-M1
  • Cortex-M3
  • Cortex-M4

What do I need to write my own program with J-Link?

The J-Link ARM SDK is needed if you want to write your own program with J-Link. The listed files in the table below are included in the J-Link ARM SDK.
For more information on how to obtain a license please contact このメールアドレスはスパムボットから保護されています。閲覧するにはJavaScriptを有効にする必要があります。 .'; document.write(''); document.write(addy_text56234); document.write('<\/a>'); //-->\n このメールアドレスはスパムボットから保護されています。閲覧するにはJavaScriptを有効にする必要があります。

Files Contents
GLOBAL.h
JLinkARMDLL.h
Header files that must be included to use the DLL functions. These files contain the defines, typedefs and function declarations.
JLinkARM.lib Library contains the exports of the J-Link DLL.
JLinkARM.dll The DLL itself.
main.c Sample application, which calls some J-Link ARM DLL functions.
JLink.dsp
JLink.dsw
Project files of the sample application. Double click "JLink.dsw" to open the project.
JLink.exe Compiled version of the sample application.
JLinkARMDLL.pdf Documentation.
Release.html Release notes.
JMem.exe Life memory viewer (Displays content of target memory).
JLinkServer.exe J-Link TCP/IP server (allows using J-Link via TCP/IP networks).
jlink.inf
jlink.sys
J-Link ARM USB driver.

How do I use the flash programming capabilities of the J-Link DLL?

The J-Link DLL supports direct download into the internal flash memory of most microcontrollers.
In order to use this functionality in your own application, you simply have to select the appropriate device.

After the device has been selected, you can perform a download into flash memory by simply performing a memory write access to a flash address. The flash loader makes flash behaving as RAM, so the user does not have to take care about,
whether he is writing to an address which is in RAM or in flash.

Note: The J-Link SDK comes with a sample application which demonstrate the usage of the flash download functionality.

Development environment (compiler)

Any "C/C++" compiler will do. Workspace (Project) file is for Microsoft Visual Studio (V6.0) or Visual Studio .net (V7.0 or newer).
Other compilers will work as well, but no example workspace is provided.

Using the sample applications

The sample application can be used to test the correct installation and proper function of the J-Link ARM. The SDK comes with different sample applications for different purposes.

By default, when opening JLink.dsw the ReadId.c sample application is selected. This application opens the DLL and connects to the J-Link. If the connection has been established successfully, the JTAG-ID of the target device is read.
The sample applications are supplied in source code form. To run the sample applications, you have to compile them with an ANSI "C" compiler. A project workspace for Microsoft Visual C++ 6.0 or Microsoft Visual .Net which contains all sample applications, is supplied with the SDK.

Compiling and running the sample application

Open the project workspace with a double click on JLink.dsw, compile the source with Build | Build JLink.exe (Shortcut: F7) and run the executable with Build | Execute JLink.exe (Shortcut: CTRL-F5) from the menu.

After the application has been started, you should see the following output:

Requirements

The following items are required to develop software for J-Link:

  • PC running Windows 2000, Windows XP, Windows Server 2003 or Windows Vista.
  • J-Link ARM
  • ARM target system
  • x86 compiler, linker, opt. IDE