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.

Warning #225-D - function declared implicitly

Other Parts Discussed in Thread: TMS320F2812

Hello,

In a simple test program

#include "DSP281x_Device.h"
void main() {
    InitSysCtrl();
    while(1){
    ;
    }
}

that I wrote for the TMS320F2812 that calls the function InitSysCtrl(), the warning
#225-D - function declared implicitly
appears, caused by the command InitSysCtrl(). InitSysCtrl() is defined in the file DSP281x_SysCtrl.c. This file is provided by TI for the device. I have added it to the project folder.

Despite this, more code that is added to main() works.

I have tried adding the line

#include "DSP281x_SysCtrl.c"

but then a bunch of errors appear:

#10010 errors encountered during linking; "test.out" not built
#10056 symbol "_CsmUnlock" redefined: first defined in "./main.obj"
#10056 symbol "_DisableDog" redefined: first defined in "./main.obj"
#10056 symbol "_InitFlash" redefined: first defined in "./main.obj"
#10056 symbol "_InitPeripheralClocks" redefined: first defined in
#10056 symbol "_InitPll" redefined: first defined in "./main.obj"
#10056 symbol "_InitSysCtrl" redefined: first defined in "./main.obj"
#10056 symbol "_KickDog" redefined: first defined in "./main.obj"

So apparently the file DSP281x_SysCtrl.c is already found without the explicit include command. But then how does one declare the function properly?

Regards,

Adrian

  • 3446793 said:
    the warning
    #225-D - function declared implicitly
    appears, caused by the command InitSysCtrl().

    The warning is saying that there was no function declaration or definition seen before the function call was made. The file DSP281x_SysCtrl.c does define this function but since there is no function prototype visible at the point of the call, the warning is generated. More info can be found here: http://processors.wiki.ti.com/index.php/Compiler/diagnostic_messages/225

    In the device examples, there is typically a file called DSP2833x_GlobalPrototypes.h which contains all the function prototypes. You could either #include this file or add the prototype for just InitSysCtrl() in your main.c.

  • This is a good explanation. The problem I had with the help files (and similar posts) is that they did not say how the required declaration should look like. So

    extern void InitSysCtrl(void);

    did the trick.

    Thank you!