Page 1 of 2

ISR Problem (again)

PostPosted: Thu Mar 01, 2007 1:29 am
by aek
Using the library build and setting all options needed for the OS in salvocfg.h, the error i get when building is on the lines:

void Timer_A (void) __interrupt[TIMERA0_VECTOR]

That's Rowley syntax.

You need e.g.

#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void)

and it will compile correctly.

I went ahead and -- using the latest CubeSat Kit software -- created and built the Test1 project (the CSK demo code) using IAR. Some minor tweaks were required (and IAR's header files do not seem to cover the '1611 and '1612 -- weird, so I added them to both msp430.h and io430.h) and here are the build results:

xlink.exe D:PumpkinCubeSatKitexampleMSP430MSP430x1xxCubeSatKit_Dev_BoardIAR430TestTest1Pro-libDebugObjCSK_USART0.r43
D:PumpkinCubeSatKitexampleMSP430MSP430x1xxCubeSatKit_Dev_BoardIAR430TestTest1Pro-libDebugObj estcode.r43
-o D:PumpkinCubeSatKitexampleMSP430MSP430x1xxCubeSatKit_Dev_BoardIAR430TestTest1Pro-libDebugExe est1pro-lib.d43
-IC:Program FilesIAR SystemsEmbedded Workbench 4.0 430LIB -f C:Program FilesIAR SystemsEmbedded Workbench
4.0430CONFIGlnk430F1612.xcl -f C:Program FilesIAR SystemsEmbedded Workbench 4.0430configmultiplier.xcl
-D_STACK_SIZE=50 -rt C:Program FilesIAR SystemsEmbedded Workbench 4.0430LIBDLIBdl430fn.r43 -e_PrintfLarge=_Printf
-e_ScanfLarge=_Scanf -D_HEAP_SIZE=50 -s __program_start

IAR Universal Linker V4.60C/386
Copyright 1987-2006 IAR Systems. All rights reserved.

13 088 bytes of CODE memory
1 338 bytes of DATA memory (+ 58 absolute )
1 731 bytes of CONST memory

Errors: none
Warnings: none

Total number of errors: 0
Total number of warnings: 7

The warnings aren't too serious. I'll .zip up this project and email it to you.


Re: ISR Problem (again)

PostPosted: Thu Mar 01, 2007 5:51 am
by cpbridges
Hi All,

I'm having a silly problem with an example that came with the CubeSat Kit Software. I am using IAR (v.3.42A) and looking at 'prod2' example.

Using the library build and setting all options needed for the OS in salvocfg.h, the error i get when building is on the lines:

void Timer_A (void) __interrupt[TIMERA0_VECTOR]

It suggests that i need a "{" somewhere.

Files: msp430x14x.h, sliar430-a.r43 (from version 3), mem.c, isr.c, isr.h, main.c. main.h, salvo.h, salvocfg.h, usart0.c, usart1, utility.c

Ther syntax is correct but I'm obviously missing a header file somewhere where this is defined. Please help

Thanks in advance, Chris

Re: ISR Problem (again)

PostPosted: Thu Mar 01, 2007 8:50 am
by aek
The syntax for ISRs differs between IAR and Rowley -- make sure that you use the IAR syntax, AND you also need to ensure that the msp-specific header file (#include <...>) is right for IAR -- the Rowley ones are different.


Re: ISR Problem (again)

PostPosted: Thu Mar 01, 2007 10:44 am
by cpbridges
Hi aek!

The file is definately an IAR header file (found in IAR430inc) as this is the only set of source files that I installed with this IDE.

I have the line in salvocfg.h,
#include <msp430x14x.h>

So that's correct, all the project paths are definately set correctly also.

Any more ideas?

Thanks btw! Chris

Re: ISR Problem (again)

PostPosted: Thu Mar 01, 2007 10:53 am
by aek
IAR header files have traditionally had an io prefix IIRC, but you could be using a different version from what we're using here (3.42A, primarily).

The best way to work this sort of thing out is to strip away the majority of the code using #if 0 ... #endif, get that to compile, and then re-enable the code progressively.

Also, IAR's docs are pretty good.

Lastly, the usarts probably need header files -- they are included in the latest CubeSat Kit release.


Re: ISR Problem (again)

PostPosted: Thu Mar 01, 2007 10:55 am
by aek
One more thing -- In EW (and CS), you can compile files individually. This is very helpful when trying to isolate a particular problem.

Also, some obscure problems go away if you Clean the project first, and/or Rebuild All.

If you're running 3.42A then email the directory with the EW files and we can make it compile.


Re: ISR Problem (again)

PostPosted: Thu Mar 01, 2007 11:27 am
by cpbridges
Hi aek,

I've made sure to consult the IAR docs before I start using the forums, esp with the build

Clean/ Rebuild all is what I do anyway and compiling each file individually still highlights the same errors :S

Would you like to email me an address to send you a zip of the files? (


Re: ISR Problem (again)

PostPosted: Thu Mar 01, 2007 11:30 am
by aek
I was just covering all the bases I could think of ...

Just send it to support at pumpkininc dot com.


Re: ISR Problem (again)

PostPosted: Wed May 02, 2007 8:10 am
by cpbridges
Hi Andrew,

I want to say thanks for sorting that bit of coding errors out and I'm not getting any errors relating to that problem. But now I'm having another problem :P

Fatal Error: "Failed to match a default include file" All relating to the msp430.h file. Any ideas? I'm definitely linked properly.

I'm also missing 'salvo_hook_interrupt_MSP430_GIE.c' and 'salvo_hook_wdt_MSP430_CLRWDT.c'.
I do have 'salvohook_interrupt.c' and 'salvohook_wdt.c'. Will these suffice?

Sorry to be a bother and thanks in advance, Chris

Re: ISR Problem (again)

PostPosted: Wed May 02, 2007 8:31 am
by aek
The first problem is in msp430.h -- you'll probably have to edit it so that it does a

#if defined (MSP430thatIamusing)
#include <msp430thatIamusing.h>

kind of thing ...

The other files are in PumpkinSalvoSrcRA430.