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.

ARM-CGT: Compiling error #67: enumeration value is out of "int" range

Part Number: ARM-CGT

Hello,

I was trying to compile code with ti-cgt-arm_20.2.5.LTS armcl but got "error #67: enumeration value is out of "int" range". Here below is the log:

FAILED: soc/hlos/sample/awr294x-evm/CMakeFiles/CycurSOC_HLOS_AWR294X_Sample.dir/Debug/__/__/__/__/generated/awr294x_evm/freertos/r5fss0-0/ti_board_open_close.c.o
/home/mmao/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin/armcl --compile_only --c_file=/home/mmao/Projects/CycurSoC/socsecswexploration/build/awr294x/generated/awr294x_evm/freertos/r5fss0-0/ti_board_open_close.c -DSOC_AWR294X -DCMAKE_INTDIR=\"Debug\" --include_path=/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source --include_path=/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/kernel/freertos/FreeRTOS-Kernel/include --include_path=/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F --include_path=/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/kernel/freertos/config/awr294x/r5f --include_path=/home/mmao/Projects/CycurSoC/socsecswexploration/build/awr294x/generated/awr294x_evm/freertos/r5fss0-0 -mv7R5 -me --code_state=32 --include_path="/home/mmao/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --diag_warning=225 --diag_wrap=off --display_error_number --emit_warnings_as_errors --enum_type=int --c11 --strict_ansi --preproc_with_compile --preproc_dependency=soc/hlos/sample/awr294x-evm/CMakeFiles/CycurSOC_HLOS_AWR294X_Sample.dir/Debug/__/__/__/__/generated/awr294x_evm/freertos/r5fss0-0/ti_board_open_close.c.o.d --output_file=soc/hlos/sample/awr294x-evm/CMakeFiles/CycurSOC_HLOS_AWR294X_Sample.dir/Debug/__/__/__/__/generated/awr294x_evm/freertos/r5fss0-0/ti_board_open_close.c.o
"/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 173: error #67: enumeration value is out of "int" range
"/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 238: error #67: enumeration value is out of "int" range
"/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 252: error #67: enumeration value is out of "int" range
"/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 275: error #67: enumeration value is out of "int" range
"/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 379: error #67: enumeration value is out of "int" range
"/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 399: error #67: enumeration value is out of "int" range

The soc_rcm.h is a source file from mmwave_mcuplus_sdk_04_02_00_03 and it has enumeration values assigned with 0xFFFFFFFFu. I tried to resolve the issue with compiling option "--enum_type=int" but it didn't work.

How should I resolve the issue?

Thanks,

