Re: Startup code
- From: "Meindert Sprang" <mhsprang@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 29 Jun 2005 12:42:29 +0200
"Jet Morgan" <jm@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:d9tsta$po7$1@xxxxxxxxxxxxxxxxxxxxxxx
>
> That is still startup code, even if written in C.
In my opinion, startup code is code executed from the reset of the CPU,
until the call to main().
So any function you call from main() to setup up further things, no matter
how low level and essential they are, is not called startup code.
> The compiler vendor will not typically know how the processor
> is connected to the other devices, such as memory bus widths,
> clock timings etc. That's why YOU (the designer) has to write it.
If need be, yes.
> There seems to be this perception that startup code is specifically
> assembler. It *could* be written that way but I've always
> written my startup code in a combination of C and assembler.
Again, all startup codes I have seen so far, were written in assembler.
Probably because at startup time, there is no environment set up yet to run
compiled C code at all. But this only holds true with "my" definition of
startup code, where the call to main() is not executed yet.
Meindert
.
- Follow-Ups:
- Re: Startup code
- From: Chris Hills
- Re: Startup code
- From: Jet Morgan
- Re: Startup code
- From: David Brown
- Re: Startup code
- From: Paul Burke
- Re: Startup code
- References:
- Startup code
- From: ravikumar . n
- Re: Startup code
- From: Jet Morgan
- Re: Startup code
- From: Meindert Sprang
- Re: Startup code
- From: Jet Morgan
- Startup code
- Prev by Date: Re: CLIL source code from book "Firmware demystified"
- Next by Date: Re: Startup code
- Previous by thread: Re: Startup code
- Next by thread: Re: Startup code
- Index(es):
Relevant Pages
|