Running cspybat on Linux
Technical Note 231115
Arkitekturer:
Arm
Komponent:
debugger
Uppdaterad:
2023-11-24 11:49
Introduction
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.
Discussion
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=/opt/iarsystems/bxarm-9.50.1
application=application.out
$bxInstallPath/common/bin/CSpyBat $bxInstallPath/arm/bin/libarmPROC.so $bxInstallPath/arm/bin/libarmSIM2.so $application --plugin=$bxInstallPath/arm/bin/libarmLibsupportUniversal.so --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/libarmPROC.so $bxInstallPath/arm/bin/libarmJET.so $application --plugin=$bxInstallPath/arm/bin/libarmLibsupportUniversal.so --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.
Limitations
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.
Documentation
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.