Compiles and links perfectly on my 12/08 mspgcc. Somehow the calculation PORT1_VECTOR + VECTOR_OFFSET lets the compiler cough and does not resolve to either a relocation (to be filled by the linker) or a discrete value. Is PORT1_VECTOR known at this point?
JMGross ----- Ursprüngliche Nachricht ----- Von: Mark Rages An: GCC for MSP430 - http://mspgcc.sf.net Gesendet am: 16 Jun 2010 00:35:32 Betreff: [Mspgcc-users] memory input 0 is not directly addressable I'm writing a little bootloader and I am jumping from the interrupt vector to the relocated interrupted vector with little functions like this interrupt (PORT1_VECTOR) __attribute((naked)) PORT1SR (void) { asm("br &0xfde4" :: ); } This compiles and works fine. But it is ugly and has a magic number in the assembly string. So I would like to parameterize it out of the way: #define VECTOR_OFFSET (-512) interrupt (PORT1_VECTOR) __attribute((naked)) PORT1SR (void) { asm("br %[add]" :: [add] "m" (PORT1_VECTOR + VECTOR_OFFSET)); } but this gives me an error: main.c: In function PORT1SR: main.c:18: error: memory input 0 is not directly addressable What does "not directly addressable" mean? Regards, Mark markra...@gmail -- Mark Rages, Engineer Midwest Telecine LLC [email protected] ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users
