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.

Compiler/MSP430F5529: Warnings caused by msp430f5xx_6xxgeneric.h

Part Number: MSP430F5529
Other Parts Discussed in Thread: MSP430F5502, MSPWARE, MSP430WARE

Tool/software: TI C/C++ Compiler

When compiling code using the driverlib I am receiving a bunch of warnings like:

"C:/ti/ccs820/ccsv8/ccs_base/msp430/include/msp430f5xx_6xxgeneric.h", line 10207: warning #48-D: incompatible redefinition of macro "WDT_MDLY_8" (declared at line 4759 of "C:\ti\ccs820\ccsv8\ccs_base\msp430\include\msp430f5529.h")

It looks like the generic.h header is redefining a bunch of macros that are already defined in the msp430f5529.h header file. It appears that that both of these files are included in the hw_memmap.h file that is in driverlib.

Is there a good way to remove these warnings or a set of header files that do not cause these conflicts?

Thanks,

Kevin

  • Kevin,

    Are you working off of an imported driverlib example? If so could you please provide info on which example you are using so that I can attempt to recreate your setup and understand how to address those warnings.

    Best regards,

    Matt
  • Hi Matt,

    It's been awhile since I started this project but I think I began with the CDC C3_EchoToHost project in the USB developers package.

    I began developing for a MSP430f5502 and that works fine but the project needs to support both the F5502 and F5529 processors and when I switched it over to the MSP430F5529 target all of the warnings appeared.

    Regards,

    Kevin
  • Kevin,

    I found an e2e post where the customer is running into the same warnings as you are. As explained by the TIer in that post, the warnings will not affect the application itself and you can still reliably program the target device.

    I imported the example in the USB dev pack you referenced from the latest version of MSPWare and was able to build it successfully, with no warnings, for both the F5529 and F5502.

    The warnings you are seeing are likely residual warnings from the old version of the example code you are using since you mentioned its been a while since you started the project. If you'd like to remove the warnings, you can import the newest example from the USB dev pack and then copy over your source code; but this is not required for you to be able to flash your device and start debugging.

    Best regards,

    Matt

  • Hi Matt,

    I tried updating to a newer MSPWare and it looks like I am already on the latest one (the release notes for the driverlib code says version 2.70.00.08). The files are coming from the ccs_base directory.

    In the latest version of the CDC C3 project the hw_memmap.h file still includes both of the header files the redefine stuff. Are there newer versions of the msp430f5529.h and msp430f5xx_6xxgeneric.h files that I should install that do not conflict?

    Regards,

    Kevin

  • Kevin,

    I am going to reach out to an expert in the driverlib software team to get more information about how the device header files should properly be included. Thank you for your patience as I await their feedback.

    Best regards,

    Matt
  • Kevin,

    Here is the feedback I received from the driverlib team:

    • msp430f5xx_6xxgeneric.h is an older legacy (5-10 years ago). The proper way is to now include the device specific header file such as msp430f5529.h and msp430f5502.h.

    • DriverLib’s latest version is actually 2.91.10.xx, so 2.70 is quite old. We are aware that the USB package includes 2.70. We may be able to fix this in the future, but it is not determined when.

    • If you want to update the driverlib in the USB examples, import the USB example as normal and copy over the new driverlib source code from MSP430Ware. There is a driverlib inside usblib that is 2.70, but at the top level of MSP430Ware, there is a driverlib that is 2.91.10.


    From what I can tell, you can:

    Import the newest C3 project from the latest MSPWare (MSP430Ware 3_80_06_03), port over your source code, and update the driverlib version as explained above

    or

    Go into your project and replace the references to "msp430f5xx_6xxgeneric.h" with "msp430.h", which will import the device specific header file according to the device selected in Project Properties

    Best regards,

    Matt
  • Hi Matt,

    I just downloaded the latest driverlib from here: http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430_Driver_Library/latest/index_FDS.html

    The hw_memmap.h file still includes both the msp430.h and the msp430f5xx_6xxgeneric.h files.

    If I try and comment out the msp430f5xx_6xxgeneric.h include in the hw_memmap.h file I get build errors about a bunch of OFS_* identifiers being undefined as well as all of the __MSP430_HAS_USCI_x__ defines are missing.

    Do I have the wrong version of hte msp430.h file? Mine is being grabbed from C:\ti\ccs820\ccsv8\ccs_base\msp430\include\msp430.h

    Regards,

    Kevin

  • Kevin,

    I was able to confirm that although the msp430f5xx_6xxgeneric.h is an older legacy file, it still has some definitions that are required for the application thus it cannot be commented out. I'm going to loop in a TIer more versed in driverlib to provide additional support, thank you for your patience with this!

    Best regards,

    Matt
  • i Kevin:

    I can assist you moving forward. The hw_memmap.h file is supposed to include both msp430.h and msp430f5xx_6xxgeneric.h, no need to comment or modify that file in any way.

    The version in C:\ti\ccs820\ccsv8\ccs_base\msp430\include\msp430.h should be fine, only thing I would make sure is that it includes "msp430f5529.h", which comes from your project settings.

    I actually cannot reproduce your warnings, or your error. Can you do a few things for me?

    • What version of USB Developer's Package are you using? I would use the latest one here and see if that resolves your issue.
    • Try importing a fresh clean from the USB Developer's Package C3 example and see if you get warnings or errors from that.
    • And at the same time, if you can send me your project, I can take a look for you. My last guess for now would be some project settings that are being modified from the base, because from a fresh USB example, I cannot replicate it, even when I updated the DriverLib version.

    Thanks,

    Wallace

  • Hi Wallace,

    Thanks for the help.

    1. I am using version 5.20.06.02 of the USB Developers package which looks like it is the latest.

    2. I just tried importing a clean C3 example and when I build it for the F5502 device there are no warnings but when I build for the F5529 device I am seeing the same warnings that I am seeing in my own project. (My own project builds cleanly with the F5502 but shows the warnings with the F5529 device)

    3. Do you have an email I can send my project to? It is proprietary code so I would rather not post it on the forum.

    Thanks,

    Kevin

  • Hi Kevin:

    I understand, although I did not get any warnings from F5502 or F5529. But I sent you a direct message where you can e-mail your project, and I can look further into it.

    And can you confirm your CCS version (something like 8.2.0.00007) and TI compiler version (something like 18.1.4.LTS) ?

    Thanks,
    Wallace
  • Hi Kevin:

    Thank you for sharing the project. I will say that I was still not able to reproduce the issue unfortunately, even with your exact project whether on MSP430F5502 or MSP430F5529. I only get these warnings:

    So here is what I would ask of you:

    • Can you try replacing your ccsv8/ccs_base/msp430/include/msp430f5529.h and msp430f5xx_6xxgeneric.h with my attached? I have simply attached the base version of these files, with no modifications. This is to make sure no accidental modifications were made to the files (the headers are not meant to be modified). Refresh and rebuild your project after those files are replaced.
    • If doing that fails to resolve your warnings, then I would recommend re-installing CCS. This shouldn't affect your workspace at all, simply reloads the CCS environment and all the tools, headers, etc.
    • The reason I would suggest these two points is because it seems you have no problems with MSP430F5502, and only with MSP430F5529. But there is very little difference in settings between the two, besides that it will use msp430f5502.h rather than msp430f5529.h.

    Please let me know the results of these steps.

    Thanks,

    Wallace

    7485.msp430f5xx_6xxgeneric.h

    4276.msp430f5529.h

  • Hi Wallace,

    Thanks for the files. I swapped out my msp430f5529.h file on my system and that took care of the warnings. I ran a diff of the files and there were a lot of whitespace changes between them so I'm thinking I may have accidentally ran my clang-format code formatter on it when I had it open once.

    Thanks for your help!

    Kevin

  • Here's my original for reference: msp430f5529_old.h

**Attention** This is a public forum