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.

MSP-EXP430FR2433: Compiler Link Error

Part Number: MSP-EXP430FR2433
Other Parts Discussed in Thread: MSP430WARE, MSP430FR2433, , MSPWARE

I down loaded and installed MSP430Ware_3_80_14_01.

I created an empty project BlinkLED_MSP430FR2433 and added the file main.c from C:\ti\msp\MSP430Ware_3_80_14_01\examples\boards\MSP-EXP430FR2433\MSP-EXP430FR2433_Software_Examples\Firmware\Source\BlinkLED_MSP430FR2433

I added the folder C:\ti\msp\MSP430Ware_3_80_14_01\examples\boards\MSP-EXP430FR2433\MSP-EXP430FR2433_Software_Examples\Firmware\Source\BlinkLED_MSP430FR2433\driverlib\MSP430FR2xx_4xx to the compiler include path so that the file driverlib.h could be found.

I am receiving several link errors such as...unresolved symbol GPIO_setAsOutputPin, first referenced in ./main.obj

This is the File Search Path that CCS generated

Are you able to help me resolve my linker errors?

Thank you,

Victor

  • Hi Victor,

    I am a little confused, are you just trying to run the blinking LED example code?

    Are you using CCS or IAR IDE?

    Can you double check that you have followed the steps here: https://software-dl.ti.com/ccs/esd/documents/users_guide/index_overview.html

    regards, 

    Henok

  • I am using CCS to build and run two blink sample codes.

    In CCS, for a new project, you can choose 

    It produces the following code which compiles, links and runs.

    #include <msp430.h>
    
    void main(void) {
        WDTCTL = WDTPW | WDTHOLD;               // Stop watchdog timer
        PM5CTL0 &= ~LOCKLPM5;                   // Disable the GPIO power-on default high-impedance mode
                                                // to activate previously configured port settings
        P1DIR |= 0x01;                          // Set P1.0 to output direction
    
        for(;;) {
            volatile unsigned int i;            // volatile to prevent optimization
    
            P1OUT ^= 0x01;                      // Toggle P1.0 using exclusive-OR
    
            i = 10000;                          // SW Delay
            do i--;
            while(i != 0);
        }
    }
    

    You can also use CCS to build an empty project.

    And add main.c from MSP430Ware which will compile but not link.

    #include <driverlib.h>
    
    int main(void) {
    
        volatile uint32_t i;
    
        // Stop watchdog timer
        WDT_A_hold(WDT_A_BASE);
    
        // Set P1.0 to output direction
        GPIO_setAsOutputPin(
            GPIO_PORT_P1,
            GPIO_PIN0
            );
    
        // Disable the GPIO power-on default high-impedance mode
        // to activate previously configured port settings
        PMM_unlockLPM5();
    
        while(1)
        {
            // Toggle P1.0 output
            GPIO_toggleOutputOnPin(
                GPIO_PORT_P1,
                GPIO_PIN0
                );
    
            // Delay
            for(i=10000; i>0; i--);
        }
    }
    

    The linker file search path is the same for both

  • Hi Victor, 

    Can you share where in your file repository you have the MSP430Ware installed? 

    Also can you try importing a driverlib example that is most similar to the Main.c code you have above? Normally we recommend starting with a pre-existing example and modifying from there where need be.

    regards, 

    Henok

  • Hello Henok,

    Thank you for your help.

    Let me give you a working example from the TivaWare series.

    I use the API function call GPIOIntEnable located in the TivaWare Peripheral Driver Library.

    In the project properties I add the path to the driverlib.lib whereby everything compiles and links without errors.

    If I remove the path to driverlib.lib, the linker generates errors.

    If I search the TivaWare installation I find these files.

    Now for MSPWare.

    I use the API call GPIO_setAsOutputPin as found in the MSP430 DriverLib for MSP430FR2xx_4xx Devices User's Guide

    There is no reference to driverlib.lib in the File Search Path in the project properties.

    And the linker produces errors.

    If I search for driverlib.lib in MSPWare I get the following.

    There is no listing for MSP430 nor FR4233.

    Where is driverlib.lib for MSP430 or FR4233 to be found?

     

  • Hi Victor, 

    I believe I know what the problem is, let me do some testing on my side and I will let you know how to resolve this soon. 

    regards, 

    Henok

  • Hi Victor, 

    Lets try importing an empty driverlib example directly from msp430Ware. 

    1. click the project tab and go to "import CCS projects..."

    2. click Browse on the top right 

    3. Locate msp430Ware and follow this directory sequence: msp430Ware --> driverlib--> examples --> MSP430FR2xx_4xx --> 00_emptyProject

    4. Now select folder and try again, you should now see a driverlib folder under this project in your workspace

    Let me know if this works. 

    Another idea is to choose a working msp430Ware example, then directly copy the driverlib folder into your project

    Here is a previous E2E that shows this: MSP430F5438A: How to include driverlib into my existing CCS project? - MSP low-power microcontroller forum - MSP low-power microcontrollers - TI E2E support forums

    regards, 

    Henok

**Attention** This is a public forum