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.

RTOS/AM5728: undefined reference to 'ti_sysbios_family_arm_a15_cache_xxxx_E' when enabling smp

Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hi

I want to enable smp in my project ‘vps_loopbackExample_evmAM572x_armExampleProject’, but some building errors occurred after i modified some codes in main.cfg.

codes about smp in my cfg:

var BIOS    = xdc.useModule('ti.sysbios.BIOS');
BIOS.smpEnabled = true;
var Core = xdc.useModule('ti.sysbios.family.arm.a15.smp.Core');
Core.useSkernelCmd = false; /* Set to false if running in CCS and using gel files to wake-up secondary cores */
Core.numCores = 2;
var Cache = xdc.useModule('ti.sysbios.family.arm.a15.smp.Cache');

I also added 'BSP_OSAL_SMP_MODE_ENABLE' in my project

ccs building errors:

C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\vps\lib\am572x\a15\release\vps_osal_tirtos.aa15fg(bsp_osal.oa15fg): In function `BspOsal_cacheInv':
C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\vps\src\osal\tirtos/bsp_osal.c:1106: undefined reference to `ti_sysbios_family_arm_a15_Cache_inv__E'
C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\vps\lib\am572x\a15\release\vps_osal_tirtos.aa15fg(bsp_osal.oa15fg): In function `BspOsal_cacheWbInv':
C:\ti\pdk_am57xx_1_0_11\packages\ti\drv\vps\src\osal\tirtos/bsp_osal.c:1171: undefined reference to `ti_sysbios_family_arm_a15_Cache_wbInv__E'
C:\ti\edma3_lld_2_12_05_30C\packages\ti\sdo\edma3\drv\sample\lib\tda2xx-evm\a15\release\edma3_lld_drv_sample.aa15fg(sample_arm_cs.oa15fg): In function `Edma3_CacheInvalidate':
/oe/bld/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/edma3-lld-rtos/2.12.05.30C-r0.1.tisdk-int12/git/packages/ti/sdo/edma3/drv/sample/src/sample_arm_cs.c:255: undefined reference to `ti_sysbios_family_arm_a15_Cache_inv__E'
C:\ti\edma3_lld_2_12_05_30C\packages\ti\sdo\edma3\drv\sample\lib\tda2xx-evm\a15\release\edma3_lld_drv_sample.aa15fg(sample_arm_cs.oa15fg): In function `Edma3_CacheFlush':
/oe/bld/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/edma3-lld-rtos/2.12.05.30C-r0.1.tisdk-int12/git/packages/ti/sdo/edma3/drv/sample/src/sample_arm_cs.c:296: undefined reference to `ti_sysbios_family_arm_a15_Cache_wb__E'
C:\ti\pdk_am57xx_1_0_11\packages\ti\osal\lib\tirtos\am572x\a15\release\ti.osal.aa15fg(CacheP_tirtos.oa15fg): In function `CacheP_wbInv':
/oe/bld/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/osal-rtos/01.00.00.11-r0.0/build/ti/osal/src/tirtos/CacheP_tirtos.c:62: undefined reference to `ti_sysbios_family_arm_a15_Cache_wbInv__E'
C:\ti\pdk_am57xx_1_0_11\packages\ti\osal\lib\tirtos\am572x\a15\release\ti.osal.aa15fg(CacheP_tirtos.oa15fg): In function `CacheP_Inv':
/oe/bld/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/osal-rtos/01.00.00.11-r0.0/build/ti/osal/src/tirtos/CacheP_tirtos.c:67: undefined reference to `ti_sysbios_family_arm_a15_Cache_inv__E'

