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.

linking/include issues with CCE



Hi All,

I'm attempting to figure out how to enable certain warnings/errors with CCEv3.  Specifically, I want a warning/error if there is an implicit declaration of a function.

For example. A function I am trying to call simply doesn't exist.  For example: I attempt a function call "write_flash_mem(...)", except it's actually "flash_write_mem(...)" I want the complier to scream at me that this function is implicitly declared, and not let the linker be the one to yell at me that there are unresolved symbols.

This goes hand in hand with my desire to have proper include files for future use/libraries/whatever.

Thanks.

  • In CCE, you can set the following compiler options to identify such missing prototypes:

    Under Project Properties->C/C++ Build->Compiler->Parser Diagnostic Options:
    Enable check boxes for --issue_remarks and --display_error_number

    Now when you rebuild the project, you should see the remark:
    remark #225-D: function declared implicitly
    whereever there is a call to a function that does not have a prototype

    You can also set this remark to always be an error so you don't overlook it. To do this, set the option:
    "Treat diagnostic as error" and add the diagnostic id 225.

    The MSP430 Compiler Users Guide has more details on each of these options, http://www-s.ti.com/sc/techlit/slau132   

**Attention** This is a public forum