[SOLVED] J-Link v7.64: add new device but not in C drive

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

  • [SOLVED] J-Link v7.64: add new device but not in C drive

    Dear SEGGER experts,

    I'm working on an internal tool which calls J-Link Commander v7.64.
    Now I'm trying to add a new device and its flash loader to J-Link, but I couldn't do it by adding these files to C:\Users\<USER>\AppData\Roaming\SEGGER\JLinkDevices as described in wiki.segger.com/J-Link_Device_Support_Kit .
    Because this tool will be used by my colleagues who may not have a local installation of J-Link and I prefer not to edit anything in their C drive...

    So is there any other way to add the new devices? Preferably inside the installation folder of J-Link...
    Any help is greatly appreciated.
  • Hi,

    The installation folder is purged by installing a new version.
    The AppData/Roaming folder is exactly for such stuff that should survive updates / reinstalls etc.

    J-Link scans this folder. Everything else is deprecated and should not be used.
    You may place a file names JLinkDevices.xml in the same directory as the J-Link DLL is located, but it is strongly recommended to not do this.
    Note that any problems in regards to that method will not be analyzed and threads may be closed immediately.


    BR
    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.
  • Hi Alex,

    Thank you for your reply.
    In case of placing JLinkDevices.xml besides the J-Link DLL, the .FLM files should be placed in the same directory right?
    I fully understand that any method other than AppData/Roaming is deprecated and should not be used.

    I'll try my best not to go this way.
  • Hi,

    You can place the FLM files wherever you want. The important thing is that the XML is named JLinkDevices.xml and placed in the DLL directory.
    You may enter a relative FLM/loader path in the XML or an absolute one. A relative one is relative to the location of the FLM.

    We may delete this thread shortly after solution, as we do not want deprecated information to spread and be taken misleadingly as “state of the art”.


    BR
    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.
  • Hi Alex,

    I add the JLinkDevices.xml and the loaders, but got the following error:

    SEGGER J-Link Commander V7.64 (Compiled Apr 1 2022 16:06:08)
    DLL version V7.64, compiled Apr 1 2022 16:04:43


    J-Link Commander will now exit on Error


    J-Link Command File read successfully.
    Processing script file...
    J-Link>r
    J-Link connection not established yet but required for command.
    Connecting to J-Link via USB...O.K.
    Firmware: J-Link Ultra V4 compiled Sep 22 2022 15:00:10
    Hardware version: V4.00
    S/N: 504403116
    License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    VTref=4.483V
    Target connection not established yet but required for command.
    Device "SH30F9071" selected.


    ****** Error: Did not add flash bank @ 0x00000000 (SH30F9071 Code Flash) because of incorrect/incomplete bank info
    Did not add flash bank @ 0x0FFC0000 (SH30F9071 DATA Flash) because of incorrect/incomplete bank info
    Did not add flash bank @ 0x0FFFA000 (SH30F9071 Opt Flash) because of incorrect/incomplete bank info

    My JLinkDevices.xml looks like this:

    <DataBase>
    <!-- -->
    <!-- Sinowealth -->
    <!-- -->
    <!-- -->
    <!-- SH30F9071 -->
    <!-- -->
    <Device>
    <ChipInfo Vendor="Sinowealth" Name="SH30F9071" WorkRAMAddr="0x20000000" WorkRAMSize="0x00004000" Core="JLINK_CORE_CORTEX_M0" />
    <FlashBankInfo Name="SH30F9071 Code Flash" BaseAddr="0x00000000" AlwaysPresent="1" >
    <LoaderInfo Name="Default" MaxSize="0x40000" Loader="SH30F9071_Main.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    </FlashBankInfo>
    <FlashBankInfo Name="SH30F9071 DATA Flash" BaseAddr="0x0FFC0000" AlwaysPresent="1" >
    <LoaderInfo Name="Default" MaxSize="0x1000" Loader="SH30F9071_E2PROM.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    </FlashBankInfo>
    <FlashBankInfo Name="SH30F9071 Opt Flash" BaseAddr="0x0FFFA000" AlwaysPresent="1" >
    <LoaderInfo Name="Default" MaxSize="0x400" Loader="SH30F9071_Opt.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    </FlashBankInfo>
    </Device>
    </DataBase>

    Is there something incorrect with my files or this method simply does not work anymore..?
  • Hi,

    At a first glance, the XML looks good.
    I could imagine that the FLM is not parsed correctly or something like that.
    But in that case I would have expected additional output on what was missing/wrong in the FLM.
    Maybe there is something in the XML that I do not see right now / do not have in my head.

    Can you send the XML + FLM via PM or attach it to a post?


    BR
    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,

    Alex asked me to have a look into this.

    Your XML file is good - at least for the current release version of the J-Link software.

    At the time of V7.64 the <LoaderInfo> tag was not yet supported, so V7.64 does not know how to handle it. The information which is currently provided by the <LoaderInfo> tag was handled entirely by the parent <FlashBankInfo> tag. J-Link is still backward-compatible to the old format, but it is no longer recommended to use it. Instead we recommend using the current version of the J-Link software.

    If your setup absolutely requires V7.64 you may adapt your XML entries to the following format:


    <DataBase>
    <Device>
    <ChipInfo Vendor="<Vendor>" Name="<Name>" WorkRAMAddr="<WorkRAMAddr>" WorkRAMSize="<WorkRAMSize>" Core="<Core>" />
    <FlashBankInfo Name="<Name>" BaseAddr="<BaseAddr>" AlwaysPresent="<AlwaysPresent>" MaxSize="<MaxSize>" Loader="<Loader>" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    </Device>
    </DataBase>

    Best regards,
    Matthias
    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.
  • That was already more support given than we were allowed to, but good to read that the "problem" has been resolved.
    Thread closed
    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.