1#!/bin/sh
2
3#
4# First use sb1250-run to generate a hardware file.
5#
6
7    swarm-run \
8	-v \
9        --sim-check-undefined \
10        --add-hw flash2.m4 \
11        --with-boot-flash-file cfe.srec \
12        --with-boot-flash-type ram \
13        --no-file \
14        --with-swarm-devs \
15        --with-sample-pci-devs \
16        --with-swarm-ide \
17        --with-swarm-ide-disk0-file disk0.dsk \
18        --with-swarm-ide-disk0-size 60 \
19        --with-memory-config 2x32 \
20        --with-swarm-rtc-eeprom-file x1240rom.bin \
21	--dump-config cfe
22
23#
24# Now add some stuff to the generated GDB script
25# We add the "ss" command for single stepping instructions
26# in the rom, and we get into run mode by running to the boot vector.
27#
28
29cat >>cfe.gdbscript <<EOF       
30load
31break *0xffffffffbfc00000
32run
33del
34set \$pc=0xffffffffbfc00000
35define ss
36stepi
37x/5i \$pc
38end
39EOF
40
41#
42# Finally run the resulting script
43#
44sb1-elf-gdb --nx --command=cfe.gdbscript cfe
45