[SOLVED] Specific J-Link selection on per-user basis

  • Currently, a specific J-Link can be defined in the .jdebug file (by its serial number).

    This isn't particularly useful for a project shared between team members - as different people are likely to have their "own" J-Link(s).

    So is it possible to specify a J-Link (by serial number) in the .jdebug.user file?

    If so, how?

    If not, can this be considered a feature request?

  • Actually, the J-Link serial number doesn't seem to be getting saved to the project at all:

    I press 'Save to Project', and the following appears in the console:

    Code
    Tools.JLinkSettings();
    J-Link settings were written to the project file.


    but the serial number is not added to the .jdebug project file, and there's nothing in the .jdebug.user either.

    There is this in the .jdebug project file:

    Code
    void OnProjectLoad (void) {
      //
      // Dialog-generated settings
      //
      Project.SetDevice ("STM32L072CZ");
      Project.SetHostIF ("USB", "");
      Project.SetTargetIF ("SWD");
      Project.SetTIFSpeed ("4 MHz");


    Presumably, the J-Link Serial Number should appear as the 2nd argument to Project.SetHostIF() ?

  • Hello,

    Thank you for your inquiry.
    The prompt should only appear if more that 1 J-Link are detected to be connected to the host PC.
    Is this a common occurrence with you and your colleagues?


    but the serial number is not added to the .jdebug project file, and there's nothing in the .jdebug.user either.

    Yes, because you need to select the J-Link you want. Right now it defaults to USB which will open the prompt if more than 1 are connected or chose the single J-Link.
    Press the three dots next to USB. It will list all J-Links on your host PC and your network. Simply slelect the one you want and it will be saved in your Ozone project.

    Our current recommendation for setups with multiple J-Link S/N per PC and multiple host PCs we recommend to use Ozones command line capabilities.
    See Ozone manual for more details.
    You can call Ozone with -usb <S/N> and Ozone will open the last project with your J-Link selected.

    Does that work for you?

    Best regards,
    Nino

    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: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

  • The prompt should only appear if more that 1 J-Link are detected to be connected to the host PC.

    Yes, that is the case


    Is this a common occurrence with you and your colleagues

    Yes: it's a radio system, with a transmitter and a receiver.


    Simply slelect the one you want

    I do that


    and it will be saved in your Ozone project

    but it doesn't do that.


    You can call Ozone with -usb <S/N> and Ozone will open the last project with your J-Link selected

    It's a workaround.

    I still think it would be nicer to have it in the per-user setup file

  • Hello,

    but it doesn't do that.

    Ok that is odd. Works flawlessly for me for years.
    Could you provide a short clip on how you try to do this?


    It's a workaround.

    I still think it would be nicer to have it in the per-user setup file

    It is more than a workaround.
    It provides a simple solution to exactly the setup prerequisites that you described.

    Where is the difference to have a Ozone launch script e.g. in Python where you call in one line Ozone with the CL parameter and some config/user file which you have to drag with your project to set your custom serial number?
    It is exactly the same effort. But the launch script has the benefit that the chance that one of your colleagues forgets to input his S/N is lower as there is a specific file that needs to be used to launch the session.

    Best regards,
    Nino

    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: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

  • Where is the difference

    Ozone always creates the .user file anyhow - so there is no user effort to create it.

    It would just take the setting from the standard dialogue, so no need to transcribe the serial number and mess about in some other tool to create a "script" of some sort - which would, itself, have to be "dragged about".

    Also, I think (but haven't tried) that the .user file would be portable between Windows, Linux, etc - which a "script" wouldn't be ?


    Works flawlessly for me for years.
    Could you provide a short clip on how you try to do this?

    could it be that I am using on-board ST-Links which have been converted to J-Link - is there some restriction related to the free conversion?

  • Hello,

    I feel that there is a misunderstanding here.
    Ozone already has that feature (ignore all the command line stuff and scripts).
    You can already save in your Ozone .jdebug file which J-Link to use based on the serial number.

    It is simply that for some reason you can't get that to work. Correct?

    Could you try the following?
    1. Open your Ozone project in Ozone.
    2. Go to Tools->J-Link Settings, this should yield picture A below.
    3. Select the three dots for the host interface settings (red circle in A).
    4. You should see now something similar to picture B just with your own J-Link probes and serial numbers.
    5. Now select the J-Link you want to link permanently to this project in your setup with your moues (picture C) or type the Serial No. field manually.
    6. Press OK.
    7. Save to Project.
    8. Now if you start the debug session the correct J-Link will be automatically used and no pop-up will appear. If you open the .jdebug file you can also see the following entry: Project.SetHostIF ("USB", "777038855");

    Alternatively you can simply open the .jdebug file in any text editor and edit Project.SetHostIF() yourself.

    Can you confirm that this works?

    Best regards,
    Nino

  • So what I was doing was opening Tools->J-Link Settings:

    seeing that it already had the correct Serial number, I just clicked 'Save to Project' - and that doesn't add the current Serial number to the Project.
    in the Console, it says:

    Code
    Tools.JLinkSettings();
    J-Link settings were written to the project file.

    But if I do choose the '...' for 'Host Interface', select the required Serial number, and then do 'Save to Project' - it is, indeed, saved.
    in the Console, it says:

    Code
    Tools.JLinkSettings();
    J-Link settings were written to the project 
    file.Project.SetHostIF ("USB", "777578294");

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!