gcc q

2010-08-22 Thread Erez D
hi I am using gcc (actually avr-gcc) to compile some code for an AVR processor (AT32UC3L064). The code generated does a lot of things before entering main() There is some code i want it to do first - immediatly after powerup, before all other initializations. anyone knows how to do so ? thanks

Re: gcc q

2010-08-23 Thread Shachar Shemesh
Erez D wrote: hi I am using gcc (actually avr-gcc) to compile some code for an AVR processor (AT32UC3L064). The code generated does a lot of things before entering main() There is some code i want it to do first - immediatly after powerup, before all other initializations. Is that before or

Re: gcc q

2010-08-23 Thread Erez D
On Mon, Aug 23, 2010 at 10:00 AM, Shachar Shemesh wrote: > Erez D wrote: > > hi > > I am using gcc (actually avr-gcc) to compile some code for an AVR processor > (AT32UC3L064). > The code generated does a lot of things before entering main() > There is some code i want it to do first - immediatly

Re: gcc q

2010-08-23 Thread Shachar Shemesh
Erez D wrote: Is that before or instead of the usual initializations? before. i just want to run a hardware registers initialization function. Okay. I'm going to assume that you are writing code that is meant to run directly on the hardware, no external OS. Also, I'm assuming you have a

Re: gcc q

2010-08-23 Thread Erez D
On Mon, Aug 23, 2010 at 10:44 AM, Shachar Shemesh wrote: > Erez D wrote: > > > > Is that before or instead of the usual initializations? >> > before. > i just want to run a hardware registers initialization function. > > > Okay. I'm going to assume that you are writing code that is meant to run

Re: gcc q

2010-08-23 Thread Shachar Shemesh
Erez D wrote: Okay. I'm going to assume that you are writing code that is meant to run directly on the hardware, no external OS. Also, I'm assuming you have a means to actually load that code into the CPU's address space (nor flash, loader, etc.) correct If those assumpt

Re: gcc q

2010-08-23 Thread Ori Idan
avr-gcc linker, links a file named crts.o before main, this file calls the main function in your program. You need the sources for avr-libc to get the sources for these files. The actual file depends on the target used (determined by the option -mmcu=) These files are written in AVR assembly wh