I'm debugging legacy C6412 code that predominantly uses SWI's. 99% of the calls are SWI_post(), and there are a few SWI_or() calls. The version of RTOS is bios_5_31_02.
I'm changing a few SWI_post() calls to use SWI_inc() instead, and reading the mailbox (SWI_getmbox) inside the SWI object function to determine how many SWI interrupts are occurring. I'm making this change since I suspect that there is more than one SWI interrupt occurring when the problem occurs.
However, I can compile and link, and download onto target. The DSP loads and starts executing, but my application basically stops responding when it hits the first SWI_inc() call.
Note there is no issues if I use SWI_post() and SWI_getmbox in the SWI_object function - even though SWI_getmbox is of no use since SWI_post() doesnt modify the mbox. This is just extra info.
I have read and re-read the C6000 DSP/BIOS guides.
Is there anything subtle that I need to do to use SWI_inc() instead of SWI_post() ??
Could there be any issue because with SWI_inc we are treating the mailbox as a counter as opposed to a bit map (SWI_or) or not at all (SWI_post)?
Is there anything else I need to initialise before using SWI_inc, maybe in the tcf file?
Anything that needs initialised since I am using the mbox as a counter with SWI_inc()?
Just looking for ideas....