is something missed in my .cfg or project?  

  • Thanks for posting your question.
    Our response may be delayed due the holidays.
  • Do you have the following in the .cfg file:
    /* Load the OSAL package */
    var osType = "tirtos"
    var Osal = xdc.useModule('ti.osal.Settings');
    Osal.osType = osType;

    Best Regards,
    Yordan
  • Thank you for reply in holidays.

    Actually, i enabled smp mode in 'bspCommonBIOS_a15.cfg' of the project 'vps_loopbackExample_evmAM572x_armExampleProject' under C:\ti\pdk_am57xx_1_0_12\packages\MyExampleProjects, the osal lib is loaded in the bspCommonBIOS_a15.cfg as you wrote. but i think the problem is that smp has not been enabled in the osal and edma3 lib when build.

    look at these building log, errors locate in three aa15fg:

    1.vps_osal_tirtos.aa15fg(bsp_osal.oa15fg):

    2.edma3_lld_drv_sample.aa15fg(sample_arm_cs.oa15fg):

    3.ti.osal.aa15fg(CacheP_tirtos.oa15fg): 

    For the lib vps_osal_tirtos.aa15fg(bsp_osal.oa15fg), i found a makefile under 'C:\ti\pdk_am57xx_1_0_12\packages\ti\drv\vps\src\osal\tirtos\smp', so i build it then get vps_osal_tirtos_smp.aa15fg under '\packages\ti\drv\vps\lib\am572x\a15\release'. I replaced the 'vps_osal_tirtos.aa15fg' with 'vps_osal_tirtos_smp.aa15fg' in my project and the first 2 link errors were solved.

    So I think the problem is the same for other link errors. but the problem is that i can't find any makefile which can enable smp mode like 'packages\ti\drv\vps\src\osal\tirtos\smp' for edma3_lld_drv_sample.aa15fg and ti.osal.aa15fg(CacheP_tirtos.oa15fg), Could some ti expert supply the smp version makefile for edma3 and osal for me to build edma3_lld_drv_sample_smp.aa15fg and ti.osal_smp.aa15fg like vps_osal_tirtos_smp.aa15fg?

  • smp version of osal and edma3 lib is needed.
  • Hi,

    Take a look at the following thread:
    e2e.ti.com/.../739555

    Best Regards,
    Yordan
  • Hi
    Thank you for reply. but my problem is a little different with the case in your link. My building error occurred when enabling smp in vps_lookback project, and i analyzed these errors as above. I think you team should supply the smp version makefile for edma3 and osal for me to build edma3_lld_drv_sample_smp.aa15fg and ti.osal_smp.aa15fg like vps_osal_tirtos_smp.aa15fg.
  • Shreek,

    I can reproduce your build error when change this project into SMP. There is no SMP makefile for edma3_lld_drv_sample_smp.aa15fg and ti.osal_smp.aa15fg with SMP. Let me check how those cache functions can't be found in the linking stage.

    Regards, Eric
  • Hi,

    From the failure log, the application linked with several libraries. Some of the libraries source code contains the cache operation, e.g.
    - bsp_osal.c, line 1106, it has Cache_inv()
    - sample_arm_cs.c, line 255, it has Cache_inv().

    Those two files include a header file called #include <ti/sysbios/family/arm/a15/Cache.h>. Those libraries are not pre-built with SMP support. I think they have to be rebuild with SMP support, that is in the source code change the include header to:
    #include <ti/sysbios/family/arm/a15/smp/Cache.h> and rebuild the libraries.

    Unfortunately there is no such makefile for this. You may change the header and rebuilds the libraries.

    Regards, Eric
  • Thanks. It seems that rebuilding the library by replacing #include <ti/sysbios/family/arm/a15/Cache.h> with #include <ti/sysbios/family/arm/a15/smp/Cache.h> in some source files is the only way. I 'll try. But it will be so complicated if the another project is using the smp-disabled librarys.
  • Now the question is how to build edma3 after adding '#include <ti/sysbios/family/arm/a15/smp/Cache.h> ' in sample_cs.c under 'C:\ti\edma3_lld_2_12_05_30C\packages\ti\sdo\edma3\drv\sample\src'.
  • Shreek,

    Please check the user guide under edma3_lld_2_12_05_30C\packages\ti\sdo\edma3\drv\docs. Section 2.4. This will create different libraries with cache or smp cache, and your application need to manage which library to link with.

    An easier way I tried,
    - add edma3_lld_2_12_05_30C\packages\ti\sdo\edma3\drv\sample\src\sample_arm_cs.c to your CCS project, add a line:
    #include <ti/sysbios/family/arm/a15/smp/Cache.h> in this source code
    - add pdk_am57xx_1_0_xx\packages\ti\drv\vps\src\osal\tirtos\bsp_osal.c to your CCS project, add "BSP_OSAL_SMP_MODE_ENABLE" to Defined Symbols to make sure it uses:
    #include <ti/sysbios/family/arm/a15/smp/Cache.h>

    I can build the CCS project successfully without re-building those libraries. Hope this help!

    Regards, Eric
  • Hi 

    Finally. I gave up rebuilding some modules because of lack of guide. And I added  these source files to my project and it really works. Thank you again.