Ok, I think that the bug is in msp430F47xx.h file.

All the vectors are defined with the vector base address (0xFFC0) ! It is wrong ! the correct base address for the vectors is 0xFFE0 !

wrong definitions
#define BASICTIMER_VECTOR   32      /* 0xFFE0 Basic Timer / RTC */
#define PORT2_VECTOR        34      /* 0xFFE2 Port 2 */
#define USCIAB1TX_VECTOR    36      /* 0xFFE4 USCI A1/B1 Transmit */
#define USCIAB1RX_VECTOR    38      /* 0xFFE6 USCI A1/B1 Receive */
#define PORT1_VECTOR        40      /* 0xFFE8 Port 1 */
#define TIMER0_A1_VECTOR    42      /* 0xFFEA Timer A CC1-2, TA */
#define TIMER0_A0_VECTOR    44      /* 0xFFEC Timer A CC0 */
#define SD16_VECTOR         46      /* 0xFFEE ADC */
#define USCIAB0TX_VECTOR    48      /* 0xFFF0 USCI A0/B0 Transmit */
#define USCIAB0RX_VECTOR    50      /* 0xFFF2 USCI A0/B0 Receive */
#define WDT_VECTOR          52      /* 0xFFF4 Watchdog Timer */
#define COMPARATORA_VECTOR  54      /* 0xFFF6 Comparator A */
#define TIMER0_B1_VECTOR    56      /* 0xFFF8 Timer B CC1-2, TB */
#define TIMER0_B0_VECTOR    58      /* 0xFFFA Timer B CC0 */
#define NMI_VECTOR          60      /* 0xFFFC Non-maskable */

correct definitions
#define BASICTIMER_VECTOR   0      /* 0xFFE0 Basic Timer / RTC */
#define PORT2_VECTOR        2      /* 0xFFE2 Port 2 */
#define USCIAB1TX_VECTOR    4      /* 0xFFE4 USCI A1/B1 Transmit */
#define USCIAB1RX_VECTOR    6      /* 0xFFE6 USCI A1/B1 Receive */
#define PORT1_VECTOR        8      /* 0xFFE8 Port 1 */
#define TIMER0_A1_VECTOR    10      /* 0xFFEA Timer A CC1-2, TA */
#define TIMER0_A0_VECTOR    12      /* 0xFFEC Timer A CC0 */
#define SD16_VECTOR         14      /* 0xFFEE ADC */
#define USCIAB0TX_VECTOR    16      /* 0xFFF0 USCI A0/B0 Transmit */
#define USCIAB0RX_VECTOR    18      /* 0xFFF2 USCI A0/B0 Receive */
#define WDT_VECTOR          20      /* 0xFFF4 Watchdog Timer */
#define COMPARATORA_VECTOR  22      /* 0xFFF6 Comparator A */
#define TIMER0_B1_VECTOR    24      /* 0xFFF8 Timer B CC1-2, TB */
#define TIMER0_B0_VECTOR    26      /* 0xFFFA Timer B CC0 */
#define NMI_VECTOR          28      /* 0xFFFC Non-maskable */

Regards!



thln a écrit :
Thanks, but I don't use -nostartfiles option !

I think that it is a bug, because if change the MCU (like F2274) there is no problem!

Regards!

Wayne Uroda a écrit :
Are you compiling with the -nostartfiles flag? If so, you can define the 
vectors yourself (maybe you need to, I am not sure...)

Make an array which is the size of your vectors, and initialise it manually

Something like
__attribute__ ((section(".vectors"))) unsigned short loadVectors[] = {(unsigned 
short)&unexpected, (unsigned short)&unexpected, (unsigned short)&someISR, ... };

Make sure that it has the correct number of entries.

Apologies if this code is incorrect as I don't have mspgcc here to check.  I use 
something similar except my ISR routines are fixed stubs which branch to other 
locations, so I am not sure if the &function will work correctly at 
compile/link time.

If you are not using -nostartfiles, then sorry I don't think I can help!

Good luck!

- Wayne
Sent via BlackBerry® from Vodafone

-----Original Message-----
From: thln <[email protected]>

Date: Wed, 18 Mar 2009 11:23:07 To: GCC for MSP430 - http://mspgcc.sf.net<[email protected]>
Subject: [Mspgcc-users] Interrupt vectors are ignored with asm rountines
        (MSP430F4783)


project with MSP430F4783

first problem solved here :
http://sourceforge.net/mailarchive/forum.php?thread_name=49BF8544.7090708%40ap3.fr&forum_name=mspgcc-users
Thanks 'Sergey A. Borshch'

In my projects, I use my own startup routine (in assembler) ! I use
several interrupts :
NMI_VECTOR, WDT_VECTOR, BASICTIMER_VECTOR, PORT1_VECTOR
but all of theses are ignored (see below) only _reset_vector__ is correct

00008008 <__ctors_end>:
8008: 30 40 0c 80 br #0x800c

0000800c <_unexpected_>:
800c: 00 13 reti

0000800e <_reset_vector__>:
800e: 31 40 ee 05 mov #1518, r1 ;#0x05ee
8012: d2 c3 31 00 bic.b #1, &0x0031 ;r3 As==01
8016: d2 d3 32 00 bis.b #1, &0x0032 ;r3 As==01
...
00008144 <vector_60>:
8144: d2 d3 32 00 bis.b #1, &0x0032 ;r3 As==01
...
00008314 <vector_40>:
8314: f2 c0 40 00 bic.b #64, &0x0023 ;#0x0040
8318: 23 00
...
0000832a <vector_32>:
832a: 00 13 reti
...
0000832c <vector_52>:
832c: 12 12 70 01 push &0x0170

part of HEX file :
*:10FFE00008800880088008800880088008800880D1*
*:10FFF00008800880088008800880088008800E80BB*

reset vector : good (0x800E) !
all others vectors are wrong : point to 0x8008 !!!

Thanks for reply!




------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
---------------------------------------------------------------------------------------
Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte.







------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
---------------------------------------------------------------------------------------
Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte.







Reply via email to