This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F47197

Other Parts Discussed in Thread: MSP430F47197

I want to use MSP430F47197 in my project. But since i am using it for the first time, i started with the LED blink program with two LEDs connected to P7.0 and P8.0. But i keep getting errors while building the project. I dont get these errors when i change the code to Port1 and port2.

5861.msp430f47197.zip

I have included the code and a jpeg image of the errors i get. Someone please help me as my final year project (to be submitted in May) is based on this MCU.

  • Apparently, the defines for P7OUT/P7DIOr and P8OUT/P8DIR are missing in the included header files.

    You may try PDOUT/PDDIR instead (16 bit registers that group P7 and P8 to low and high byte)

    Or you look into the header files for the definitions of P1DIR/P1OUT and create your own defines for P7/P8 based on the address info in the datasheet.

  • The definitions for P7OUT/P7DIR and P8OUT/P8DIR are present in the header file. The same errors are shown when ports other than 1 and 2 are used. 

    5265.msp430f47197.h

    P7 and P8 are grouped as PA. I have tried that as well.

  • vivek bhageria said:
    The definitions for P7OUT/P7DIR and P8OUT/P8DIR are present in the header file.

    I see.
    Where did you get this project from?

    There's another possible reason. The header file jsu tdefine the variales, but don't define where P7OUT is located. This information is in teh linker file which gets copied into the project when you create a project. This file too is device specific, so if the project was originally for a different processor (e.g. one that only has P1 and P2), the linekr file might still be the old one and doe snot hold the required information.

    Where do you get the errors? Is it a compiler error or a linker error? You should post the complete error text.

  • I think its linker error. 

  • vivek bhageria said:

    The definitions for P7OUT/P7DIR and P8OUT/P8DIR are present in the header file. The same errors are shown when ports other than 1 and 2 are used. 

    5265.msp430f47197.h

    P7 and P8 are grouped as PA. I have tried that as well.

    The header file you quoted says:

    /* External references resolved by a device-specific linker command file */
    #define SFR_8BIT(address)   extern volatile unsigned char address

    And, later, it has:

    SFR_8BIT(P7OUT);                              /* Port 7 Output */
    SFR_8BIT(P7DIR);                              /* Port 7 Direction */

    The Linker needs to find what P7OUT and P7DIR are from its device-specific linker command file.

**Attention** This is a public forum