Tool/software: TI-RTOS
Good morning,
I recently tried adding GateMutexPri's to a project to control access to a resources such as the file system, UART's, Ethernet etc and what I have done seems to work well on first inspection but when left for prolonged periods of time it goes into _exit(int) and I get the red text below in the window
"Can't find a source file at "/db/ztree/library/trees/xdctargets/xdctargets-j04/src/gnu/targets/arm/rtsv7A/syscalls.c"
Locate the file or edit the source lookup path to include its location."
The ROV does not report an exception as is usually the case with this kind of reaction. I am using XDCtools ver 3.31.0.24_core, SYS/BIOS ver 6.42.3.35, compiler GNU v4.8.4 (Linaro) and finally CCS ver 6.1.1.00022.
Below is the code I am using to setup the GateMutexPri along with a semaphore version which does work absolutely fine as far as i can tell.
//#define USE_GATE_MUTEX_PRI #ifdef USE_GATE_MUTEX_PRI IArg gate_key = 0; GateMutexPri_Handle gate = NULL; #else static Semaphore_Handle sem = NULL; #endif int32_t OxTS_fs_init(void) { #ifdef USE_GATE_MUTEX_PRI gate = SetupGateMutex(); #else sem = SetupSem(SEM_MODE_COUNTING); FreeResource(); #endif return 0; } static void ClaimResource(void) { #ifdef USE_GATE_MUTEX_PRI gate_key = GateMutexPri_enter(gate); #else Semaphore_pend(sem, BIOS_WAIT_FOREVER); #endif return; } static void FreeResource(void) { if(dont_offer_resource == 0) { #ifdef USE_GATE_MUTEX_PRI GateMutexPri_leave(gate, gate_key); #else Semaphore_post(sem); #endif } return; }
The code is pretty simple so i am struggling to see what I could have done wrong or what i can try differently, all i have tried is having the key as a local instead of global and it made no difference.
Any help or ideas gratefully revived.
Thanks
Sean