[SOLVED] How to communicate with a J-link Base Compact?

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

  • [SOLVED] How to communicate with a J-link Base Compact?

    Hi,
    I have a target that will be programmed with a Base Compact. I have a computer connected to the programmer via USB. The software I use likes more a COM-port so I have activated the VCOM future.
    I need to read the UUID from the target. I need to program the target. I also need to include the production date in the HEX.
    I have tested a script-flle (*.jlink) that (only) program the target and that works.
    However, can I send commands through the COM-port instead of using command files OR do the test software need to use jlink.exe with a command file as parameter?

    Of course, If you can give me a tip how to read UUID it would be great.

    As you understand, I'm a newbee regarding Seggers software package and I hope this forum can get me going.

    Regards
  • Hi,

    J-Link is a USB driven probe and the J-Link software is controlling J-Link via USB.
    There are some models like J-Link PRO that additionally provide an Ethernet interface to allow controlling it via TCP/IP.

    There is no COM interface for J-Link.

    The VCOM feature of J-Link is a virtual COM port that exists parallel to the debug interface on the J-Link and is for cases where for example there is an additional UART on the target side which allows communicating with the target application.
    However, this VCOM port of J-Link does not have any intelligence, nor it has control over the target device. All it does is forwarding data from your PC terminal application via USB to J-Link and from there via UART to the target device.


    Haddock wrote:

    I need to program the target.
    Maybe this helps: segger.com/products/debug-prob…y-for-production-purposes


    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.
  • Thanks.
    Programming is one thing. Also add a production date before programming (or after)
    But how to read out the UUID of the target? For that I need to communicate with the targets MCU but can that be done
    with a jlink script-file?

    Greatful for a tip
  • While you could read out a UUID via a J-Link script file but you would not get it out of thw script. Why? Because J-Link script files are not designed for automation but to customize certain connect / reset steps if the device requires special handling.

    For your needs, you are probably best off with the SDK.
    segger.com/products/debug-prob…nk/technology/j-link-sdk/

    shop.segger.com/debug-trace-probes/software-add-ons/
    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 realised that when I wrote the comment. The script cannot "send back" data. I had a silly dream that I could retrieve the data from the programmer after the script retrieved it from the target.

    I have a J-Link Base Compact and a J-Link Flasher ARM. I need to get a J-link SDK.
    (In my world a SDK is a software you install. In this case it is a hardware)
  • I do not understand why you think the SDK is hardware here… The J-Link SDK is an extra piece of software that explains the J-Link API and allows you to write your own applications that control J-Link.

    Reg. the script:
    As I wrote, they have been designed for a completely different use-case.
    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.
  • Your link to software-add-ons(!) showed pictures of some flat, black cases like the jlink-base. Therefor I thought some hardware was included in the SDK package.

    I have a question that have some impact on the cost for the final test equipment.
    Let say if the testbed (don't know the english name for it) has needles for 10 ps of PCBA, do I need 10 SDK kit or do I pay for a lic.key and have 10 simpler programmer that the test program can start simultaneously?

    Thanks
  • Nope, you buy the SDK once and then you can use it with as many J-Links as you want, company-wide. If you do not buy the support & update extension, you stop receiving both after the initial period. No subscription etc, no hidden costs
    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.
  • Great. Thanks for all help.

    I made some investigations around scripts and found mem8. It seems that this can also do the job. Together with loadfile it's all done.
    The testprogram can call jlink.exe [commandfile.cmd] and in the response I get what I need.
    I'm using the Jlink Base Compact.
  • @Haddock Also look into RTT. It is a fairly good tech, and it gives you a data in/out pipe. I have used that before to set up a system where a running device listens for "commands" over the input stream, does certain manufacturing/comissioning-time actions, and then locks out any more commands.

    Also look into pylink-square. They wrapped the Segger DLL in a python library, making it significantly easier to do a lot of the manipulations.

    afaik the way the pro's do the "production date" thing is that they either modify the ELF file, with a ELF library, or use srecord to jam a binary into an existing hex file.


    It's a little .............................. unfortunate that Segger does not support some of these tech stacks a little more.
    There is a pretty clear need for a generalized RPC facility. All the tooling is in place for it. If I was less lazy, I'd maybe write it.
    It is shocking how often a whole on-device CLI needs to be put into place to facilitate this need.
    Then everything from "set flashing datetime" to "inject serial number" and such could be done with on-device functions, committed & unit tested code, instead of raw memory edits, compile-time tricks, etc.