Skip to main content
  • 产品
  • Evaluate our Software
  • 下载
  • Free Utilities
  • 购买
  • 芯片厂商
  • 支持
  • 关于我们
  • Search
  • 工作机会
  • 新闻简报
  • 联系我们
  • 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
    Sep.11
    J-Link
    J-Link and Flasher next to Geehy G33R50x chip

    SEGGER J-Link and Flasher product families now support Geehy G32R50x MCUs

    SEGGER's market-leading J-Link debug probes and Flasher in-system programmers can now be used with Geehy's G32R50x series of real-time microcontroller units (MCUs).

    [Read more...]

    All news

    • Release notes
    • Update notification
    • Pricing
    • Support

    全球总部

    德国: SEGGER Microcontroller GmbH

    地址: Ecolab-Allee 5
    40789 Monheim am Rhein, Germany
    电邮: info@segger.com
    电话: +49-2173-99312-0
    传真: +49-2173-99312-28

    网点分布

    中国:哲戈微系统科技(上海)有限公司

    地址: 中国上海市闵行区秀涟路133号
    大虹桥国际A 栋218室
    邮编201199
    电邮: china@segger.com
    电话: +86-133-619-907-60


    简易信息聚合

    通过ISO 9001认证

    ISO 9001

    30多年的嵌入式行业经验

    First-class embedded software tools since 1992
    • 版本说明
    • 免责声明
    • 行为准则
    • 隐私策略
    • 沪ICP备2022005181号
    • 沪公网安备 31011202014525号
    © 2025 SEGGER - 版权所有.

    您即将离开 segger.cn 而访问境外网站,是否继续?