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.

Sys/Bios replacement for Dsp/Bios freeSem?

Other Parts Discussed in Thread: SYSBIOS

Hello,

We are migrating an existing project from Dsp/Bios to Sys/Bios.  We are to the point of compiling the project with all legacy function calls.  One error we are getting is the usage of freeSem from Dsp/Bios.  I can't seem to locate the replacement in Sys/Bios.

More details...

We have the existing code:

if (theMbx->mbx->freeSem.count <= 1)

Which we are using to detect the mbx is getting full.

freeSem was part of the MBX_Obj in bios_5_42_01_09, but is not found in bios_6_41_00_26.  I do find something similar in Mailbox.h from bios_6_41_00_26 named Mailbox_getNumFreeMsgs() but it is not defined due to the definition of ti_sysbios_knl_Mailbox__nolocalnames in mbx.h. 

I thought of two solutions, both require a modification to mbx.h, which I don't want to do as that will be a maintenance issue moving forward.


So, I guess I am missing something fundamental here.  Perhaps a different way to accomplish the same functionality, detecting the mailbox is almost full.

 

  • Hi,

    Just wanted to let you know that future support for the legacy interface will be dropped.  The legacy support was meant to get people from BIOS 5.x to BIOS 6.x quickly however, its more of a stepping stone and moving forward the code should be moved to the SYSBIOS 6.x APIs.

    If you include the "Mailbox.h" you can use the long name APIs.  So something like "ti_sysbios_knl_Mailbox_getNumFreeMsgs()".

    Judah

  • We intend to fully migrate to the new Sys/Bios over time, just wanted to take this first step of converting the project. I assume those long name APIs are not what TI intended people to use. Is there some condition under which the shorter name API's will be available to my code, like Mailbox_getNumFreeMsgs? I guess I don't really understand what I have done in my code or project setup that makes those short name API's hidden.
  • I ultimately figured out that by including a header from the legacy bios_*.*.*.*/packages/ti/bios directory it was setting "#define ti_sysbios_knl_Semaphore__nolocalnames" which defines out the short names from the Sys/Bios library. So, using legacy means you have to use the long names for the new stuff. Ouch. We've now moved to the new Sys/Bios so this is no longer an issue.