Re: Hello, LEDs (was RE: Meta Boot Loader)
Johnson, Erik J writes:
/* ** The next line is a guess */ typedef unsigned long UINT32;
It looks like it is also in types/vxTypesOld.h, and I bet others.
I couldn't find these on the IXP1200 CDROM. Perhaps it comes with VxWorks?
I'm using the default start address of 0x00008000.
Just watching the vxWorks link step, I see that they place the text segment at 0x1000, that is probably the first thing I would try. You can also type make vxWorks in the BoardSupport\VxWorks\IXP1200EB directory and watch for other compiler/linker options being passed into the process of making vxWorks. It looks like they change the entry point to sysInit, but I can't image the actual name of the entry point is important.
Without VxWorks, I cannot run the makefile to watch the commands. I also cannot find the vxWorks target in the makefiles. It is probably in $(WIND_BASE)/... somewhere.
I also wonder if the boot loader assumes anytype of compression and/or checksums. I thought there was a checksum in the a.out header (?) and I don't think the vxWorks image I have is compressed (I can look at its symbols...)
I agree, the first bytes of the vxWorks file from the CDROM are: 00000000: 00 0A 03 00 00 00 00 00 9C 64 09 00 BE 23 00 00 .........d...#.. 00000010: 1C 00 07 A1 0B 01 00 00 18 31 09 00 DC 32 00 00 .........1...2.. 00000020: 08 B1 00 00 00 10 00 00 00 10 00 00 18 41 09 00 .............A.. 00000030: 2E 74 65 78 74 00 00 00 00 10 00 00 00 10 00 00 .text........... 00000040: 18 31 09 00 A8 00 00 00 00 00 00 00 00 00 00 00 .1.............. 00000050: 00 00 00 00 20 00 00 00 2E 64 61 74 61 00 00 00 .... ....data... 00000060: 18 41 09 00 18 41 09 00 DC 32 00 00 C0 31 09 00 .A...A...2...1.. 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 ............@... 00000080: 2E 62 73 73 00 00 00 00 F4 73 09 00 F4 73 09 00 .bss.....s...s.. 00000090: 08 B1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000A0: 00 00 00 00 80 00 00 00 00 10 0F E1 3F 10 C1 E3 ............?... 000000B0: D3 10 81 E3 01 F0 29 E1 4C 11 9F E5 02 20 A0 E3 ......).L.... .. 000000C0: 00 20 81 E5 9C 1F A0 E3 01 10 81 E3 80 1F 81 E3 . .............. 000000D0: 10 1F 01 EE 00 10 A0 E3 10 1F 0D EE 11 20 A0 E3 ............. .. 000000E0: 18 11 9F E5 00 20 81 E5 51 EF 0F EE 00 10 A0 E3 ..... ..Q....... 000000F0: 13 1F 0E EE 18 1F 0E EE 9A 1F 07 EE 16 1F 07 EE ................ This is neither a.out nor binary. It also isn't compressed. -Scott
Again, I'm following up on my own post... It's not pretty, but I am now able to download and run code without using the VxWorks tools. I took a stab at parsing the vxWorks file (see below) and got far enough to create a file with my "Hello, LEDs" code: (Offset) (Bytes) (Comments) 00000000: 00 0A Magic Number = 0A00 00000002: 03 00 ??? = 0003 00000004: 00 00 00 00 00000008: 00 00 00 00 Next Section File Offset 0000000C: BE 23 00 00 ??? = 23BE 00000010: 1C 00 07 A1 ??? = A107001C 00000014: 0B 01 00 00 ??? = 0000010B 00000018: 24 00 00 00 .text length 0000001C: 00 00 00 00 .data length 00000020: 00 00 00 00 .bss length 00000024: 00 10 00 00 00 10 00 00 .text memory start (twice) 0000002C: 24 00 00 00 .data memory start 00000030: 2E 74 65 78 74 00 00 00 ".text" 00000038: 00 10 00 00 00 10 00 00 Memory Start = 00001000 00000040: 24 00 00 00 Length = 00000024 00000044: A8 00 00 00 File Offset = 000000A8 00000048: 00 00 00 00 00 00 00 00 00000050: 00 00 00 00 20 00 00 00 ??? text section indicator 00000058: 2E 64 61 74 61 00 00 00 ".data" 00000060: 24 10 00 00 24 10 00 00 Memory Start = 00001024 00000068: 00 00 00 00 Length = 00000000 0000006C: 00 00 00 00 File Offset = 00000000 00000070: 00 00 00 00 00 00 00 00 00000078: 00 00 00 00 40 00 00 00 ??? data section indicator 00000080: 2E 62 73 73 00 00 00 00 ".bss" 00000088: 24 10 00 00 24 10 00 00 Memory Start = 00001024 00000090: 00 00 00 00 Length = 00000000 00000094: 00 00 00 00 00000098: 00 00 00 00 00 00 00 00 000000A0: 00 00 00 00 80 00 00 00 ??? bss section indicator 000000A8: 0D C0 A0 E1 00 D8 2D E9 The text section (my code) 000000B0: 04 B0 4C E2 E1 35 A0 E3 000000B8: 42 39 83 E2 03 20 A0 E3 000000C0: 00 20 83 E5 FE FF FF EA 000000C8: 00 A8 5B E9 The VxWorks loader will accept this 204 byte file and it does display a "3" on one of the LED displays. If anyone has real documentation on the file format, please let me know. -Scott Scott C. Karlin writes:
Johnson, Erik J writes:
Scott C. Karlin writes:
I'm using the default start address of 0x00008000.
Just watching the vxWorks link step, I see that they place the text segment at 0x1000, that is probably the first thing I would try. You can also type make vxWorks in the BoardSupport\VxWorks\IXP1200EB directory and watch for other compiler/linker options being passed into the process of making vxWorks. It looks like they change the entry point to sysInit, but I can't imagine the actual name of the entry point is important.
I also wonder if the boot loader assumes anytype of compression and/or checksums. I thought there was a checksum in the a.out header (?) and I don't think the vxWorks image I have is compressed (I can look at its symbols...)
I agree, the first bytes of the vxWorks file from the CDROM are:
00000000: 00 0A 03 00 00 00 00 00 9C 64 09 00 BE 23 00 00 .........d...#.. 00000010: 1C 00 07 A1 0B 01 00 00 18 31 09 00 DC 32 00 00 .........1...2.. 00000020: 08 B1 00 00 00 10 00 00 00 10 00 00 18 41 09 00 .............A.. 00000030: 2E 74 65 78 74 00 00 00 00 10 00 00 00 10 00 00 .text........... 00000040: 18 31 09 00 A8 00 00 00 00 00 00 00 00 00 00 00 .1.............. 00000050: 00 00 00 00 20 00 00 00 2E 64 61 74 61 00 00 00 .... ....data... 00000060: 18 41 09 00 18 41 09 00 DC 32 00 00 C0 31 09 00 .A...A...2...1.. 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 ............@... 00000080: 2E 62 73 73 00 00 00 00 F4 73 09 00 F4 73 09 00 .bss.....s...s.. 00000090: 08 B1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000A0: 00 00 00 00 80 00 00 00 00 10 0F E1 3F 10 C1 E3 ............?... 000000B0: D3 10 81 E3 01 F0 29 E1 4C 11 9F E5 02 20 A0 E3 ......).L.... .. 000000C0: 00 20 81 E5 9C 1F A0 E3 01 10 81 E3 80 1F 81 E3 . .............. 000000D0: 10 1F 01 EE 00 10 A0 E3 10 1F 0D EE 11 20 A0 E3 ............. .. 000000E0: 18 11 9F E5 00 20 81 E5 51 EF 0F EE 00 10 A0 E3 ..... ..Q....... 000000F0: 13 1F 0E EE 18 1F 0E EE 9A 1F 07 EE 16 1F 07 EE ................
This is neither a.out nor binary. It also isn't compressed.
-Scott
participants (1)
-
Scott C. Karlin