Tuesday, January 23rd 2018, 2:54am UTC+1

You are not logged in.

  • Login
  • Register

LesInk

Beginner

Date of registration: Oct 2nd 2009

Posts: 4

Location: Huntsville, AL

Occupation: Software Engineer

1

Friday, October 2nd 2009, 7:57pm

[ANSWERED]J-Link flash download available for free or not?

Our company is wanting to use a J-Link to flash a target NXP LPC2478. We see that Segger is now making flash downloads free based on this article http://www.segger.com/cms/segger-makes-j…-for-free-.html. We have downloaded the 4.08l version and installed on a computer, but it is still requesting a license in J-Flash ARM. Are we doing something wrong?

I am using a J-Link version 7.0 (black case).

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

2

Monday, October 5th 2009, 9:23am

Hi LesInk,

download to flash memory via J-Link DLL is free since V4.08l, but the J-Flash software still requires a license.


Best regards
Alex

LesInk

Beginner

Date of registration: Oct 2nd 2009

Posts: 4

Location: Huntsville, AL

Occupation: Software Engineer

3

Monday, October 5th 2009, 3:22pm

Thanks for the clarification, Alex.

Where is the documentation for the JLinkARM.dll and/or linker file(s)? I don't see it in the standard download.

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

4

Thursday, October 8th 2009, 8:43am

Hello LesInk,

the documentation about the J-Link ARM DLL is part of the J-Link ARM SDK (not part of the standard software and documentation pack):
http://www.segger.com/cms/j-link-arm-sdk.html
http://www.segger.com/cms/pricelist-j-link-related.html

For clarification:
Before flash download became free you did need a license for flash download in order to use this feature with a debugger which supports J-Link.
Before flash download became free you did need a license for flash dowload or you did need the FlashSDK in order to write your own program which supports download to flash directly.

What exactly is your company searching for?
A utility for production which can program the LPC2478?
A way to write your own application which supports flashing the LPC2478?


Best regards
Alex

mwb1100

Beginner

Date of registration: Sep 30th 2009

Posts: 27

5

Friday, October 9th 2009, 7:27pm

I'm a little confused about this announcement as well. Our project is currently using IAR Workbench with an STM32 microcontroller. IAR has been able to program the flash on this since day 1 (at least since I've been on the project). As far as I know, no special license from Segger was necessary for this to work.

When we heard about this announcement we were hoping that this would enable us to have our QA folks flash parts for testing without having to go through someone with an IAR installation (which is how it was being done) - the QA person could just be loaned a J-Link for the duration of the flash. However, it seems like this isn't possible - the person doing the flashing still needs IAR to do the flashing or some other debugger, right? So no difference from before, or am I mistaken?

We've since obtained a couple Flasher ARM units for QA's use (and they work very nicely), but just for clarification or future reference how would a person who wants to flash a device without a license from Segger or IAR be able to do this? Is a custom program using the J-Link ARM SDK necessary?

gerhardf

Beginner

Date of registration: Nov 28th 2007

Posts: 18

6

Monday, October 12th 2009, 3:11pm

I'm a little confused about this announcement as well. Our project is currently using IAR Workbench with an STM32 microcontroller. IAR has been able to program the flash on this since day 1 (at least since I've been on the project). As far as I know, no special license from Segger was necessary for this to work.

When we heard about this announcement we were hoping that this would enable us to have our QA folks flash parts for testing without having to go through someone with an IAR installation (which is how it was being done) - the QA person could just be loaned a J-Link for the duration of the flash. However, it seems like this isn't possible - the person doing the flashing still needs IAR to do the flashing or some other debugger, right? So no difference from before, or am I mistaken?

We've since obtained a couple Flasher ARM units for QA's use (and they work very nicely), but just for clarification or future reference how would a person who wants to flash a device without a license from Segger or IAR be able to do this? Is a custom program using the J-Link ARM SDK necessary?

after having the same problem some years ago i would recommend to use openocd in conjunction with olimex arm-usb-ocd.
this solution is a little bit slower in terms of flash programming time but it costs only app. 50,-€ for an arm-usb-ocd.
regards
gerhard

Bri

Beginner

Date of registration: Oct 18th 2009

Posts: 2

7

Wednesday, October 21st 2009, 9:19am

You do not need the J-Flash tool for flash programming. You can flash your device with the gdb. I assume you have a gdb installed. (If not look here: www.yagarto.de) I have written a small script that can be executed in the MinGW terminal. This script starts the gdb in batch mode.

Source code

1
2
#/bin/bash
arm-elf-gdb --batch -x gdb.batch


(a windows batch file should also work)

This is my gdb batch file for flash programming:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
file "C:/LPC2468/test.elf"
target remote 127.0.0.1:2331
monitor flash device = LPC2468
monitor flash download = 1
monitor flash breakpoints = 0
monitor endian little
monitor speed adaptive
monitor reset
monitor long 0xE01FC040 = 1
load
monitor reset
continue


The command "load" writes the program to the flash.

SEGGER - Rolf

Super Moderator

Date of registration: Nov 21st 2007

Posts: 65

8

Saturday, November 28th 2009, 4:18pm

Let me try to clarify things (I know it is a bit confusing):

Yes, download to flash is free. This means that all flash loaders that we have
integrated in the J-Link software can be used with any J-Link or OEM product such as
SAM-ICE or Midaslink without requiring an extra license.
The supported devices are basically all popular ARM7/9 or Cortex-M3 / M0 microcontrollers
with built-in flash.

