Part Number: TM4C129XNCZAD
Tool/software: TI C/C++ Compiler
In a related post, I inquired how to use the TI Run Time Library in a multi-threaded environment. I learned that I could use the _register_lock() and _register_unlock() functions to register custom functions to be used by the RTL for locking and unlocking critical sections. I was able to use those functions to get my custom functions registered. The custom lock function pends on an RTOS mutex, and the custom unlock function posts to the mutex.
However, it appears that the RTL has nested calls to the lock() function, which is causing my system to hang up. The printf() function invokes __TI_file_lock() (which in turn calls my custom lock function), and then invokes fputc(), which also invokes __TI_file_lock(). That second call to __TI_file_lock() can never succeed, since the mutex has already been taken higher up in the call stack.
Any ideas how I can make this work?
Regards,
Dave