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.

Uint16 Typedef with latest Code Composer

Other Parts Discussed in Thread: TMS320F28335, SYSBIOS

I just upgraded to the latest version of code composer (5.3.0.00090) from an older version of CCS 5.  I now have a project that worked before the upgrade but will no longer compile because of a conflict in the Uint16 defines. 

The issue is that in std.h we have the following:

typedef     xdc_UInt8       Uint8;

typedef     xdc_UInt16      Uint16;

typedef     xdc_UInt32      Uint32;

While in DSP2833x_Device.h

typedef       unsigned int       Uint16;

typedef       unsigned long      Uint32;

typedef       unsigned long long Uint64;

What's strange is that before the update, I only got warning saying that the defines where of the same type, now I get the error.

Note the target processor is a TMS320F28335 and I'm running Sys/Bios.  I also have a second project that runs DSP/BIOS and here I only get the warnings (defines of the same type) and no errors.

What is the best way to addrees this issue?

Ed

  • Just to get things working I commented out the define in std.h.  The firmware now compiles but doesn't link.  I'm getting all kinds of errors when it tries to link in sys/bios even though the files it says it can't find are there.  I did install a new version of sys/bios with the new install but I still have the old version.

    Ed

     

  • Ed,
    there is a way to disable short type names for RTSC types: http://rtsc.eclipse.org/docs-tip/Integrating_RTSC_Modules#Disabling_Short_Names_Defined_By_xdc.2Fstd.h.
    You'll also need to ensure that in your code, you use RTSC types for objects that are passed or returned from SYS/BIOS APIs.

    As for warnings and errors, it's possible that you updated the compiler and instead of just warning you about multiple typedefs, you get an error now. If you want to know why the warning turned into an error, you may get a better answer in the compiler forum.

  • I tried this now I get even more errors including a couple still on Uint16

  • Ed,
    sorry that was a wrong advice. I misread the type names as UInt16 and UInt32. Your problem can be fixed by defining xdc__strict macro. That will remove these Uint types.

  • Sasha,

     

    That helped but I', left with two error and two warnings

    Ed

     

  • Ed,
    Are these the same errors you had in the first place before you added any of the xdc macros? I can't tell from that screenshot where the mutliple declarations are. Can you post the output from the console window, that could have some more info.

    You can also turn on the -pprm option and specify the file where the preprocessor will output all macros. Go to CCS Build->C2000 Compiler->Advanced Options->Parser Preprocessing. Switch to Manual mode, and specify a file for -ppm. 

  • The error are basicallt the same, we just now have a lot less of them.  I pasted part of the console output below.  I also generated the preprocessor file and attached it.

    Thanks

    Ed5355.ppm_file.txt

     

     

    'Building file: ../Source/Injector_Test.c'

    'Invoking: C2000 Compiler'

    "C:/ti/ccsv5/tools/compiler/c2000_6.1.3/bin/cl2000" -v28 -ml -mt --float_support=fpu32 -g --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.1.3/include" --include_path="C:/Projects/CC_Projects/820-0247-000_NJection/820-0247-000_NJection_Version_001/Headers" --include_path="C:/Projects/CC_Projects/820-0247-000_NJection/TI_Common/DSP2833x_common/include" --include_path="C:/Projects/CC_Projects/820-0247-000_NJection/TI_Common/DSP2833x_headers/include" --diag_warning=225 --display_error_number --issue_remarks --preproc_with_compile --preproc_dependency="Source/Injector_Test.pp" --obj_directory="Source" --cmd_file="./configPkg/compiler.opt" "../Source/Injector_Test.c"

    "C:/Projects/CC_Projects/820-0247-000_NJection/TI_Common/DSP2833x_headers/include/DSP2833x_Device.h", line 93: error #102: "Uint16" has already been declared in the current scope

    "C:/Projects/CC_Projects/820-0247-000_NJection/TI_Common/DSP2833x_headers/include/DSP2833x_Device.h", line 94: warning #303-D: typedef name has already been declared (with same type)

    "C:\Projects\CC_Projects\820-0247-000_NJection\820-0247-000_NJection_Version_001\Headers\Injector_Control.h", line 218: remark #179-D: function "Degrees_To_uS" was declared but never referenced

    "C:\Projects\CC_Projects\820-0247-000_NJection\820-0247-000_NJection_Version_001\Headers\Injector_Control.h", line 219: remark #179-D: function "uS_To_Degrees" was declared but never referenced

    "C:\Projects\CC_Projects\820-0247-000_NJection\820-0247-000_NJection_Version_001\Headers\Injector_Control.h", line 220: remark #179-D: function "Add_Degrees" was declared but never referenced

    "C:\Projects\CC_Projects\820-0247-000_NJection\820-0247-000_NJection_Version_001\Headers\Injector_Control.h", line 229: remark #179-D: function "Injector_Handle_Timer" was declared but never referenced

    "C:\Projects\CC_Projects\820-0247-000_NJection\820-0247-000_NJection_Version_001\Headers\Analogs.h", line 170: remark #179-D: function "Analog_Calc_Max_HP" was declared but never referenced

    1 error detected in the compilation of "../Source/Injector_Test.c".

    gmake: *** [Source/Injector_Test.obj] Error 1

    >> Compilation failure

    'Building file: ../Source/main.c'

    'Invoking: C2000 Compiler'

    "C:/ti/ccsv5/tools/compiler/c2000_6.1.3/bin/cl2000" -v28 -ml -mt --float_support=fpu32 -g --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.1.3/include" --include_path="C:/Projects/CC_Projects/820-0247-000_NJection/820-0247-000_NJection_Version_001/Headers" --include_path="C:/Projects/CC_Projects/820-0247-000_NJection/TI_Common/DSP2833x_common/include" --include_path="C:/Projects/CC_Projects/820-0247-000_NJection/TI_Common/DSP2833x_headers/include" --diag_warning=225 --display_error_number --issue_remarks --preproc_with_compile --preproc_dependency="Source/main.pp" --obj_directory="Source" --cmd_file="./configPkg/compiler.opt" "../Source/main.c"

    "C:/Projects/CC_Projects/820-0247-000_NJection/TI_Common/DSP2833x_headers/include/DSP2833x_Device.h", line 93: error #102: "Uint16" has already been declared in the current scope

    "C:/Projects/CC_Projects/820-0247-000_NJection/TI_Common/DSP2833x_headers/include/DSP2833x_Device.h", line 94: warning #303-D: typedef name has already been declared (with same type)

    "C:/Projects/CC_Projects/820-0247-000_NJection/820-0247-000_NJection_Version_001/Headers/Injector_Control.h", line 218: remark #179-D: function "Degrees_To_uS" was declared but never referenced

    "C:/Projects/CC_Projects/820-0247-000_NJection/820-0247-000_NJection_Version_001/Headers/Injector_Control.h", line 219: remark #179-D: function "uS_To_Degrees" was declared but never referenced

    "C:/Projects/CC_Projects/820-0247-000_NJection/820-0247-000_NJection_Version_001/Headers/Injector_Control.h", line 220: remark #179-D: function "Add_Degrees" was declared but never referenced

    "C:/Projects/CC_Projects/820-0247-000_NJection/820-0247-000_NJection_Version_001/Headers/Injector_Control.h", line 229: remark #179-D: function "Injector_Handle_Timer" was declared but never referenced

    "C:/Projects/CC_Projects/820-0247-000_NJection/820-0247-000_NJection_Version_001/Headers/Analogs.h", line 170: remark #179-D: function "Analog_Calc_Max_HP" was declared but never referenced

    1 error detected in the compilation of "../Source/main.c".

    >> Compilation failure

    gmake: *** [Source/main.obj] Error 1

    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

  • Making some progress.  I changed the defines to remove the typedef from the DSP2833x_Device headers instead of the XDC header and now I no longer get conflicts of Uint16.  I did have to add a typoedef for int16 for some reason:

    //#define xdc__strict

    #define     DSP28_DATA_TYPES

    typedef      int int16;

    Now however it looks like it can build sysbios for some reason, at least thast what I think this means:

    **** Build of configuration Debug for project 820-0247-000_NJection_Version_001 ****


     

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all

    making ../src/sysbios/sysbios.lib ...

    gmake[1]: *** No rule to make target `BIOS.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `family/c28/TimestampProvider.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `family/c28/Hwi.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `family/c28/Timer.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `family/c28/TaskSupport.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `hal/Hwi.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `hal/Hwi_stack.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `hal/Hwi_startup.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `hal/Timer.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `knl/Clock.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `knl/Idle.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `knl/Intrinsics.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `knl/Event.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `knl/Queue.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `knl/Semaphore.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `knl/Swi.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `knl/Swi_andn.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `knl/Task.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `rta/SupportLogger.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `gates/GateHwi.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `gates/GateMutex.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `heaps/HeapNull.c', needed by `BIOS.obj'.

    gmake[1]: *** No rule to make target `family/c28/Clobber_asm.s28', needed by `c28_Clobber_asm.obj'.

    gmake[1]: *** No rule to make target `family/c28/Hwi_asm.s28', needed by `c28_Hwi_asm.obj'.

    gmake[1]: *** No rule to make target `family/c28/Hwi_disp.s28', needed by `c28_Hwi_disp.obj'.

    gmake[1]: *** No rule to make target `family/c28/IntrinsicsSupport_asm.s28', needed by `c28_IntrinsicsSupport_asm.obj'.

    gmake[1]: *** No rule to make target `family/c28/TaskSupport_asm.s28', needed by `c28_TaskSupport_asm.obj'.

    gmake[1]: Target `all' not remade because of errors.

    gmake: *** [../src/sysbios/sysbios.lib] Error 2

    'Building file: ../app.cfg'

    'Invoking: XDCtools'

    "C:/ti/xdctools_3_25_00_48/xs" --xdcpath="C:/ti/bios_6_35_01_29/packages;C:/Projects/CC_Projects/820-0247-000_NJection/SysBios/Platforms;C:/ti/ccsv5/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.C28_float -p ti.platforms.tms320x28:TMS320F28335 -r release -c "C:/ti/ccsv5/tools/compiler/c2000_6.1.3" --compileOptions "-g --optimize_with_debug" "../app.cfg"

    making package.mak (because of package.bld) ...

    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...

    configuring app.x28FP from package/cfg/app_p28FP.cfg ...

    warning: ti.sysbios.rta.Agent: "C:/ti/bios_6_35_01_29/packages/ti/sysbios/rta/Agent.xs", line 66: ti.sysbios.rta.Agent : This module is deprecated and will not be supported in a future release. Please use the UIA product for the equivalent functionality.

    cl28FP package/cfg/app_p28FP.c ...

    'Finished building: ../app.cfg'

  • One more clue: I took a look at my app.cfg file and found that there where no options selected under SYS/BIOS Library Type and when I go to select an option I get a "Flag" pop up saying BIOS is not defined.

     

     

    Ed

     

  • I'm also getting the folowing error when I compile now:

    Ed

     

  • More information:

    I went back to Sys/Bios version 6.33.5.46 and thing are a bit better.  I no longer get XDC error when I compile and the app.cfg file now seems to be OK.  However now I'm back to the sysetm not being able to find some files.

    Ed

     

     

    making ../src/sysbios/sysbios.lib ...

    cl28FP C:/TI/bios_6_33_04_39/packages/ti/sysbios/BIOS.c ...

    The system cannot find the path specified.

    gmake[1]: *** [BIOS.obj] Error 1

    asm28FP C:/TI/bios_6_33_04_39/packages/ti/sysbios/family/c28/Clobber_asm.s28 ...

    The system cannot find the path specified.

    gmake[1]: *** [c28_Clobber_asm.obj] Error 1

    asm28FP C:/TI/bios_6_33_04_39/packages/ti/sysbios/family/c28/Hwi_asm.s28 ...

    The system cannot find the path specified.

    gmake[1]: *** [c28_Hwi_asm.obj] Error 1

    asm28FP C:/TI/bios_6_33_04_39/packages/ti/sysbios/family/c28/Hwi_disp.s28 ...

    The system cannot find the path specified.

    gmake[1]: *** [c28_Hwi_disp.obj] Error 1

    asm28FP C:/TI/bios_6_33_04_39/packages/ti/sysbios/family/c28/IntrinsicsSupport_asm.s28 ...

    The system cannot find the path specified.

    gmake[1]: *** [c28_IntrinsicsSupport_asm.obj] Error 1

    asm28FP C:/TI/bios_6_33_04_39/packages/ti/sysbios/family/c28/TaskSupport_asm.s28 ...

    The system cannot find the path specified.

    gmake[1]: *** [c28_TaskSupport_asm.obj] Error 1

    gmake[1]: Target `all' not remade because of errors.

    gmake: *** [../src/sysbios/sysbios.lib] Error 2

  • I've tried using older version of code composer, XDC tools and the C2000 compiler.  All seem to give the same result now (same as above)

    Ed

     

  • Ed,
    many of the errors in a couple of your last posts can be a result of the project being in an invalid state due to previous building errors. Additionally, when you turn on the generation of the PPM file, the build will stop there. So, whenever you need to create a PPM file, you have to turn that option on, create the file and then turn the option off. Also, from the PPM file you posted I can see that the macro xdc__strict wasn't in effect when you created that file. We have to check why that happened.

    First, clean the project and check the output in the console window to verify that the cleaning succeeds. Also, find your project directory in Windows Explorer and remove the directory .config. It's a temporary directory that will be regenerated when needed.
    Now, select XDCtools and SYS/BIOS in the version of CCS in which you worked at the beginning of the thread. Open the file Injector_test.c and verify that you have these lines in your file in this order:
    #define xdc__strict
    #include <xdc/std.h>

    Try building and post the console output. If the build fails, clean the project, turn on the generation of the PPM file, and build again. Please post the generated PPM file for Injector_test.c.

    Just to be safe, whenever you make a change after a build fails, clean the project before a new build. That way you won't chase the problems that are simply a result of a previous failed build.

  • Sasha,

    Thanks for the update.  However I managed to fix the issue, although I'm not sure what happened.  As far as I can tell, my CFG file was corrupted some how.  What I did was create a new project from scratch and copied all my source in and then added all the SYS/Bios components manually.  Took me a while but it is now working with:

    CCS version 5.4

    C2000 Compiler version 6.1.3

    Sys/Bios 6.35.1.29

    XDC Tool Version 3.25.0.48

    I think that is all the newest components.

    Thanks for the help but I think I will move on with the new build.  I wish I knew what happened. 

    Ed

     

  • if I manually write -ppm in parser preprocessing option it only shows the warning but I am not able to create .out file
    Please help me out
  • Hi Gaurav,
    We generally discourage posting a new question to an old closed thread because the person who answered before may no longer be available, and also it will allow whomever is currently assigned to monitor the forum to respond to you more quickly. For these reasons, I suggest you start a new thread with your question and reference this thread.

    Thank you