Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Basic C-startup overview?
PostPosted: Mon Jan 10, 2005 4:05 am 
Offline

Joined: Tue Jul 20, 2004 3:05 am
Posts: 28
Hello all,

I have a very general question regarding the correct way to compile a C program using the arm-linux-gcc toolchain... in case its important, I am writing and comiling the programs on a machine running RedHat Linux 9.0. I am aware that in addition to the code the user writes, there must be the often-discussed c-startup sequence to initialize stacks and variables, etc. However, perhaps I am simply slow at picking this up, but I do not clearly understand it and was hoping someone could describe in an example how one would go about correctly linking and placing the program in RAM. I am aware of the various c-startup sequences that are available for reference, but I am having trouble using them for my own purposes. Ultimately, I want to have a basic application template in which I can simply edit the C source files to create different applications for my board. I do have the necessary set of header/source filers and makefile, yet my applications won't run from U-Boot and I am sure it has to do with the startup sequence.

Say for the example application I have two source files, util.c and main.c. I would like to be able to load via serial DEBUG and launch the application from U-Boot. Taking the AT91RM9200DK as the example target, what additional files need to be included, and where in RAM should it be placed (I imagine it is user-definable, if so where can this be defined)? Is a single assembler file (e.g. entry.s) sufficient?

I appreciate any help that can be offered, even if it is pointers to somewhere else to look for tutorials or discussions on this.

Conger


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: