Skip to main content
  • Products
  • Evaluate our Software
  • Downloads
  • Free Utilities
  • Purchase
  • Silicon Vendors
  • Support
  • About Us
  • Blog
  • Forum
  • Search
  • Jobs
  • Newsletter
  • Blog
  • Contact
  • Shop
  • J-Link debug probes
  • J-Run

    J-Run
    Automate test runs on real hardware

    Contact us
    Downloads
    Documentation
    SEGGER Debug & Trace Probes
    1. 1.Use cases
      1. 1.1.Firmware integrity tests
      2. 1.2.Performance tests
    2. 2.Licensing
    3. 3.System requirements
    4. 4.How does it work?
    5. 5.Output via RTT
    6. 6.Output via Semihosting
    7. 7.Example output
    8. 8.Latest news

    Overview

    J-Run is a command-line utility to program embedded hardware with test applications, control the execution, and retrieve test results. It can be used to automate test runs which would otherwise involves considerable manual work.

    J-Run works with any Arm or RISC-V device supported by J-Link and works with standard ELF output. During a test, J-Run captures target output via RTT or Semihosting and detects when a test has finished.

    Output from a test application can be output to to the terminal or redirected to other tools for further analysis.

    Use cases

    J-Run can be used for any test task which needs to be run on target hardware. It is especially useful for automating recurring tests or single test setups which require running various test variations in sequence. The use of J-Run can save a lot of manual work and eliminate errors of manual runs.

    Firmware integrity tests

    When new capabilities are added to a firmware during development, the overall integrity of the firmware needs to be ensured (i.e., that the target executes as expected. While regular debugging usually focuses on finding bugs or testing just changed functions, automated tests can check all aspects of a firmware. A test can run a firmware in some selftest mode, which tests all modules of a firmware and outputs the results.

    These tests, especially when peripherals are involved or timing is important, need to run on actual hardware. J-Run enables performing such tests. Its run can be triggered automatically after each build, manually by a developer, or from a continuous integration (CI) system.

    Performance tests

    Increasing the performance of embedded software can be time consuming. After spots for optimization are identified and changed, execution tests must be rerun to verify the expected results. While some work on performance affects only one firmware in one configuration, some changes might be rolled out to different systems. In such cases multiple tests might have to be done for each change.

    J-Run can be completely controlled on the command line and integrated in test scripts or test environments. This enables running different tests without manual interaction.

     

    Licensing

    J-Run comes as part of the J-Link Software and Documentation Package. The software package is free for any J-Link or J-Trace device and can be downloaded here:

    DownloadJ-Link Software and Documentation Pack

    System requirements

    Supported OS
    WindowsMicrosoft Windows (x86/x64)
    macOSmacOS (x86/Apple Silicon)
    LinuxLinux (x86/x64/Arm)

    How does it work?

    J-Run downloads the application image from ELF executables. The regular output of a toolchain or build system can be used and requires no further modification. Additional information for output control are taken from the ELF file, too. As for a regular debug build, symbols must be present.

    After the application image is programmed to the target device, the target is reset and started. While the test application is running, J-Run captures its output. It supports RTT as well as semihosting.

    J-Run runs until it captures the exit string which indicates that the test is done, or receives the semihosting exit command.

    Output via RTT

    J-Run can capture output from the test application via RTT and prints all output to the terminal. RTT enables running tests without interruption and is especially useful for timing-sensitive tasks.

    When J-Run captures a line which matches the exit wildcard string (default "*STOP*"), the test is done and J-Run exits.

     

    Output via Semihosting

    J-Run can do semihosting operations to capture output from the test application. For semihosting the target application is temporarily halted for each operation,
    but it can be used on every target, even those which do not support RTT.

    In addition to finishing a test with the exit wildcard string, J-Run supports the semihosting exit operation.

    Example output

    C:> jrun -device STM32F407IE ApplicationTest.elf
    J-Run compiled Feb 01 2021 12:09:19
    (c) 2018-2021 SEGGER Microcontroller GmbH    www.segger.com
    
    Open application...OK
    Set target device to STM32F407IE...OK
    Select SWD interface...OK
    Set interface speed to 4000 kHz...OK
    Reset target...OK
    Download 08000000-08002E19...OK
    SEGGER_SEMIHOST_DebugHalt found at 0x08000734
    Start target application...OK
    Reading output from target until exit command.
    ==============================================
    
    Application Test
    Compiled 02.02.2021 08:11:19
    Starting OS... OK.
    Testing Hardware... OK. Running at 168 MHz.
    Testing IP... OK. Connected at 192.168.12.9
    Testing Filesystem... OK. 3.8 GB free.
    All tests done. STOP.
    
    J-Run finished. Press any key to exit.
    C:> _
    
    C:> jrun -device STM32F407IE -if SWD --semihost --silent PerformanceTest_sinf_v7EM.elf
    Testing sinf...
    Took 2582433 cycles
    C:> _

    Latest news

    2025
    Jul.09
    J-Link
    J-Link devices alongside Renesas RA8P1

    SEGGER delivers J-Link and Flasher support for Renesas Electronics's RA8P1

    SEGGER's J-Link series of debug probes and Flasher programmers are now compatible with Renesas Electronics's high-performance group of RA8P1 microcontrollers (MCUs). The MCUs are powered by the Arm® Cortex®-M85 (CM85) processor with a Helium™ M-Profile Vector Extension and Ethos™-U55 neural processing unit.

    [Read more...]

    All news

    • Release notes
    • Update notification
    • Pricing
    • Support

    Headquarters

    SEGGER Microcontroller GmbH

    Ecolab-Allee 5
    40789 Monheim am Rhein, Germany
    info@segger.com
    Tel.: +49-2173-99312-0
    Fax: +49-2173-99312-28

    Locations

    USA: SEGGER Microcontroller Systems LLC

    Boston area
    101 Suffolk Lane
    Gardner, MA 01440, USA
    us-east@segger.com
    Tel.: +1-978-874-0299
    Fax: +1-978-874-0599

    Silicon Valley
    Milpitas, CA 95035, USA
    us-west@segger.com
    Tel.: +1-408-767-4068

    China: SEGGER Microcontroller China Co., Ltd.

    Room 218, Block A, Dahongqiaoguoji
    No. 133 Xiulian Road
    Minhang District, Shanghai 201199, China
    china@segger.com
    Tel.: +86-133-619-907-60

    ISO 9001 certified

    ISO 9001

    30+ years of experience

    First-class embedded software tools since 1992
    • Imprint
    • Disclaimer
    • Code of Conduct
    • Privacy Policy
    © 2025 SEGGER - All rights reserved.