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.

"Semaphore.c", line 234: remark #2142-D: comparison between signed and unsigned operands

Other Parts Discussed in Thread: OMAPL138, SYSBIOS

I am upgrading the TI-RTOS workshop labs/solutions files from CCSv6.10 to CCSv6.2.0 and the associated XDC and compiler version upgrades since last July. I am currently working on the C6000 files. When I re-build the proven solutions from CCSv6.1.0 and the XDC/compiler versions available in July to the latest tools, everything builds fine, but I get two REMARKS like the above, both flagging if statements in semaphore.c and timer.c (not my code, but BIOS's code).

In the same project as of Jul 2016 using the latest tools available then, the build was clean with no Remarks. Did something change? Is there an easy way to build without these remarks? What do I need to change?

FYI - if I create a new project with the latest tools, copy over my source files and build, these Remarks do NOT show up.

Thanks,

Eric 

  • Eric,
    can you show the command line for those different cases? I would like to see compiler versions and all the options.
  • Thanks Sasha.

    Here is the command line for the previous example using CCSv6.1.0:

    -mv6740 --abi=eabi --include_path="C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1/include" --include_path="C:/TI/pdk_OMAPL138_1_01_00_02/packages" -g --define=c6748 --diag_warning=225 --diag_wrap=off --display_error_number

    Here is the command line for the same project using CCSv6.2.0:

    -mv6740 --include_path="C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2/include" --include_path="C:/TI/pdk_OMAPL138_1_01_00_02/packages" -g --define=c6748 --diag_warning=225 --diag_wrap=off --display_error_number

    Looks like the only diff is --abi=eabi, but both are set to use elf in the properties. One other difference is that the previous project, once built, has add'l repositories listed that were not there before:

    In the newer project, only the ccs_base repository is referenced. Not sure why these others show up because they should all be selected by choosing the TI-RTOS for C6000 path.

    Thanks for looking into this.

  • How about the third case when you create a new project from scratch and copy the sources? What is the command line in that case?
    Also, I don't see any TI-RTOS related options in the command line, but it seems you are compiling Semaphore.c from ti.sysbios.knl package, so there has to be more options in that command line.

    Either way, the comparison as exists in these files in unsafe so please let me know the line for Timer.c and full path to that file so we can fix it.

    I don't think "--abi=eabi" flag matters because for 8.1 tools, "--abi=eabi" is the default and shouldn't make any difference, but we can look into it more if we can't find any other cause.
  • Eric,
    I asked around and it seems the issue was fixed in SYS/BIOS 6.46.02. If you switch to a newer SYS/BIOS or TI-RTOS including a newer SYS/BIOS, you shouldn't see these warnings anymore.
  • Sorry Sasha, I copied that command line from the Compiler tab under Properties. You probably want the actual build output.

    Update - now the projects are building the same way - two remarks - both flagging BIOS files (semaphore.c and timer.c).

    Case #1 (no remarks) was CCSv6.1.0 with project X. Case #2 (remarks) was project X built with CCSv6.2.0 and latest tools. Case #3 is creating a new project in the latest tools and copying over my source files. I am attempting to avoid creating 125 new projects. There are 25 lab and solution files per architecture times 5 architectures. It is great when I can just take a project, update to new tools and then re-build and go. But I often find 3-4 problems every three months like this that causes me to have to re-create all the projects over again. It isn't hard. Just a pain.

    Lots of text coming next - three output build windows. Again, thanks for looking into this...

    I don't have CCSv6.1.0 installed anything, so I can't show you Case #1. Unless I re-install it which I can. After creating three new projects for Case #3, now I continue to NOT get a clean build - same two remarks. So, at least it is consistent. 

    NOW, the question is "why is the compiler flagging semaphore.c and timer.c" - code that I didn't write, but coming from the bios library source code??

    Ok, so here are the dumps of every build:

    CASE #2 - Old project, new tools (where the remarks on semaphore.c and timer.c are shown):

    **** Build of configuration Debug for project blink_C6000_HWI_SOL ****

    "C:\\TI\\ccsv6\\utils\\bin\\gmake" -k all

    making ../src/sysbios/sysbios.ae674 ...

    gmake[1]: Entering directory 'C:/Users/Eric Wilbur/workspace_v6_2/blink_C6000_HWI_SOL/src/sysbios'

    cle674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/BIOS.c ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Hwi_disp_always.s64P ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Hwi_asm.s62 ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Hwi_asm_switch.s62 ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Clobber_asm.s62 ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Exception_asm.s64P ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/MemoryProtect_asm.s64P ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c62/TaskSupport_asm.s62 ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/timer64/Timer_asm.s64P ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/gptimer/Timer_asm.s64P ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/dmtimer/Timer_asm.s64P ...

    are674 BIOS.obj c64p_Hwi_disp_always.obj c64p_Hwi_asm.obj c64p_Hwi_asm_switch.obj c64p_Clobber_asm.obj c64p_Exception_asm.obj c64p_MemoryProtect_asm.obj c62_TaskSupport_asm.obj timer64_Timer_asm.obj gptimer_Timer_asm.obj dmtimer_Timer_asm.obj ...

    gmake[1]: Leaving directory 'C:/Users/Eric Wilbur/workspace_v6_2/blink_C6000_HWI_SOL/src/sysbios'

    'Building file: ../app.cfg'

    'Invoking: XDCtools'

    "C:/TI/xdctools_3_32_01_22_core/xs" --xdcpath="C:/TI/tirtos_c6000_2_00_01_23/packages;C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages;C:/TI/tirtos_c6000_2_00_01_23/products/ipc_3_10_01_11/packages;C:/TI/tirtos_c6000_2_00_01_23/products/ndk_2_23_01_01/packages;C:/TI/tirtos_c6000_2_00_01_23/products/uia_2_00_00_28/packages;C:/TI/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C674 -p ti.platforms.evm6748 -r release -c "C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2" --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.xe674 from package/cfg/app_pe674.cfg ...

    generating custom ti.sysbios library makefile ...

    Starting build of library sources ...

    making C:/Users/ERICWI~1/workspace_v6_2/blink_C6000_HWI_SOL/src/sysbios/sysbios.ae674 ...

    gmake[1]: Entering directory `C:/Users/ERICWI~1/workspace_v6_2/blink_C6000_HWI_SOL/src/sysbios'

    cle674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/BIOS.c ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Hwi_disp_always.s64P ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Hwi_asm.s62 ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Hwi_asm_switch.s62 ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Clobber_asm.s62 ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Exception_asm.s64P ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/MemoryProtect_asm.s64P ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c62/TaskSupport_asm.s62 ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/timer64/Timer_asm.s64P ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/gptimer/Timer_asm.s64P ...

    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/dmtimer/Timer_asm.s64P ...

    are674 BIOS.obj c64p_Hwi_disp_always.obj c64p_Hwi_asm.obj c64p_Hwi_asm_switch.obj c64p_Clobber_asm.obj c64p_Exception_asm.obj c64p_MemoryProtect_asm.obj c62_TaskSupport_asm.obj timer64_Timer_asm.obj gptimer_Timer_asm.obj dmtimer_Timer_asm.obj ...

    gmake[1]: Leaving directory `C:/Users/ERICWI~1/workspace_v6_2/blink_C6000_HWI_SOL/src/sysbios'

    Build of libraries done.

    cle674 package/cfg/app_pe674.c ...

    "C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/knl/Semaphore.c", line 234: remark #2142-D: comparison between signed and unsigned operands

    "C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/timer64/Timer.c", line 775: remark #2142-D: comparison between signed and unsigned operands

    "C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/knl/Semaphore.c", line 234: remark #2142-D: comparison between signed and unsigned operands

    "C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/timer64/Timer.c", line 775: remark #2142-D: comparison between signed and unsigned operands

    'Finished building: ../app.cfg'

    ' '

    'Building file: ../main.c'

    'Invoking: C6000 Compiler'

    "C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2/bin/cl6x" -mv6740 --abi=eabi --include_path="C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2/include" --include_path="C:/TI/pdk_OMAPL138_1_01_00_02/packages" -g --define=c6748 --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="main.d" --cmd_file="configPkg/compiler.opt" "../main.c"

    'Finished building: ../main.c'

    ' '

    'Building target: blink_C6000_HWI_SOL.out'

    'Invoking: C6000 Linker'

    "C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2/bin/cl6x" -mv6740 --abi=eabi -g --define=c6748 --diag_warning=225 --diag_wrap=off --display_error_number -z -m"blink_C6000_HWI_SOL.map" --heap_size=0x800 --stack_size=0x800 -i"C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2/lib" -i"C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="blink_C6000_HWI_SOL_linkInfo.xml" --rom_model -o "blink_C6000_HWI_SOL.out" "./main.obj" -l"configPkg/linker.cmd" -llibc.a

    <Linking>

    'Finished building target: blink_C6000_HWI_SOL.out'

    ' '

    **** Build Finished ****

    CASE #3 - New project using old source files, new tools (no remarks, build is NOT clean now - same two remarks):

    **** Build of configuration Debug for project LAB5_HWI_TEST_CCSV620 ****

    "C:\\TI\\ccsv6\\utils\\bin\\gmake" -k all
    making ../src/sysbios/sysbios.ae674 ...
    gmake[1]: Entering directory 'C:/Users/Eric Wilbur/workspace_v6_2/LAB5_HWI_TEST_CCSV620/src/sysbios'
    cle674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/BIOS.c ...
    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Hwi_disp_always.s64P ...
    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Hwi_asm.s62 ...
    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Hwi_asm_switch.s62 ...
    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Clobber_asm.s62 ...
    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Exception_asm.s64P ...
    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c64p/MemoryProtect_asm.s64P ...
    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/family/c62/TaskSupport_asm.s62 ...
    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/timer64/Timer_asm.s64P ...
    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/gptimer/Timer_asm.s64P ...
    asme674 C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/dmtimer/Timer_asm.s64P ...
    are674 BIOS.obj c64p_Hwi_disp_always.obj c64p_Hwi_asm.obj c64p_Hwi_asm_switch.obj c64p_Clobber_asm.obj c64p_Exception_asm.obj c64p_MemoryProtect_asm.obj c62_TaskSupport_asm.obj timer64_Timer_asm.obj gptimer_Timer_asm.obj dmtimer_Timer_asm.obj ...
    gmake[1]: Leaving directory 'C:/Users/Eric Wilbur/workspace_v6_2/LAB5_HWI_TEST_CCSV620/src/sysbios'
    'Building file: ../app.cfg'
    'Invoking: XDCtools'
    "C:/TI/xdctools_3_32_01_22_core/xs" --xdcpath="C:/TI/tirtos_c6000_2_00_01_23/packages;C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages;C:/TI/tirtos_c6000_2_00_01_23/products/ipc_3_10_01_11/packages;C:/TI/tirtos_c6000_2_00_01_23/products/ndk_2_23_01_01/packages;C:/TI/tirtos_c6000_2_00_01_23/products/uia_2_00_00_28/packages;C:/TI/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C674 -p ti.platforms.evm6748 -r release -c "C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2" --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.xe674 from package/cfg/app_pe674.cfg ...
    generating custom ti.sysbios library makefile ...
    Starting build of library sources ...
    making C:/Users/ERICWI~1/workspace_v6_2/LAB5_HWI_TEST_CCSV620/src/sysbios/sysbios.ae674 ...
    gmake[1]: Entering directory `C:/Users/ERICWI~1/workspace_v6_2/LAB5_HWI_TEST_CCSV620/src/sysbios'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `C:/Users/ERICWI~1/workspace_v6_2/LAB5_HWI_TEST_CCSV620/src/sysbios'
    Build of libraries done.
    cle674 package/cfg/app_pe674.c ...
    "C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/knl/Semaphore.c", line 234: remark #2142-D: comparison between signed and unsigned operands
    "C:/TI/tirtos_c6000_2_00_01_23/products/bios_6_40_01_15/packages/ti/sysbios/timers/timer64/Timer.c", line 775: remark #2142-D: comparison between signed and unsigned operands
    'Finished building: ../app.cfg'
    ' '
    'Building file: ../main.c'
    'Invoking: C6000 Compiler'
    "C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2/bin/cl6x" -mv6740 --include_path="C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2/include" --include_path="C:/TI/pdk_OMAPL138_1_01_00_02/packages" -g --define=c6748 --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="main.d" --cmd_file="configPkg/compiler.opt" "../main.c"
    'Finished building: ../main.c'
    ' '
    'Building target: LAB5_HWI_TEST_CCSV620.out'
    'Invoking: C6000 Linker'
    "C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2/bin/cl6x" -mv6740 -g --define=c6748 --diag_warning=225 --diag_wrap=off --display_error_number -z -m"LAB5_HWI_TEST_CCSV620.map" --heap_size=0x800 --stack_size=0x800 -i"C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2/lib" -i"C:/TI/ccsv6/tools/compiler/ti-cgt-c6000_8.1.2/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="LAB5_HWI_TEST_CCSV620_linkInfo.xml" --rom_model -o "LAB5_HWI_TEST_CCSV620.out" "./main.obj" -l"configPkg/linker.cmd" -llibc.a
    <Linking>
    'Finished building target: LAB5_HWI_TEST_CCSV620.out'
    ' '

    **** Build Finished ****

  • Thanks Sasha. The latest C6000 TI-RTOS is 2_00_01_23 which includes BIOS 6_40_01_15. So you are suggesting I simply keep TI-RTOS as a package, select it in properties, but then add BIOS 6.46.02 or later and select it also in properties? I do use UIA in the labs. UIA version in TI-RTOS 2_00_01_23 is version 2_00_00_28. Will this affect compatibility between these versions?

    Part of the student lab guide is "setup". In other words, I document the setup required to do these labs successfully. Let me know what to upgrade and how outside of using TI-RTOS package straight up and I'll do that and test it and let you know.

    Thanks again...
  • I just looked at the BIOS page to download the version 6.46.02 "or later" to try it out. Here is what I saw. I can't find 6.46.02 or later. Is there another page to go to besides:

    downloads.ti.com/.../

    Thanks. I am trying to follow your suggestion. Is there another location for version 6.46.02 ??

  • I think you are supposed to switch to Processor SDK: www.ti.com/.../PROCESSOR-SDK-C667x for a whole bundle, but the newest SDK doesn't have the newest SYS/BIOS either. These SDK products are not assembled by our team, so I can't tell when are they going to start using SYS/BIOS 6.46.02.
    The page you were looking at is the right one, but I just learned that he haven't made 6.46.02 public yet. It should happen in matter of days.
  • Sasha, thanks for the help and replies. I will stick with the current C6000 TI-RTOS version as is for now and live with the remarks. As I have time, I will investigate your suggestion above. Again, thank you.
  • Just wanted to let you know that 6.46.02 will be available on Moday.