Re: Startup code



In article <rpl6c1duvbker6vj5bqdmvvnc1m5tvsgg7@xxxxxxx>, Jack Klein
<jackklein@xxxxxxxxxxx> writes
>On 29 Jun 2005 01:58:33 -0700, ravikumar.n@xxxxxxxxxxxxxxxx wrote in
>comp.arch.embedded:
>
>>
>>
>> Hi all,
>>
>> I am Ravikumar.N, new to embedded systems programming. I have
>> heard a term known as "startup Code" that will be executed in all the
>> processors.
>>
>> Please tell me:
>> 1) what is the meaning of "startup Code"
>> 2) What function it does.
>> 3) Who has to write the startup code.
>> 4) What should be the contents of a "Startup Code".
>>
>> With Regards,
>> Ravi Kumar.N
>
>What amazes me here, considering all the replies to the OP I see here
>so far, is nobody has mentioned one of the most important reasons for
>having boot code.

that is ONE of the reasons... not the most important. As many MCU have a
only a little RAM. eg the 8051 with 128 BTYES many of which are the
registers it will not boot itf there is a problem let alone be able to
run a memory test. Most systems run from ROM (or block write able flash)
so again a memory test would not do much.

>How do you do a complete memory test before calling the C start-up
>code that requires at least some memory be working?

You don't. Why would you need to? There are many times when a memory
test is *required* others where it is a good idea, other times when it
does not matter and some times when it is pointless.

remember embedded systems go from 4-128 bits from trivial (pointless) to
safety critical.

>How do you test
>the watchdog chip by forcing a reset?
Who said you have a watchdog?


>Don't any of you do serious POST testing of your hardware?
On many MCU the chip is the HW.... There is nothing else.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ chris@xxxxxxxxxxxx www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



.