Matthew

  • Hello Matthew, 

    Welcome to TI E2E forums and Thankyou for reaching out to us. 

    Please give us some time while we look into your concern. 

    Regards,

    Ishita

  • Hi Matthew,

                       Can you please confirm if you are getting this error if you are trying to build the latest mcu-plus mmwave sdk using the gmake command or something? Please share the compilation command if you are using anything specific other than gmake and what was the driver code you were trying to build when you got this error. Please also confirm if you are using the linux or windows machine for the build/compile.

    Thanks and Regards,

    Akshay.

  • Hi Akshay,

    I'm using cmake to set up my build system on an Ubuntu machine. Here below is the real build command:

    /home/mmao/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin/armcl --compile_only --c_file=/home/mmao/Projects/CycurSoC/socsecswexploration/build/awr294x/generated/awr294x_evm/freertos/r5fss0-0/ti_drivers_config.c -DSOC_AWR294X -DCMAKE_INTDIR=\"Debug\" --include_path=/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source --include_path=/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/kernel/freertos/FreeRTOS-Kernel/include --include_path=/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F --include_path=/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/kernel/freertos/config/awr294x/r5f --include_path=/home/mmao/Projects/CycurSoC/socsecswexploration/build/awr294x/generated/awr294x_evm/freertos/r5fss0-0 -mv7R5 -me --code_state=32 --include_path="/home/mmao/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --diag_warning=225 --diag_wrap=off --display_error_number -mv7R5 -me --code_state=32 --include_path="/home/mmao/ti/ccs1110/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --diag_warning=225 --diag_wrap=off --display_error_number --emit_warnings_as_errors --enum_type=int --c11 --strict_ansi --preproc_with_compile --preproc_dependency=soc/hlos/sample/awr294x-evm/CMakeFiles/CycurSOC_HLOS_AWR294X_r5fss0-0_Sample.dir/Debug/__/__/__/__/generated/awr294x_evm/freertos/r5fss0-0/ti_drivers_config.c.o.d --output_file=soc/hlos/sample/awr294x-evm/CMakeFiles/CycurSOC_HLOS_AWR294X_r5fss0-0_Sample.dir/Debug/__/__/__/__/generated/awr294x_evm/freertos/r5fss0-0/ti_drivers_config.c.o
    "/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 173: error #67: enumeration value is out of "int" range
    "/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 238: error #67: enumeration value is out of "int" range
    "/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 252: error #67: enumeration value is out of "int" range
    "/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 275: error #67: enumeration value is out of "int" range
    "/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 379: error #67: enumeration value is out of "int" range
    "/home/mmao/ti/mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h", line 399: error #67: enumeration value is out of "int" range
    6 errors detected in the compilation of "/home/mmao/Projects/CycurSoC/socsecswexploration/build/awr294x/generated/awr294x_evm/freertos/r5fss0-0/ti_drivers_config.c".

    You can easy modify the above command and try it out.

    Thanks,

    Matthew

  • Hi Matthew,

                      Unfortunately, I don't have access to a ubuntu machine readily available. So is there any specific reason you are using the cmake command? Can you please try to build with "make" command in ubuntu.

    Thanks and Regards,

    Akshay. 

  • Hi Akshay,

    You can directly use armcl.exe on Windows or armcl on Linux to compile C code without using gmake or cmake, so I suggest you to write a C file including the "mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25/source/drivers/soc/awr294x/soc_rcm.h" and compile it to reproduce the issue.

    Thanks,

    Matthew

  • Matthew,

    The issues is that the code you are building is not compatible with the compile options you are using.

    There are a couple of ways to resolve this.  One is to stop using the option.  The other is to fix the issue in the code.

    1)  Remove "--strict_ansi" from your build options.  The way the enums are defined in soc_rcm.h is not compatible with this option. 

    2)  Edit soc_rcm.h and replace all occurrences of 0xFFFFFFFFu with INT32_MAX which is defined in <stdint.h>

    Regards,

    John

  • Hi John,

    Thanks for your response! Since the file soc_rcm.h is a part of TI mmwave_mcuplus_sdk_04_02_00_03/mcu_plus_sdk_awr294x_08_02_00_25 and we don't want to touch it, so option 1 is our only choice.

    BTW the issue doesn't show up with ti-cgt-armllvm_1.3.0.LTS compiler.

    Regards,

    Matthew

  • Matthew,

    You would have to enable the equivalent option to --strict_ansi to see the same when using clang.   Just like with armcl if you are not setting the option you will not see the error.  I am assuming that you added both --strict_ansi and --c11 yourself when using armcl.

    For clang the equivalent would be to set the language standard as c99 (or higher) and then to set the option to emit errors when there are conflicts with the standard.  I am using the 2.0 clang compiler, the option is likely there in 1.3 as well.

    Every compiler will do that a bit differently.  I know Keil has an option for it.

    Akshay may be able to comment on if there are plans to support the language standard in the SDK.   

    Regards,

    John

  • Matthew and John,

                                  I did check with the SDK team and they don't plan to support language standard in SDK soon. So I think it would be better if Matthew can setup the required things he wants by making few changes to file as per John's comments.

                                 Let me know if you have any questions.

    Thanks and Regards,

    Akshay.