This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I'm developing for AM335x using the Processor SDK RTOS AM335x 2.00.00.00 which contains BIO 6.42.02.29.
My task is to port Lua (lua.org) into my CCSv6 project so that I can make use of the Lua interpreter in my embedded application. However the Lua library uses standard C calls such as fprintf, fopen, etc. Under SYS/BIOS RTOS ecosystem what is the best way to port these calls to my hardware (UART and MMCSD specifically)? I see 2 general paths forward:
1. Remove Lua's C standard library dependencies and replace with my own implementations.
2. Provide implementations to the low level glue functions of the C standard library (_read, _write, etc.).
I would prefer option 2 but I don't see how to do this in SYS/BIOS? SYS/BIOS documentation mentions the SysStd module but this seems to be a wrapper around the C standard library which is the opposite of what I would need.
Hi Janet
Unfortunately, I'm using the GCC(Linaro 4.8.4) compiler. I noticed that there is a runtime support library option called 'libnosys.a', however I do not see any documentation on it. In fact I can't find much documentation on any of the runtime support libraries provided in the drop down box in CCSv6 project properties. My vague understanding is that libc.a is actually newlib and the file functions (fopen, fread, etc) actually operate on the host filesystem over JTAG? or is that just librdimon.a? And then there is the *_s.a versions of each library. So many questions and I'm willing to read any relevant documentation if I could just find it!
Kind regards,
Brian
Hi Brian,
Unfortunately we don't have an easy solution for GCC. It looks like you'll have to implement the _read, _write, etc. functions.
Best regards,
Janet
BrianBrianBrian said:Just to verify: malloc and free are the only standard c library calls that are implemented by SYS/BIOS then?
TI-RTOS kernel (SYS/BIOS) provides its own implementation of malloc, memalign, calloc, free and realloc libc functions. If you use the Seconds module, then we also provide our own implementation of time() function.
Best,
Ashish