1) Some run time library functions in CCES such as sprintf() and memcpy() fail with exception EXCAUSE=0x24 when run from any process except the one with highest priority. The problem is that these functions sometimes use DAG Index registers as a general purpose pointer (e.g. R0 = [I0++]). If the corresponding L and B registers are not zeroed out then the DAG generates very strange addresses in example above.
Problem is in os_target.cpp. If debug is set, STACK_FRAME_SIZE is calculated incorrectly, so the area used for storing these registers during a context switch is initialised to the STACK_DEFAULT_PATTERN. Thus the L and B registers get loaded with STACK_DEFAULT_PATTERN on the first context switch, which causes the exception. If debug is not set then these register could also potentially be loaded with random data. Please see attached for my fix.
2) In the examples using a timer, the code in main() to enable timer interupt should be
SetupGPTimer(0,TimerMemory,TimerHandler,&hTimer,3125,78); adi_sec_SetCoreID(INTR_TIMER0_TMR0, ADI_SEC_CORE_0); *pTCNTL = 0x7;
adi_tmr_EnableDataInt(hTimer,true);
rather than
adi_tmr_EnableDataInt(&hTimer,true);
Both compile OK in CCES but former doesn't work!
Otherwise fantastic piece of software for BF609
Hope that helps
Peter
Hi Peter!
Thanks a lot for your issue! However, there are two points:
scmRTOS project has migrated to another hosting (https://github.com/scmrtos) about 1.5 years ago, and actual version is v5.1.0. sourceforge.net contains the old version.
Our team has no member to fix issues in Blackfin/CCES port for now. The only ADI/GNU toolchain Blackfin port is supported by myself.
Therefore my suggestion: we would be very grateful if you would take the current version (from github.com) and made changes to the Blackfin/CCES port. Further, your can create pull request (https://github.com/scmrtos/scmrtos/pulls) or I can apply patch from you.
Best regards,
Harry.
Last edit: Harry Zhurov 2017-08-14