This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to link ? Help !

I'm using the uVison 1 and I'd like to build my project.
My example project should include the CSTARTUP.OBJ and some compiled C files

There is two methods :
1. with IDE
2. with command line

For both, I've some troubles, may someone help me ?

1.With IDE
----------

When linking a project with more than one function, the main function is no longer located to 0000h.
So I d'like to include the CSTARTUP file where I wrote :

	              NAME	?C_STARTUP
?C_C51STARTUP         SEGMENT   CODE
?STACK                SEGMENT   IDATA
		      RSEG	?STACK
		      DS	1
		      EXTRN CODE (main)
		      PUBLIC	?C_STARTUP
		      CSEG	AT	0
?C_STARTUP:	      LJMP	main

But I didn't found in the options of the IDE uVision 1 how to include the CSTARTUP.OBJ in my linking commands and how specify where it should be located ???

2. With command line
--------------------

So I've linked with the following command line : BL51 @lnk.lnk where lnk.lnk is a command file including :
C:\TRX8051\CSTARTUP.OBJ, &
C:\TRX8051\MAIN.OBJ, &
C:\TRX8051\HLCD.OBJ, &
C:\TRX8051\INIT.OBJ, &
C:\TRX8051\RREX.OBJ &
TO C:\TRX8051\TRX8051 &
IX NODS NODP NODL NLIB RS(128) PL   (68) PW(78) 
and then executing OH51 to convert into Hex file.

The problem is : how to specify that CSTARTUP should be located to 0000h and then jump to the main() function ???

Thanks for your help
Stephane

0