Running cspybat on Linux

Technical Note 231115






11/24/2023 11:49 AM


With IAR Build Tools for Arm, BXARM version 9.50.1 and later, you can use the C-SPY Command Line Utility - cspybat on Linux for running applications in the Simulator, or on hardware using the I-jet and I-jet Trace debugger probes.


Using the Simulator

To run an application in cspybat on Linux in the Simulator, the following command line can be used: This example is for an ST STM32L152VB device:



$bxInstallPath/common/bin/CSpyBat $bxInstallPath/arm/bin/ $bxInstallPath/arm/bin/ $application --plugin=$bxInstallPath/arm/bin/ --backend --endian=little --cpu=Cortex-M3 --fpu=None -p $bxInstallPath/arm/config/debugger/ST/STM32L152VB.ddf --semihosting --device=STM32L152VB --multicore_nr_of_cores=1

Debugging with I-jet

You can also run the same application with the I-jet:

$bxInstallPath/common/bin/CSpyBat $bxInstallPath/arm/bin/ $bxInstallPath/arm/bin/ $application --plugin=$bxInstallPath/arm/bin/ --device_macro=$bxInstallPath/arm/config/debugger/ST/STM32L1xx.dmac --flash_loader=$bxInstallPath/arm/config/flashloader/ST/FlashSTM32L15xxB.board --backend --endian=little --cpu=Cortex-M3 --fpu=None -p $bxInstallPath/arm/config/debugger/ST/STM32L152VB.ddf --semihosting --device=STM32L152VB --multicore_nr_of_cores=1 --jet_power_from_probe=leave_on --drv_interface=SWD

The recommended way to get correct command line options is to let IAR Embedded Workbench for Arm on Windows generate them for you, see Technical Note 26068.

In Linux, it is also possible to let Visual Studio Code generate a launch.json file that contains most command line options for use with cspybat.


In BXARM version 9.50.1, the I-jet support is limited to basic debugging:

  • SWO or ETM trace functionality is not supported.
  • Some device support files (.dmac/.mac) may refer to Windows-specific paths.


Read more about cspybat command line options in the C-SPY Debugging Guide, chapter The C-SPY command line utility - cspybat.

All product names are trademarks or registered trademarks of their respective owners.

We do no longer support Internet Explorer. To get the best experience of, we recommend upgrading to a modern browser such as Chrome or Edge.