Hello,
A question with OMAP L138 Starterware:
In the graphic library I am trying to use mutex functions
unsigned int WidgetMutexGet(unsigned char *pcMutex)
different versions of this functions are defined in widget.c and the compiling time resolution depends on precompiled symbols:
#if defined(ewarm) || defined(DOXYGEN)
#elif defined(codered) || defined(gcc) || defined(sourcerygxx)
#elif defined(rvmdk) || defined(__ARMCC_VERSION)
#elif defined(ccs)
#elif defined (__TMS470__)
#elif defined (_TMS320C6X)
#elif defined (__IAR_SYSTEMS_ICC__)
#else
#endif
After importing the project I found that none of the symbols have actually been defined, and therefore the preprocessor resolves to the last “default” version which corresponds to no particular symbol being defined, and defines the function:
#else
unsigned int __attribute__((naked)) WidgetMutexGet(unsigned char *pcMutex)
{
// Acquire the mutex if possible.
__asm(" mov r1, #1\n"
" swpb r1, r1, [r0]\n"
" mov r0, r1\n"
" bx lr\n");
// The following keeps the TI compiler from optimizing away the code.
return((unsigned int)(*pcMutex));
}
#endif
Things like __attribute__ are GNU specifics and I am actually using TI’s v 4.9.4 ARM compiler to build a library for the ARM core of OMAP L138.
So it seems that the version chosen by “default” when there is no pertaining predefined symbol, might be incorrect. Could anyone advise me of the correct version to be chosen?
Paul