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.

Compiler/TDA4VMXEVM: MCUSW build error

Part Number: TDA4VMXEVM

Tool/software: TI C/C++ Compiler

Hi,

There're some errors when building the Can Profiling Application.The errors are shown as below.Can you help me solve it?

vmuser@ubuntu:~/psdk_rtos_auto_j7_07_00_00_11/mcusw/build$ sudo make -s can_profile_app BOARD=j721e_evm SOC=j721e BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=tirtos
Nothing to be done for j721e i2c_indp
Nothing to be done for j721e i2c_profile
Nothing to be done for j721e i2c_profile_indp
Nothing to be done for j721e i2c_icss0
Nothing to be done for j721e fatfs_multi_indp
Nothing to be done for j721e fatfs_profile_indp
/bin/sh: mono: command not found
/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/pdk_jacinto_07_00_00/packages/ti/build/makerules/common.mk:670: recipe for target 'sbl_appimagerprc' failed
make[1]: *** [sbl_appimagerprc] Error 127
makefile:154: recipe for target 'can_profile_app' failed
make: *** [can_profile_app] Error 2
vmuser@ubuntu:~/psdk_rtos_auto_j7_07_00_00_11/mcusw/build$ sudo make -s can_profile_app BOARD=j721e_evm SOC=j721e BUILD_PROFILE=release CORE=mcu2_1 BUILD_OS_TYPE=tirtos
Nothing to be done for j721e i2c_indp
Nothing to be done for j721e i2c_profile
Nothing to be done for j721e i2c_profile_indp
Nothing to be done for j721e i2c_icss0
Nothing to be done for j721e mcu2_1 sbl_lib_mmcsd
Nothing to be done for j721e mcu2_1 sbl_lib_ospi
Nothing to be done for j721e mcu2_1 sbl_lib_uart
Nothing to be done for j721e mcu2_1 sbl_lib_hyperflash
Nothing to be done for j721e mcu2_1 sbl_lib_cust
Nothing to be done for j721e mcu2_1 sbl_lib_ospi_nondma
Nothing to be done for j721e fatfs_multi_indp
Nothing to be done for j721e fatfs_profile_indp
# Linking into /home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/binary/can_profile_app/bin/j721e_evm/can_profile_app_mcu2_1_release.xer5f...
#
<Linking>
error: symbol "Can_Init" redeclared with incompatible type:
"void(const Can_ConfigType *)"
in "src/Can.c" at line 191 and:
"void(const Can_ConfigType *)"
in
"/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcal_drv/mcal/Can/include/
Can.h" at line 653)
error: symbol "CanConfigSet" redeclared with incompatible type:
"const struct Can_ConfigType_s
CanControllerListoff: 0 (Can_ControllerType **)
CanMaxControllerCountoff: 32 (uint8)
MailBoxList off: 64 (Can_MailboxType **)
MaxMbCnt off: 96 (uint32)
MaxBaudConfigID off:128 (uint32[2])
DmaPrms off:192 (Can_DmaPrms *)"
in
"/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
n_Demo_Cfg/output/generated/soc/j721e/mcu1_0/include/Can_Cfg.h" at line 249
and:
"const struct Can_ConfigType_s
CanControllerListoff: 0 (Can_ControllerType **)
CanMaxControllerCountoff: 32 (uint8)
MailBoxList off: 64 (Can_MailboxType **)
MaxMbCnt off: 96 (uint32)
MaxBaudConfigID off:128 (uint32[16])
DmaPrms off:640 (Can_DmaPrms *)"
in
"/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
n_Demo_Cfg/output/generated/soc/j721e/mcu2_1/src/Can_Cfg.c" at line 543)
error: symbol "CanConfigSet_CanController_List_PC" redeclared with incompatible
type:
"const struct Can_ControllerStruct_PC
ControllerId off: 0 (uint8)
CntrActive off: 8 (boolean)
CntrAddr off: 32 (uint32)
RxProcessingTypeoff: 64 (Can_TxRxProcessingType)
TxProcessingTypeoff: 72 (Can_TxRxProcessingType)
BusOffProcessingInterruptoff: 80 (boolean)
CanControllerInstoff: 88 (Can_ControllerInstance)
CanFDModeEnabledoff: 96 (boolean)*[2]"
in
"/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
n_Demo_Cfg/output/generated/soc/j721e/mcu1_0/include/Can_Cfg.h" at line 261
and:
"const struct Can_ControllerStruct_PC
ControllerId off: 0 (uint8)
CntrActive off: 8 (boolean)
CntrAddr off: 32 (uint32)
RxProcessingTypeoff: 64 (Can_TxRxProcessingType)
TxProcessingTypeoff: 72 (Can_TxRxProcessingType)
BusOffProcessingInterruptoff: 80 (boolean)
CanControllerInstoff: 88 (Can_ControllerInstance)
CanFDModeEnabledoff: 96 (boolean)*[4]"
in
"/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
n_Demo_Cfg/output/generated/soc/j721e/mcu2_1/src/Can_Cfg.c" at line 301)
error: symbol "CanConfigSet_CanHardwareObject_List_PC" redeclared with
incompatible type:
"const struct Can_MailboxStruct_PC
CanObjectId off: 0 (uint16)*[7]"
in
"/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
n_Demo_Cfg/output/generated/soc/j721e/mcu1_0/include/Can_Cfg.h" at line 265
and:
"const struct Can_MailboxStruct_PC
CanObjectId off: 0 (uint16)*[8]"
in
"/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
n_Demo_Cfg/output/generated/soc/j721e/mcu2_1/src/Can_Cfg.c" at line 530)

