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.

How to config CCS to support “Function declaration” not same as the "definition" ?

Other Parts Discussed in Thread: AWR1843

Hi team,

Customer is using AWR1843 device, and the compilier is C:\ti\ccs1120\ccs\tools\compiler\ti-cgt-arm_20.2.5.LTS

Question: How to config CCS to support “Function declaration” not same as the "definition" ? This is supported in C, but CCS will report an error. The reason to do this, is they are copy code from other platform to Ti platform, and this code is already qualified in other non-TI platform.

Error: Description Resource Path Location Type, #148 declaration is incompatible with "void functionname(const uint8_t *, uint16_t)" (declared at line 3700)

typedef uint8_t data_u8[1];
void functionname( uint8_t *aaaa);

void functionname( data_u8 *aaaa)




  • For the source file being built when this diagnostic is emitted ...

    declaration is incompatible with "void functionname(const uint8_t *, uint16_t)

    please follow the directions in the article How to Submit a Compiler Test Case.

    Thanks and regards,


  • Hi George,

    The compiler version is ti-cgt-arm_20.2.5.LTS

    please see the pp file and build log in attach TXT.

    **** Build of configuration isk for project out_of_box_1843_mss ****
    "C:\\ti\\ccs1120\\ccs\\utils\\bin\\gmake" -k -j 8 mss_main.oer4f -O 
    Building file: "../mss_main.c"
    Invoking: Arm Compiler
    "C:/ti/ccs1120/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin/armcl" -mv7R4 --code_state=16 --float_support=VFPv3D16 -me -O3 --include_path="C:/ccs_workspace_v10/AWR1843_MCAL_Definition_issue/out_of_box_1843_mss" --include_path="C:/ti/mmwave_sdk_03_06_00_00-LTS/packages" --include_path="C:/ti/ccs1120/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --define=SOC_XWR18XX --define=SUBSYS_MSS --define=DOWNLOAD_FROM_CCS --define=MMWAVE_L3RAM_NUM_BANK=8 --define=MMWAVE_SHMEM_TCMA_NUM_BANK=0 --define=MMWAVE_SHMEM_TCMB_NUM_BANK=0 --define=MMWAVE_SHMEM_BANK_SIZE=0x20000 --define=DebugP_ASSERT_ENABLED --define=_LITTLE_ENDIAN --define=OBJDET_NO_RANGE --define=APP_RESOURCE_FILE='<'ti/demo/xwr18xx/mmw/mmw_res.h'>' -g --c99 --preproc_with_comment --preproc_with_compile --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --enum_type=int --abi=eabi --obj_extension=.oer4f --cmd_file="configPkg/compiler.opt"  "../mss_main.c"
    >> Compilation failure recipe for target 'mss_main.oer4f' failed
    "../mss_main.c", line 74: error #148: declaration is incompatible with "void functionname(uint8_t *)" (declared at line 72)
    1 error detected in the compilation of "../mss_main.c".
    gmake: *** [mss_main.oer4f] Error 1
    **** Build Finished ****




  • Isn't the answer as follows....

    Instead of:

    typedef uint8_t data_u8[1];

    It should be:

    typedef uint8_t data_u8;

  • Hi Kier,

    Customer agree this change can fix the issue, but the challenge is they need to keep the code same as other non-TI platform, in other platform, this code can be compiled and no issue.

    Continue need your support on how to configure the compiler to ensure the compiler support this writing grammar.




  • Unfortunately, the TI proprietary Arm compiler emits an error for this code.  There is no method to suppress or otherwise avoid this error.  

    I uploaded a cut-down of this code to Compiler Explorer, and tried it with many compilers.  The Microsoft compilers (called msvc on Compiler Explorer) emit a warning.  All the other compilers I tried emit an error.  

    Unfortunately, you have no choice but to change the code.  However, once the code is fixed, it will build clean with both compilers.

    Thanks and regards,