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.

CCS/MSP430FR5962: Warnings/Errors: Incompatible redefinition of macro and declarations - Adapting MSP430FR5989 code for MSP430FR5962 (possible driverlib issue?)

Part Number: MSP430FR5962
Other Parts Discussed in Thread: MSP430WARE, MSP430FR5989

Tool/software: Code Composer Studio

Hello all, 

I am currently trying to use code from a design reference (programmed for the MSP430FR5989 chip) on an MSP430FR5962. I have gone through all of the files and changed all of the GPIO pins and peripheral settings to match the MSP430FR5962 rather than the original MSP430FR5989. In CCS 7.2.0,  I created a new CCS Project and copy/pasted all the files into the project directory as well as the driverlib folder (was having difficulties with msp430ware). I then went to project properties and included the search path for the driverlib folder. When I try to build, I get a bunch of errors and warnings indicating undefined references that are defined in the driverlib files. The warnings seem to indicate contradicting definitions between the driverlib files and the msp430 include files. When I build similar code for the original MSP430FR5989, I don't run into significant issues like these: attached are the error and warning messages. Any help would be much appreciated! 


Warnings:

  • Victor Wang18 said:
    I then went to project properties and included the search path for the driverlib folder.

    I don't think this is necessary if you already added/copied the driverlib folder to the project. Could you try removing that path and see if it helps?

    If it does not, the next step would be to compare the build output (the complete build log as seen in the build console) of the MSP430FR5989 that builds without errors with the one that fails. Assuming the source files and settings are mostly similar, that may help narrow down any difference in options/settings that could be contributing to this error.

  • Hello, 

    I'm sorry about the late response! I ended up importing an empty project from MSP430ware with the driverlib folder (then copy and pasted my files into the empty project), and then most of the warnings went away. However I'm still getting errors and warnings that are confusing. I think problem stems from the unresolved symbol error. The functions are defined in the gpio.h header included at the top of the file from driverlib, so I'm not understanding why it is still shown as unresolved. Additionally, I'm not sure as to how to fix the error of program not fitting into available memory. The original code fit onto the MSP430FR5989, so I assumed that a modified smaller version should fit onto the MSP430FR5962 without problem since the MSP430FR5962 has more memories.... that are rather confusing: 

  • Victor,

    Which version of MSP430Ware are you using? 

    Looking at the unresolved symbols (GPIO_clearInterruptFlag etc) shown in your build, it appears that you are using older GPIO APIs and there may be incompatibility issues between your code and MSP430Ware.

    Within the MSP430Ware directory, if you navigate to \driverlib\doc\MSP430FR5xx_6xx\html and open the file modules.html, from there you can see the APIs available for the different modules. Make sure that the functions you are referencing in your code match up with the supported APIs for your version of MSP430Ware.

    In general, we recommend using the latest version of software, whenever feasible. In the case of MSP43Ware that is currently v3.80.02.10, in which case you may need to adapt your code to use the APIs supported by this version. Hope this helps.