
a.out, if I remember the code correctly. After pulling it down, it will jump to the entry point given in the a.out header.
Where in memory is the image placed? (i.e., where do we need to link our text, bss, and data sections.)
there should be MACROs and a routine that determines this in the BSP (BoardSupport/VxWorks/...../sysLib.c) (sorry I don't have the code handy right now, so I might have the names wrong). But look for things of the nature like sysMemTop() and SYS_MEM???. The memory map given in in the HRM might also provide the information. erik

I've built some arm-aout cross compiler tools for Linux and am now attempting a "pre- Hello, World" program: a "write something on the LEDs" program. It doesn't work yet so I thought I'd call upon the collective experience of the mailing list. Here's the code: /* ** The next line is a guess */ typedef unsigned long UINT32; /* ** From BoardSupport/VxWorks/IXP1200EB/ixp1200eb.h */ #define IXP1200_LED_ADDR (0x38400000+0x108000) /* Addr of LED */ #define IXP1200_REG_WRITE(a,val) (*(volatile UINT32 *)(a) = (val)) /* ** From BoardSupport/VxWorks/IXP1200EB/sysLib.c */ #define DEBUG_LED(val) IXP1200_REG_WRITE(IXP1200_LED_ADDR, (val)) void __main(void) { DEBUG_LED(3); loop: goto loop; } I compile it with: arm-aout-gcc -nostartfiles -nodefaultlibs -o led.aout led.c An "arm-aout-objdump --disassemble led.aout" of the resulting file gives this: led.aout: file format a.out-arm-little Disassembly of section .text: 00008000 <___main>: 8000: e1a0c00d mov ip, sp 8004: e92dd800 stmdb sp!, {fp, ip, lr, pc} 8008: e24cb004 sub fp, ip, #4 800c: e3a035e1 mov r3, #943718400 8010: e2833942 add r3, r3, #1081344 8014: e3a02003 mov r2, #3 8018: e5832000 str r2, [r3] 0000801c <L3>: 801c: eafffffe b 801c <L3> 8020: e95ba800 ldmdb fp, {fp, sp, pc}^ ... When I put it in place of the vxWorks boot image and reboot the system I get this: Attached TCP/IP interface to eeE0. Attaching network interface lo0... done. Loading... tftpGet: Error occurred while transferring the file. Error loading file: errno = 0x530001. Can't load boot file!! Early serial debug initialized muxLoad failed! 0x [VxWorks Boot]: There are many things which could be wrong. I'm using little-endian. I'm using the default start address of 0x00008000. I'm using an a.out file. Any suggestions? Anyone know what error 0x530001 means? Thanks, Scott Johnson, Erik J writes:
participants (2)
-
Johnson, Erik J
-
Scott C. Karlin