Re: Startup code




"Meindert Sprang" <mhsprang@xxxxxxxxxxxxxxxxxxx> wrote in message
news:11c4t1rcaohggba@xxxxxxxxxxxxxxxxxxxxx

> I'd like to disagree with this. In all compilers I used so far, the
startup
> code only set's up the very basic things like the stack pointer, code and
> data segments dependig on the CPU used and initializing all variables and
> constants.

> The rest, like further processor and peripheral initialisation is
> done in user written C functions.

That is still startup code, even if written in C.

And so far, I have never written start up
> code, I could always use the start up code supplied by the compiler
vendor,
> which is automatically chosed and configured by most IDE's.

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.

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.

Richard [in PE12]


.



Relevant Pages

  • Re: Startup code
    ... >That is still startup code, ... I could always use the start up code supplied by the compiler ... >written my startup code in a combination of C and assembler. ... On some MCU some people modify this start up assembler. ...
    (comp.arch.embedded)
  • CLR Mixed mode compilation woes!
    ... something to do with the stack frame ... corruption. ... C libs etc and on startup loads C Dlls? ... How can i specifically instruct the compiler to only compiler specific ...
    (microsoft.public.dotnet.languages.vc)
  • csc is launched during BDS 2006 startup
    ... compiler) is launched. ... And this is not the first time I start BDS 2006. ... Why does C++Builder requires a csc compilation at every startup? ...
    (borland.public.delphi.non-technical)
  • Re: Evaluating D2005, Memoryloss
    ... If we suppose the ProcessExplorer is showing the actual compiler leak, then may be the tests I've made are interesting. ... After startup: ...
    (borland.public.delphi.non-technical)
  • Re: Backtrace function
    ... non-portable solution would be free to learn main's caller (e.g. _startup, or whatever), and probe for that instead. ... I've worked on Pascal implementations where the startup code was written in Pascal (+ extensions) and this is the same problem. ... Then perhaps you should change your assembler so that it does include the basics. ...
    (comp.lang.c)