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

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [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 segger.com/cms/segger-makes-j-…-available-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).
  • 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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):
    segger.com/cms/j-link-arm-sdk.html
    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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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?
  • mwb1100 wrote:

    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
  • 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: 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. #/bin/bash
    2. 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. file "C:/LPC2468/test.elf"
    2. target remote 127.0.0.1:2331
    3. monitor flash device = LPC2468
    4. monitor flash download = 1
    5. monitor flash breakpoints = 0
    6. monitor endian little
    7. monitor speed adaptive
    8. monitor reset
    9. monitor long 0xE01FC040 = 1
    10. load
    11. monitor reset
    12. continue
    Display All


    The command "load" writes the program to the flash.
  • 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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.
  • 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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.
  • 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 Source Code

    1. exec device = AT91SAM7S256 // LPC2478 can also be selected.
    2. speed 12000 // since JLink.exe starts up with 5 kHz by default, which is too slow for flash programming....
    3. // would take a long time. It is user's responsibility to select a appropriate speed
    4. h
    5. loadbin C:\at91sam7s256_flash.bin, 0x00100000
    6. 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
    7. g


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

    Best regards
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.