>> Compilation failure

>> Compilation failure
fatal error: Failed linktime optimization

>> Compilation failure
/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/pdk_jacinto_07_00_00/packages/ti/build/makerules/rules_ti_cgt_arm.mk:311: recipe for target '/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/binary/can_profile_app/bin/j721e_evm/can_profile_app_mcu2_1_release.xer5f' failed
make[2]: *** [/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/binary/can_profile_app/bin/j721e_evm/can_profile_app_mcu2_1_release.xer5f] Error 1
/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/pdk_jacinto_07_00_00/packages/ti/build/makerules/common.mk:402: recipe for target 'mcu2_1' failed
make[1]: *** [mcu2_1] Error 2
makefile:154: recipe for target 'can_profile_app' failed
make: *** [can_profile_app] Error 2

Best Regards!

HJ

  • Hi HJ,

    One thing I see is that you do not have mono installed.

    Can you please run:

    sudo apt-get install mono-runtime

    After this can you check if you face any other error? Also, is this the baseline SDK without any modification?

    Regards,

    Karan

  • Hi Karan,

    It is the baseline SDK and I will try it again.Besides,I try it in another computer and one of the errors is still here.Can you help me solve it?

    vmuser@ubuntu:~/psdk_rtos_auto_j7_07_00_00_11/mcusw/build$ sudo make -s can_profile_app BOARD=j721e_evm SOC=j721e BUILD_PROFILE=release CORE=mcu2_1 BUILD_OS_TYPE=tirtos
    Nothing to be done for j721e i2c_indp
    Nothing to be done for j721e i2c_profile
    Nothing to be done for j721e i2c_profile_indp
    Nothing to be done for j721e i2c_icss0
    Nothing to be done for j721e mcu2_1 sbl_lib_mmcsd
    Nothing to be done for j721e mcu2_1 sbl_lib_ospi
    Nothing to be done for j721e mcu2_1 sbl_lib_uart
    Nothing to be done for j721e mcu2_1 sbl_lib_hyperflash
    Nothing to be done for j721e mcu2_1 sbl_lib_cust
    Nothing to be done for j721e mcu2_1 sbl_lib_ospi_nondma
    Nothing to be done for j721e fatfs_multi_indp
    Nothing to be done for j721e fatfs_profile_indp
    # Linking into /home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/binary/can_profile_app/bin/j721e_evm/can_profile_app_mcu2_1_release.xer5f...
    #
    <Linking>
    error: symbol "Can_Init" redeclared with incompatible type:
       "void(const Can_ConfigType *)"
       in "src/Can.c" at line 191 and:
       "void(const Can_ConfigType *)"
       in
       "/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcal_drv/mcal/Can/include/
       Can.h" at line 653)
    error: symbol "CanConfigSet" redeclared with incompatible type:
       "const struct Can_ConfigType_s
       CanControllerListoff:  0  (Can_ControllerType **)
       CanMaxControllerCountoff: 32  (uint8)
       MailBoxList     off: 64  (Can_MailboxType **)
       MaxMbCnt        off: 96  (uint32)
       MaxBaudConfigID off:128  (uint32[2])
       DmaPrms         off:192  (Can_DmaPrms *)"
       in
       "/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
       n_Demo_Cfg/output/generated/soc/j721e/mcu1_0/include/Can_Cfg.h" at line 249
       and:
       "const struct Can_ConfigType_s
       CanControllerListoff:  0  (Can_ControllerType **)
       CanMaxControllerCountoff: 32  (uint8)
       MailBoxList     off: 64  (Can_MailboxType **)
       MaxMbCnt        off: 96  (uint32)
       MaxBaudConfigID off:128  (uint32[16])
       DmaPrms         off:640  (Can_DmaPrms *)"
       in
       "/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
       n_Demo_Cfg/output/generated/soc/j721e/mcu2_1/src/Can_Cfg.c" at line 543)
    error: symbol "CanConfigSet_CanController_List_PC" redeclared with incompatible
       type:
       "const struct Can_ControllerStruct_PC
       ControllerId    off:  0  (uint8)
       CntrActive      off:  8  (boolean)
       CntrAddr        off: 32  (uint32)
       RxProcessingTypeoff: 64  (Can_TxRxProcessingType)
       TxProcessingTypeoff: 72  (Can_TxRxProcessingType)
       BusOffProcessingInterruptoff: 80  (boolean)
       CanControllerInstoff: 88  (Can_ControllerInstance)
       CanFDModeEnabledoff: 96  (boolean)*[2]"
       in
       "/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
       n_Demo_Cfg/output/generated/soc/j721e/mcu1_0/include/Can_Cfg.h" at line 261
       and:
       "const struct Can_ControllerStruct_PC
       ControllerId    off:  0  (uint8)
       CntrActive      off:  8  (boolean)
       CntrAddr        off: 32  (uint32)
       RxProcessingTypeoff: 64  (Can_TxRxProcessingType)
       TxProcessingTypeoff: 72  (Can_TxRxProcessingType)
       BusOffProcessingInterruptoff: 80  (boolean)
       CanControllerInstoff: 88  (Can_ControllerInstance)
       CanFDModeEnabledoff: 96  (boolean)*[4]"
       in
       "/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
       n_Demo_Cfg/output/generated/soc/j721e/mcu2_1/src/Can_Cfg.c" at line 301)
    error: symbol "CanConfigSet_CanHardwareObject_List_PC" redeclared with
       incompatible type:
       "const struct Can_MailboxStruct_PC
       CanObjectId     off:  0  (uint16)*[7]"
       in
       "/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
       n_Demo_Cfg/output/generated/soc/j721e/mcu1_0/include/Can_Cfg.h" at line 265
       and:
       "const struct Can_MailboxStruct_PC
       CanObjectId     off:  0  (uint16)*[8]"
       in
       "/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/mcuss_demos/mcal_config/Ca
       n_Demo_Cfg/output/generated/soc/j721e/mcu2_1/src/Can_Cfg.c" at line 530)

    >> Compilation failure

    >> Compilation failure
    fatal error: Failed linktime optimization

    >> Compilation failure
    /home/vmuser/psdk_rtos_auto_j7_07_00_00_11/pdk_jacinto_07_00_00/packages/ti/build/makerules/rules_ti_cgt_arm.mk:311: recipe for target '/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/binary/can_profile_app/bin/j721e_evm/can_profile_app_mcu2_1_release.xer5f' failed
    make[2]: *** [/home/vmuser/psdk_rtos_auto_j7_07_00_00_11/mcusw/binary/can_profile_app/bin/j721e_evm/can_profile_app_mcu2_1_release.xer5f] Error 1
    /home/vmuser/psdk_rtos_auto_j7_07_00_00_11/pdk_jacinto_07_00_00/packages/ti/build/makerules/common.mk:402: recipe for target 'mcu2_1' failed
    make[1]: *** [mcu2_1] Error 2
    makefile:154: recipe for target 'can_profile_app' failed
    make: *** [can_profile_app] Error 2

    Best Regards!

    HJ

  • Hi HJ,

    I think I know the problem now.

    You might have built CAN for mcu1_0 first and then without cleaning might have triggered a build for mcu2_1. I think this detail doesn't get addressed in the user guide so easy to miss.

    Please try the following:

    # this step will be needed when you recompile for a different core (in different domain like MAIN to MCU or vice-versa)
    make can_clean
    
    make can_profile_app BOARD=j721e_evm SOC=j721e BUILD_PROFILE=release BUILD_OS_TYPE=tirtos CORE=mcu2_1 -sj

    Safe to say is when you once build for mcu1_0 then next time if you want to build for mcu2_1 then you need to do a can_clean. This will recompile the CAN driver the next time. This is needed as the CAN driver has different configurations for MAIN and MCU domains - reason being there are different number of CAN instances in MAIN (14) and MCU(2).

    Regards,

    Karan