D M schrieb:
Hello everybody,

I would like to do some RAM testing before main() is called and before the variables are initialised (startup code). In some ports of the GNU compiler a __premain() is available. MSPGCC does not support it (is not mentioned in the documentation and does not work). I've seen that it is possible to define the reset_vector but this removes the startupcode completely. I would like to have the startupcode after I've done my RAM testing stuff.
How can I do that best? Is it possible to define me own resect_vector startup 
routine and add the original startupcode manually to my routine? Where is this 
startupcode located?

the mspgcc-manual.pdf chapter 4 (towards the end, page 29 ff in my version) describes the startup procedure.

The implementation of _reset_vector__ is in (CVS)/gcc/gcc-3.3/gcc/config/msp430
there are the loops that do the memory initialization.

but if you do your RAM checking you already access all addresses. maybe it would be interesting to combine testing and initializing (at least zeroing, so that the .bss init is not needed, init of .data then only needed).

if you test the RAM overwriting values you probably can not use .noinit variables. just wanted to remind you, that may be no issue for you.

chris

Reply via email to