On Fri, Dec 23, 2011 at 3:35 AM, Eric Decker <cire...@gmail.com> wrote:
> Howdy Bob,
>
> When messing with low level stuff (like interrupts) one must learn to read
> and deal with TI's weird interrupt schemes.
>
> One can learn all from looking at the include files:  These files can be
> found in /usr/msp430/include with a normal install from one of the Debian
> packages (msp430mcu...)
>
> msp430g2231.h
> msp430g2232.h
> msp430g2332.h
>
> You want to look for things like *_HAS_*.   These are the function defines
> and tells you what different processors have integrated on chip.  Later in
> the file you will also see things like *_VECTOR.   This is what defines
> what the vector (interrupt) table looks like for the processor.
>
> For timers we see the following:
>
> msp430g2231.h:
>    443:#define __MSP430_HAS_TA2__            /* Definition to show that
> Module is available */
>
> #define TIMERA1_VECTOR      (0x0010)  /* 0xFFF0 Timer A CC1, TA */
> #define TIMERA0_VECTOR      (0x0012)  /* 0xFFF2 Timer A CC0 */
>
>
> msp430g2232.h:
>    448:#define __MSP430_HAS_TA3__            /* Definition to show that
> Module is available */
>
> #define TIMER0_A1_VECTOR    (0x0010)  /* 0xFFF0 Timer0_A CC1, TA */
> #define TIMER0_A0_VECTOR    (0x0012)  /* 0xFFF2 Timer0_A CC0 */
>
>
> msp430g2332.h:
>    448:#define __MSP430_HAS_TA3__            /* Definition to show that
> Module is available */
>
> #define TIMER0_A1_VECTOR    (0x0010)  /* 0xFFF0 Timer0_A CC1, TA */
> #define TIMER0_A0_VECTOR    (0x0012)  /* 0xFFF2 Timer0_A CC0 */
>
>
> Looks like the 2232.h and 2332.h are the same as far as timers are
> concerned.
>
> For details of what the chip provides for Timers, one should look
> explicitly at the data sheet for the explicit chip.  Not the user's manual.
>
> You will want to change from TIMERA0_VECTOR to TIMER0_A0_VECTOR or the
> other one, which ever one is appropriate depending on what h/w you want to
> capture the interrupt from.

test430 solves this problem with:

#ifndef TIMERA0_VECTOR
#define TIMERA0_VECTOR TIMER0_A0_VECTOR
#endif /* TIMER0_A0_VECTOR */

__attribute__ ((interrupt(TIMERA0_VECTOR)))
static void
timerA0_isr (void)

which as it turns out is how some of the other MCU headers solve it
also.  This seems to be a bug in the headers from TI, as there are
definite inconsistencies.  If you'll file a tracker ticket, I'll see
if I can get them fixed upstream.

>
> Hopefully that clears somethings up.
>
>
> And yes the error message is bogus.   I think it is taking the ascii
> representation of "TIMERA0_VECTOR", the first 8 bytes perhaps and then
> converting this 32 bit number to decimal and that is what is being
> displayed.   But I haven't tried that out because I don't have my
> programmer's calc handy.

I'm not sure how it's being produced either, but the development
version gives the more helpful:

error: interrupt vector offset ‘TIMERA0_VECTOR’ is not an integer constant

Peter

>
>
> eric
>
>
> On Fri, Dec 23, 2011 at 1:07 AM, Bob von Knobloch <b...@vknobloch.de> wrote:
>
>> Hi,
>>
>> I'm using mspgcc 20110716.
>> I have a project using an msp430g2231, which compiles and runs OK.
>> I am trying to change to processor type to a g2232 or g2332.
>> When I specify one of these (e.g. -mmcu=msp430g2232) then the toolchain
>> (linker) reports:
>>
>> msp430-gcc -Wall -g -Os -mmcu=msp430g2232  -Wno-main   -c -o mspsani.o
>> mspsani.c
>> mspsani.c: In function ‘TIMERA0_ISR’:
>> mspsani.c:343:27: error: interrupt vector 538631144 is beyond end of MCU
>> vector table
>> make: *** [mspsani.o] Error 1
>>
>> I have looked at the library headers for these devices and everything
>> looks sane.
>> Can anyone suggest why the offset for the vector table appears wrong
>> with these devices?
>>
>>
>> --
>> The Sun is out, the sky is blue, it's time to drive the MR2.
>>
>>
>> ------------------------------------------------------------------------------
>> Write once. Port to many.
>> Get the SDK and tools to simplify cross-platform app development. Create
>> new or port existing apps to sell to consumers worldwide. Explore the
>> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
>> http://p.sf.net/sfu/intel-appdev
>> _______________________________________________
>> Mspgcc-users mailing list
>> Mspgcc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>>
>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to