I've been wondering for a while why we handle peripherals the way we
do. As far as I can tell, it seems to confuse the other tools (like
msp430-gdb). I'm wondering why we don't do something like:

libperiph.c:

volatile unsigned int ADC12CTL0;
volatile unsigned int ADC12CTL1;
volatile unsigned int ADC12CTL2;

periph.x

SECTIONS {
   .peripheral_16bit 0x0100:
   {
      ADC12CTL0 = 0x600;  /* 0x600 rel to 0x0100, ABS is 0x0700 */
      ADC12CTL1 = 0x602;
      ADC12CTL1 = 0x604;
   }
}

etc, etc for the other peripherals (anything that needs to be mapped
to a specific address).

Unless I'm mistaken, that should fix issues like msp430-gdb not
knowing about the peripherals.

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to