Which devices are supported?
You should either look it up in the manual or (better) check the drop-down list in the
J-Link control panel which lets you select the microcontroller.
Of course devices like AT91SAM7xxx, AT91SAM3xxx, LPC23xx, LPC24xx or STM32 are supported,
but also many others.

Can I use the free flash download in production ?
The idea we at Segger had was different. We basically made our flash loaders available because we felt
that a lot of times the flashloaders that come with a tool chain (in this case IAR) didnot work reliably
or not nearly as fast as our flash loaders. We felt this makes it easier to use a lot of tool chains (such as IAR, Keil,
but also GDB) with J-Links. So the plan was to use the J-Link flash download for development purposes;
in other words you'd use the debugger to load the program and then J-Link to program the flash.
Of course, this can also be used in production. However, if you do, you are basically responsible for telling J-Link
which device it is programming and for loading the program. There are multiple ways to do this:
As shown above, you can use GDB with a script (see above). You could also use J-Link commander (free, in the
software and documentation pack) to do the same thing, so you do not need to use GDB. This probably keeps it
a little simpler.
An other option is to buy the SDK (@398 Euros) and write a little application (typicall in "C") which does the same thing.
This is not a difficult task, especially since the source code of J-Link commander is part of the SDK.
If there is interest to find out how to program the flash using J-Link commander, let me know, we can
post a small sample script.

JTAG Isolation
In general, when you are using J-Link to program your micro in a production environment, we recommend you also
use the JTAG Isolator. This will protect J-Link against voltage spikes and different ground potentials, as well
as protect the PC used and your target hardware.

So what about J-Flash ?
J-Flash is a program which requires an extra license. It can also program external flash on basically any system,
which is something the flashloaders in the J-Link software can not (at least not now).
J-Flash is also used as setup-program for our stand-alone programmer, Flasher ARM.
So: To use J-Flash with a standard J-Link, you still need a license. With Flasher ARM or J-Link PRO, that license
is already included. If the flash download from the debugger or J-Link commander is all you need,
you do not need to anything else, no extra license.
So the choice is yours. Hope this helps to clarify it.


But I could always download from the IAR debugger into flash. What is the difference to the J-Link flash loaders ?
The flsh loaders in the J-Link software are optimized for both the target system and J-Link. They are very fast,
typicall much faster than the flash loaders that come with EWAR.
ANd they work very reliably and do not typically need any setup information (all we need to know is
which micro is used)
Try it out. All you have to do is typically to disable the flash loader of the debugger.
The J-Link flash loader should now automatically take over when you download program into the flash.

Why are the J-Link flash loaders so fast ?
Because we know what we are doing ... :-)
We take full advantage of the available RAM, avoid operations that are not required,
let the processor program as much as possible at once.
But we also typically check if a sector already contains the correct program
(something that happens quite frequently when modifying a program ... Sometimes
a lot of sectors remain unchanged when you do a small change in the program).
This, just like verifying, is done typically by a fast 32-bit CRC algorithm which runs in the
target controller.
An other reason is that typically we setup the PLL to let the target CPU run at high speed,
something that will also help to accelerate programming and CRC computation.

Hope this helps to clarify things ...

Rolf

LesInk

Beginner

Date of registration: Oct 2nd 2009

Posts: 4

Location: Huntsville, AL

Occupation: Software Engineer

9

Wednesday, January 20th 2010, 6:59pm

After some about your statement, "If there is interest to find out how to program the flash using J-Link commander, let me know, we can
post a small sample script."

Yes, please, can you post an example script, if nothing else for a guideline of what you thinking.

Thanks.

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

10

Thursday, January 21st 2010, 9:23pm

Hi Leslnk,

quite simple...

exec device = LPC2478
loadbin C:\SampleApp.bin, 0x00000000


For automation:
Save the commands above in a file (e.g. script.jlink) and start JLink.exe with the following parameters:
jlink.exe C:\script.jlink


Best regards
Alex

LesInk

Beginner

Date of registration: Oct 2nd 2009

Posts: 4

Location: Huntsville, AL

Occupation: Software Engineer

11

Thursday, January 21st 2010, 9:59pm

Hmm, that does not seem to work for me with J-Link ARM v4.08l, a J-Link Flasher Unit, or with an older J-Link KS (IAR Systems) unit.

In all cases, J-Link commander reports "ERROR: Unknown command", takes a long time, and then the flash is not written. My guess is it just takes the data and loads into memory, not flash.

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

12

Friday, January 22nd 2010, 9:08am

Hi Leslink,

sorry small mistake on my side. The loadbin command has been improved in newer versions of J-Link commander/the DLL. For V4.08l:

C/C++ Source code

1
2
3
4
5
6
7
exec device = AT91SAM7S256          // LPC2478 can also be selected.
speed 12000                                 // since JLink.exe starts up with 5 kHz by default, which is too slow for flash programming....
                                                  // would take a long time. It is user's responsibility to select a appropriate speed
h
loadbin C:\at91sam7s256_flash.bin, 0x00100000
r                                                // The write to the flash is cached by the DLL and really written if absolutely necessary, e.g when a "go" or "reset" takes place
g


I have tested this a few minutes ago on an Atmel AT91SAM7S256 and it worked fine.

Best regards
Alex