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.

Migration DSP/BIOS to SYS/BIOS: problem linking NDK package

Other Parts Discussed in Thread: SYSBIOS

I am migrating a DSP/BIOS project to legacy SYS/BIOS for C6746 DSP

I follow the migration guide spraas7h steps.

I have converted the original tcf configuration file to cfg, I rebuilt the source code with legacy SYS/BIOS and have problem linking the NDK libraries the final object file.

The original DSP/BIOS project used these tools:

DSP/BIOS 05.41.04.18, CGT 06.1.22

For the legacy SYS/BIOS project I use the converted cfg file and:

CGT 7.4.8, bios_6_34_05_24, xdctools_3_24_07_73.

For the legacy project, I use the ndk_2_20_06_35 package.

For the final linking I need

/ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os.lib and

/ndk_2_20_06_35/packages/ti/ndk/lib/C64plus//hal/hal_timer_bios.lib

The case is this:

If I use os_bios5.lib and hal_timer_bios5.lib (BIOS 5 libs) I get the errors:

 undefined                                 first referenced
  symbol                                       in file
 ---------                                 ----------------

_C62_enableIER     /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<intmgmt.o64P>
_CLK_getltime          /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/hal/hal_timer_bios5.lib<lltimer.o64P>
_ECM_disableEvent /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<intmgmt.o64P>
_ECM_dispatchPlug /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<intmgmt.o64P>
_ECM_enableEvent  /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<intmgmt.o64P>
 _HOOK_getenv      /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<task.o64P>
 _HOOK_setenv      /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<task.o64P>
 _HWI_eventMap     /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<intmgmt.o64P>
 _KNL_curtask      /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<task.o64P>
 _SEM_delete       /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<semaphore.o64P>
 _SEM_pend         /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<task.o64P>
 _SEM_post         /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<task.o64P>
 _TSK_exit         /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<task.o64P>
 _TSK_setpri      /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<task.o64P>
 _TSK_timerSem     /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<task.o64P>
 _TSK_yield        /ndk_2_20_06_35/packages/ti/ndk/lib/C64plus/os_bios5.lib<task.o64P>

If I use If I use os.lib and hal_timer_bios.lib (BIOS 6 libs) I get the errors:

 undefined                                 first referenced
  symbol                                       in file
 ---------                                 ----------------
 _ti_sysbios_hal_Cache_CacheProxy_wait__E  \bios_6_34_05_24\packages\ti\sysbios\lib\sysbios\instrumented\sysbios.a674<BIOS.obj>
 _ti_sysbios_hal_Cache_CacheProxy_wbInv__E \bios_6_34_05_24\packages\ti\sysbios\lib\sysbios\instrumented\sysbios.a674<BIOS.obj>

What are the right libs to use for building for legacy SYS/BIOS?

  • Can you try using the BIOS 6 libs and add the following into the .cfg file?

    var Cache = xdc.useModule('ti.sysbios.hal.Cache');

    Note: I'm assuming you are not using the .cfg to set up the NDK. If you did, it would have automatically done this for you.

    Todd

  • Hi,
    thank you for your feedback.
    Indeed, this seems to solve the discussed problem.
    I have some questions though:
    Using the BIOS6 libs, shouldn't I modify the #include defines and API calls from bios5 to bios6 inside my code?
    Also, other ndk libraries from v2.20.06.35 like miniPrintf.lib seem to be common both for bios5 and bios6, should I handle them also like bios6 libraries? E.g. should I change the API calls to bios6 also for them?
    Just to understand, with this solution, no legacy BIOS functionality is used for NDK but Bios6 APIs while the other project hopefully will have legacy BIOS support (BIOS5 APIs).
    Do I understand this right?
  • You can leave your calls to BIOS5 as is since the legacy header files convert them to BIOS6.  You should use the BIOS6 libs in the NDK.

    Todd