2 # ooh! test input command file for elftosb 2!
7 # most elf files are GHS produced
11 productVersion = "111.222.333";
12 componentVersion = "999.888.777";
15 flags = (1 << 0) | (1 << 1);
21 ocram_end = ocram_start + ocram_size - 1;
23 # ocram = ocram_start .. ocram_end;
25 # ocram = ocram_start +.. ocram_size;
36 hello = extern(0); # elf
37 redboot = extern(1); # srec
38 hostlink = extern(2); # elf
39 sd_player = extern(3) ( toolset="GCC" ); # elf
40 datasrc = "test0.key"; # binary
45 load dcd {{ 00 11 22 33 }} > 0;
47 # same load without dcd
48 load {{ 00 11 22 33 }} > 0;
52 hab call 0xf0000000 (128);
56 # load a simple IVT to an absolute address
57 # this fills in the IVT self address field from the target address
58 load ivt (entry=hello:_start) > 0x1000;
60 # load simple IVT. the IVT self address is set explicitly in the IVT declaration,
61 # giving the IVT a natural address so you don't have to tell where to load it.
62 load ivt (entry=hello:_start, self=0x1000);
64 load ivt (entry=hello:_start, self=0x1000, csf=0x2000, dcd=0);
66 # Setting IVT entry point to the default entry point of a source file.
67 load ivt (entry=hostlink) > 0;
69 load ivt (entry=hello:_start, self=0x1000);
72 # Special syntax that combines the load and call into one statement.
73 hab call ivt(entry=hello:_start, self=0x1000);
82 # All supported IVT fields.
91 hab call ivt; # Call the last loaded IVT. */
95 # load a string to some address
96 load "some string" > string_addr;
99 load 0x55.b > ocram_start..ocram_end;
106 jump hostlink:_start (100);
121 # load $* ( $.ocram.*, ~$.sdram.* );
135 # load $* from sd_player;
137 # load hello$.text @ 64K;
140 load $.text from hello > 0x10000;
141 call sd_player (0xdeadbeef);
146 # these loads should produce fill commands with a
147 # length equal to the pattern word size
149 load 0x55aa.h > 0x400;
150 load 0x55aa66bb.w > 0x800;
152 # load 0x55.b to 0x200;
153 # load 0x55aa.h to 0x400;
154 # load 0x55aa66bb.w to 0x800;
156 # load 0x55.b @ 0x200;
157 # load 0x55aa.h @ 0x400;
158 # load 0x55aa66bb.w @ 0x800;
160 # load $.text from hello @ .;
161 # load hello$.text @ .;
164 # this should produce a fill command with a length
166 load 0x4c8e.h > 0x100..0x200;
168 # load [ 0a 9b 77 66 55 44 33 22 11 00 ] @ 0x100;
171 # non-bootable section
172 section (0x100) <= datasrc;
176 # load 0xff.b > hostlink:g_wUsbVID + 4;
178 # load "Fred's Auto Service\x00" > hostlink:g_wUsbVendorName;
182 # load [ 00 11 22 33 44 55 66 77 ] > :g_data + 16;
185 ## (0x10 .. 0x20) + 5 == 0x15 .. 0x25
188 # section that switches modes