Search code examples
cmsp430

What enviroment do I open prj/dtp files?


I have a project that includes "main.c" where I need to change a few hard variables, but my company has long since lost contact with the contracted coder who wrote the code. The source files I received include .dtp, .prj, .c, and .r43 file types and the IC is the MSP430F437IPZ. I have a license for IAR and one non-technical person here told me that might be what the contractor was using.

I cannot open the dtp/prj in IAH or code composer or import them, and when I copy/paste in the code to a new project try to compile it throws errors on most lines.

Here is some of the main.c in case this helps:

interrupt[TIMERA0_VECTOR] void Timer_A(void){
    Tb++;
    Ta++;
    HSF = (~HSF)&0x01;
    if(Tb >= 30){
        Tb = 0;
        P2OUT &= 0x7f;
    }
    if(Ta >= 120){
        Ta = 0;
        close_meter();
    }
}

interrupt[PORT2_VECTOR] void poweroff(void){
    P2IFG = 0x00;
    CCTL0 |= CCIE;
    LPM3_EXIT;
}
void main(void){
    int i;
    WDTCTL = WDTPW + WDTHOLD;
    FLL_CTL0 = XCAP14PF;
    SCFQCTL = 0x3f;
    SCFI0 = FN_2 | FLLD_4;
    FLL_CTL0 |= DCOPLUS;
    TACTL = TASSEL0 + TACLR + MC0;
    CCR0 = 16384;
    CCTL0 = CCIE;
    _EINT();

I apologize if I am not asking the right questions, I normally do hardware.


Solution

  • Copy/pasting the code to a new workspace in IAR worked. To get rid of all the errors, I just had to update the outdated syntax of my interrupts from

    interrupt[TIMERA0_VECTOR] void Timer_A(void){
    

    and

    interrupt[PORT2_VECTOR] void poweroff(void){
    

    to

    #pragma vector = TIMER0_A0_VECTOR
    __interrupt void Timer_A(){
    

    and

    #pragma vector = PORT2_VECTOR
    __interrupt void poweroff(void){
    

    Thank you to @Eugene Sh. and @Christian Gibbons for the conversation about how the interrupt syntax looked old and questionable which put me on the right track.