[SOLVED] cannot connect to X server

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

  • [SOLVED] cannot connect to X server

    I migrating to Segger Jlink PLUS compact and setting up a CI pipeline that uses jflash. It looks like Jlink GDB server has a command line utility but not so for J flash. What is the simplest way to run jflash headless? Surely this is very basic functionality that is provided somehow. Using JFlashExe requires X server, which is not going to work for most automation pipelines - am I missing something? Project file and flash script attached
    Files
  • Hi,

    J-Flash is a GUI application and while it can be controlled / automated via command line, it is not designed for purely headless systems.
    May change in the future but is a bigger change for sure. Currently I cannot share any timeline regarding this.

    This being the first request like this, for J-Flash, I disagree that it is a "very basic functionality" you are asking for. Maybe for you but nor for the majority of our users.
    However, it is what it is right now.

    Your options:
    1) Use J-Link Commander (JLinkExe) if applicable (not designed for production purposes but depending on what you are looking for, may fit)
    2) Write your own customized application via the J-Link SDK (shop.segger.com/debug-trace-pr…ftware-add-ons/j-link-sdk)
    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 Alex. I ended up writing a shell script that starts an X client. Works okay, but adds unnecessary dependencies.

    I have used a bunch of emulators in the past and this is the first time I have encountered one that doesn't provide a headless flash tool. Anyway, the problem is solved for now and I have attached the bash script so others can use it. PS it requires installation of a few things on ubuntu:

    Source Code

    1. apt install -y xorg-dev libglu1-mesa libgl1-mesa-dev xvfb libxinerama1 libxcursor1

    source
    Files