Hi,

> >It seems that i have to change the section definitions by adding the =fill
> option. But i could not
> >find the definitions of the MSP430 sections.
> >Where are the definitions of the MSP430 sections?
> >
> 
> In the mspgcc tree, there is a directory called ldscripts. These scripts
> define what the memory of the target looks like. However, I tried to use
> the fill (fill should be replaced by a value, for example: >text =0xa5a5),
> but for some reason it doesn't have an effect. Maybe Steve can shine some
> light on this?

Yes, tha's a good idea.


> I did found out (by looking at the .a43 intel hex output) that the
> interrupt vectors are initialised with a default vector. Filling these will
> not have an effect at all because the entire section is already occupied.

Well, that's no a real problem because i do use every IRV, because "unused"
interrupts can cause problems when they happen.
I am using e. g.

#ifdef MSPGCC
interrupt (NMI_VECTOR)
#endif
#ifdef IAR
  interrupt[NMI_VECTOR]
     void
#endif
       nmi (void)
{
  mc_ISR_TOGGLE;
  mc_RESET;
  return;
}

with 

#define mc_RESET (*(void(**)(void))(0xfffe))()
// alternate version: 
// #define mc_RESET { WDTCTL = 0xDEAD }

// for counting all (or some) irqs with an oscilloscope for checking the irq 
frequency
#if defined(ToGgLe) || defined(TOGGLE)
#   define mc_ISR_TOGGLE  P1OUT ^= 0x10;
#else
#   define mc_ISR_TOGGLE
#endif

(and some macros for detecting mspgcc and iar).

I had the password problem with MSPs flashed with a BSL adapter or an update 
program with a flash loader
and old programs with unused IRVs.
So i need the initializing only for the other sections for calculating the 
checksum of the whole Flash but for safety
it's better also to initialize the IRV section with a selective bit pattern, e. 
g. 0xfffe for reset (which is better than
hangup).

Regards,

Rolf



Reply via email to