Is there a way to test all case in real bsp automatically?

Chris Johns chrisj at
Tue Nov 10 23:54:55 UTC 2020

On 10/11/20 7:27 pm, smallphd at wrote:
> hi, all
> Recently, I was testing rtems-5.1 in xilinx bsp. There are many test cases which
> need compile and burn to bsp each time.
> If I test 100 cases, I need compile and burn 100 times manually. This is boring.
> Is there a way to test 100 cases in one compilation and burning ?
> Thanks very much.

For the Zynq I build and run uboot with a configuration to TFTP load an image.
The uboot configuration can seen at [1].

I then configure RTEMS Tester [2] with the configuration for a Zedboard with:

tftp_port              = 9101
bsp_tty_dev            = cs-ser-2:30003
target_pretest_command = rtems-zynq-mkimg @EXE@
target_exe_filter      = /\.exe/.exe.img/
target_on_command      = cs-pw-ctl 1 toggle-on 2 4
target_off_command     = cs-pw-ctl 1 off 2
target_reset_command   = cs-pw-ctl 1 toggle-on 2 3

where port 9101 is a redirected port using the TFTP proxy server in RTEMS Tools,
cs-ser-2 is a RPi box running ser2net for the console, the rtems-zynq-mkimg
command is attached, and cs-pw-ctl is a custom command to control a network
based power switch. The configuration can be saved in $HOME/.rtemstesterrc.

Recent RTEMS Tools have a Python base TFTP server you can test with and a TFTP
proxy that lets you proxy and share a single TFTP port out to many ports using
the MAC address of the board.

You can also use the command in RTEMS Tools if you do not have a
mkimage available on your host.


-------------- next part --------------
#! /bin/sh
set -e



for EXE_NAME in $*
 if [ ! -f $EXE_NAME ]; then
  echo "error: not found: $EXE_NAME"
  exit 1
 echo "Image: $EXE_NAME"
 ${OBJCOPY} -R -S --strip-debug -O binary "$EXE_NAME" "$EXE_NAME.bin" || exit 1
 cat "$EXE_NAME.bin" | gzip -9 >"$EXE_NAME.gz"
 mkimage \
   -A arm -O rtems -T kernel -a $START_ADDR -e $ENTRY_ADDR -n "RTEMS" \
   -d "$EXE_NAME.gz" "$EXE_NAME.img"

exit 0

More information about the devel mailing list