Hi all,
I try to change the start-up procedure using the following function (as
described in the mspgcc document). However, the MCU don’t start (I don’t
see the LED blink). The reset vector seems ok. Maybe I forget something.
Is there someone who can help me?
 
Thanks,
Fred
 
NAKED(_reset_vector__){
  
  extern int _etext;
  extern int __data_start;
  extern int _edata;
  extern int __bss_start;
  extern int __bss_end;
  
  Byte1_t *b1Src;
  Byte1_t *b1Dst;
  
  // Stop watchdog timer
  WDTCTL = WDTPW + WDTHOLD;
 
  // Initialize the .data segment
  b1Src = (Byte1_t*)_etext;
  b1Dst = (Byte1_t*)__data_start;
  while(b1Dst != (Byte1_t*)_edata){
    *b1Dst = *b1Src++;
    *b1Dst++;
  }
 
  // Clear the .bss segment
  b1Dst = (Byte1_t*)__bss_start;
  while(b1Dst != (Byte1_t*)__bss_end){
    *b1Dst = 0;
    *b1Dst++;
  }
 
  // Debug - Flash the LEDs
  P6OUT |= (LED1_RED);
  P3OUT |= (LED2_RED);
  PreciseWait(30000);
  P6OUT &= ~(LED1_RED);
  P3OUT &= ~(LED2_RED);
  
  // Jump to main
  __asm__ __volatile__("br #main"::);
  
}
 
0000ffe0 <InterruptVectors>:
    ffe0:   00 25 00 25 00 25 b2 ad 00 25 00 25 b0 ac 00 25
.%.%.%...%.%...%
    fff0:   00 25 00 25 00 25 00 25 00 25 00 25 00 25 44 c9
.%.%.%.%.%.%.%D.
 
0000c944 <_reset_vector__>:
 
-------------------------------
Frederic Beaulieu, M.Sc.
Research and Development
NewTrax Technologies Inc.
HYPERLINK "http://www.newtraxtech.com/"http://www.newtraxtech.com/
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 3/27/2005
 

Reply via email to