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