Discussion Forum

Linking Order

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Robert Sagusti
Posted
12-Dec-2001 19:48 GMT
Toolset
C51
New! Linking Order
Hello,

I'm using

C51 v 5.10
BL51 v 3.52
uVision v 1.24


1.) When I link object files in the following order, the startup code is not run. Inspection of the .hex file shows that there is no jump to the startup code.

The line to invoke the linker by uVision is:

C:\C51\BIN\BL51.EXE C:\SIEMENS\INIT.OBJ, C:\SIEMENS\STARTUP.OBJ, C:\SIEMENS\myCode.OBJ TO C:\SIEMENS\myCode RS (256)

But if I invoke like:

C:\C51\BIN\BL51.EXE C:\SIEMENS\STARTUP.OBJ, C:\SIEMENS\INIT.OBJ, C:\SIEMENS\myCode .OBJ TO C:\SIEMENS\myCode RS (256)

The startup code runs fine and the jump to it can be easily seen in the first line of the hex file. Can anyone help me?

Thanks,

Bob

Read-Only
Author
Jon Young
Posted
12-Dec-2001 21:03 GMT
Toolset
C51
New! RE: Linking Order
Is it possible that all your files are from assembly sources (or C translated to assembly sources)? In which case just add a dummy C file to your project.
Read-Only
Author
Robert Sagusti
Posted
12-Dec-2001 21:19 GMT
Toolset
C51
New! RE: Linking Order
Thanks Jon,

The myFile.obj is object from myFile.c

Basically the issue is if I list INIT.obj before STARTUP.obj in the linker list, the startup code does not get jumped to.

If STARTUP.obj is linked before INIT.obj, everything runs fine.

Read-Only
Author
David Lively
Posted
19-Dec-2001 20:02 GMT
Toolset
C51
New! testing - ignore
testing - ignore

Next Thread | Thread List | Previous Thread Start a Thread | Settings