Hi all,
I want to initialize the stack pointer. Instead of using the
STACKINITIALVALUE like in the mspgcc doc example :
#define STACKINITIALVALUE 0x0280
NAKED(_reset_vector__)
{
/* Initialise the stack */
__asm__ __volatile__("mov %0, r1"::"i" (STACKINITIALVALUE));
/* Your startup code goes here */
__asm__ __volatile__("br #main"::);
}
 
I want to use the “__stack” variable defined in the linker but if I try
this:
NAKED(_reset_vector__){
 
  extern int __stack;
 
  // Initialize the stack pointer
  // N.B. Don't forget to add the compiler option "-mno-stack-init"
  __asm__ __volatile__("mov %0, r1"::"i" (__stack));
 
}
 
I obtain this error:
inconsistent operand constraints in an `asm'
 
Is there someone who know how to use “__stack”?
 
Thanks,
Fred
 
-------------------------------
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