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.

Build error - function declared implicitly

Other Parts Discussed in Thread: TMS320F28035, CONTROLSUITE

I get the following error when I try to build the HVPM_Sensored project with Code Composer.  This is the distributed code.  I have not done any editing to it yet.  I'm just going through the Sensored Field Oriented Control of 3-Phase Permanent Magnet Synchronous Motors application note that comes with the developer's kit.

"../HVPM_Sensored.c", line 516: warning: function declared implicitly

These are lines 507 through 516

 ipark1.Sine=_IQsinPU(rg1.Out);
 ipark1.Cosine=_IQcosPU(rg1.Out);
 IPARK_MACRO(ipark1)

// ------------------------------------------------------------------------------
//  Connect inputs of the SVGEN_DQ module and call the space-vector gen. macro
// ------------------------------------------------------------------------------
 svgen_dq1.Ualpha = ipark1.Alpha;
 svgen_dq1.Ubeta = ipark1.Beta;

 SVGEN_MACRO(svgen_dq1)

  • Richard,

    you get that error when you use a function that is not declared.  for example if you had a printf in your code but didn't have #include <stdio.h> you would get that message.  In your case I would bet that the header file for SVGEN_MACRO is not included or if it is a macro that is defined as another function that the header file for it is not included.

    Regards,

    John

  • Thanks.  svgen_dq.h is included.  However, I've already had one case where I was including two math.h files where one was not complete. 

    My installation did not go too well because they forgot to program my EEPROM in my development kit (or forgot to tell me it needed to be programmed.  Everything was working (up to the debug step) until I reinstalled.  I've torn this thing down 4 times and reinstalled and still I get errors with undefined variables.  I wish I had a map to what directories/libraries I was supposed to be including.  I'm just guessing the latest of everything and it's not working.  Some of the libraries step on each other.  I'm not sure I'm ever going to be able to make this work without someone from TI coming in and fixing it.  It took me 3 days with distributor help just to realize my EEPROM wasn't programmed.  I had to figure out how to program the EEPROM by myself because the instructions were incorrect (due to multiple updates that weren't documented).  I've done a lot of coding but never on this level.  I'm a hardware guy.

    Maybe I should tear this thing down one more time and this time not allow CCS to do any updates.  Looks like another day lost.

  • Richard,

    What device are you using?  One of the device teams may be able to get you up and running without having to go through a reinstall.  

    John

  • The kit is the High Voltage Motor Control and PFC Development Kit (not using PFC).

    The device is TMS320F28035.  I'm not using the 335 part (yet).  I just think my whole installation is scrambled after having found that one library was stepping on the other (after I fixed the library links going to compeletely nonexistent versions). 

    I don't know what to do with it because I've reinstalled 3 times since and each time I have the same undefined variable problems (sometimes more).

    Here is a list of my directory paths from Project->Properties->C/C++ Build->Include Options;

    "${CG_TOOL_ROOT}/include"

    "${XDAIS_CG_ROOT}/packages/ti/xdais"

    "${CONTROLSUITE_HVMOTOR_ROOT}/device_support/f2803x/v124/DSP2803x_headers/include"

    "${CONTROLSUITE_HVMOTOR_ROOT}/device_support/f2803x/v124/DSP2803x_common/include"

    "${CONTROLSUITE_HVMOTOR_ROOT}/libs/math/IQmath/v15c/include"

    "${CONTROLSUITE_HVMOTOR_ROOT}/development_kits/~SupportFiles/F2803x_headers"

    "${CONTROLSUITE_HVMOTOR_ROOT}/libs/app_libs/motor_control/math_blocks/v3.0"

    "${CONTROLSUITE_HVMOTOR_ROOT}/libs/app_libs/motor_control/drivers/f2803x_v1.2"

     

    I'm trying to go through the Sensored FOC of 3-Phase PMSM example.  I cleaned up an issue where math.h was being called from two places and now I'm having difficulties with svgen_dq1.  svgen_dq.h is included in HVPM_Sensored.h

  • Hi,

     Did anyone find a solution for this yet? I'm having the same problem with the Control Suite files for CLARKE and SVGEN_MACRO macros. Neither will compile and I get the compiler error

    "function delcared implicity" for both macros in my code.

    I've even tried renaming them and still no luck. For some reason whenever the macros are more than 1 line of code, I get that error.

     

    Thanks.

     

  • Bob,

    I tried this at my end, with the latest ControlSUITE install and it compiled with no errors,

    Can you please tell what exact version of CodeGen are you using? This can be found by Right Clicking on the Project Name -> Build Properties -> CCS Build,

    I am using TI v 5.2.3,

    Also i would recommend closing the workspace and opening a new workspace, and re-importing the project, 

    I have also attached the motor lib that you can replace at

    controlSUITE\libs\app_libs, just to rule out any accidental modifications

    -Manish Bhardwaj 8686.motor_control.zip

  • Also,

    As per the how to run guide, the following library are being used for corresponding project, 

      Following projects are currently available for the kit:
    - Fixed point projects based on Piccolo (TMS320F2803x, using fixed v1.1 DMCLib)
    • HVACI_Sensorless: Sensorless Field Oriented Control of AC Induction Motor
    • HVACI_Sensored: Sensored Field Oriented Control of AC Induction Motor
    • HVPM_Sensorless: Sensorless Field Oriented Control of Permanent Magnet Motor
    • HVPM_Sensored: Sensored Field Oriented Control of Permanent Magnet Motor
    • HVBLDC_Sensorless: Sensorless Trapezoidal Control of BLDC Motors
    • HVBLDC_Sensored: Sensored Trapezoidal Control of BLDC Motors
    • HVACI_Scalar: Scalar control of AC Induction Motor
    • PFC2PhiLCLA_ACI : Sensorless Field Oriented Control of AC Induction motor with Power Factor
    Correction using Control Law Accelerator(CLA)


    - Floating point projects based on Delfino (TMS320F2833x, using v2.0 DMCLib)
    • HVPM_Sensorless_2833x: Sensorless Field Oriented Control of Permanent Magnet Motor
    • HVPM_Sensored_2833x: Sensored Field Oriented Control of Permanent Magnet Motor

     

    So if you are using PM sensored the include options should look like below for the DMC Lib,

    "${CONTROLSUITE_HVMOTOR_ROOT}/libs/app_libs/motor_control/drivers/f2803x_v1.2"

    "${CONTROLSUITE_HVMOTOR_ROOT}/libs/app_libs/motor_control/math_blocks/fixed_v1.1"

    "${CONTROLSUITE_HVMOTOR_ROOT}/libs/math/IQmath/v15b/include"

     

  • Hi Manish,

     Thank you for your replies. I found the problem. It turns out that it was one of the IQ math macro's causing the problem within both the Clarke and SVGEN macro's. Is there anyway to use a macro in the code such that if there's an error within the macro the compiler flags the line in the macro and not just the line in the main code where the macro is called? The way it's done now where just the main code line is flagged is misleading and sent me on a wild goose chase.

    I've been able to convert everything over to the F335 in floating point math using CCS3.3 and it seems to be working now.

    BTW, my tools are 5.2.8 in CCS3.3

    Thanks.

     

  • Manish,

      Does Ti provide any of these examples in the project format for CCS3.3 or am I the only one still using 3.3? I would think there's still quite a few people using 3.3 and not willing to "upgrade" to CCS4 due to it's limitations. CCS3.3 is working just fine for me except all of the examples in Control Suite are for CCS4. We develop a lot of motor controls and have existing tools (XDS510PP's) that work just fine yet Ti doesn't seem to want to support this platform any longer.

    Thanks

    Bob

     

  • Hello Bob,

    How did you resolve this build error issue via IQ math ?

    I'm getting a similar error flag with SVGEN_MACRO(svgen_dq1) warning: function declared implicitly

                    errors encountered during linking; “HVACI_Sensorless_2806x.out” not built

                    unresolved symbol __IQdiv2, first referenced in ./HVACI_Sensorless.obj

                    unresolved symbol __IQmpy2, first referenced in ./HVACI_Sensorless.obj

    Kind Regards,

    Oscar