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.
Tool/software:
Reading through the document for TI-RTOS kernel, the user guide, I decided to implement of the example because it demonstrates how the different thread types work and how we can implement them in a standard way.
Particularly, on the page 101 of the TI-RTOS kernel user guid document, section 3.8 we have an example that begins as:
#include <xdc/std.h> #include <xdc/runtime/System.h> #include <xdc/runtime/Error.h> #include <ti/sysbios/BIOS.h> #include <ti/sysbios/hal/Timer.h> #include <ti/sysbios/knl/Semaphore.h> #include <ti/sysbios/knl/Swi.h> #include <ti/sysbios/knl/Task.h> #include <ti/sysbios/knl/Queue.h> #include <xdc/cfg/global.h>
fatal error: 'xdc/cfg/global.h' file not found
var Defaults = xdc.useModule('xdc.runtime.Defaults'); var Diags = xdc.useModule('xdc.runtime.Diags'); var Error = xdc.useModule('xdc.runtime.Error'); var Log = xdc.useModule('xdc.runtime.Log'); var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf'); var Main = xdc.useModule('xdc.runtime.Main'); var Memory = xdc.useModule('xdc.runtime.Memory') var SysMin = xdc.useModule('xdc.runtime.SysMin'); var System = xdc.useModule('xdc.runtime.System'); var Text = xdc.useModule('xdc.runtime.Text'); var Timer = xdc.useModule('ti.sysbios.hal.Timer'); var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem'); Program.argSize = 0x0; System.maxAtexitHandlers = 4; BIOS.heapSize = 0x2000; /* System stack size (used by ISRs and Swis) */ Program.stack = 0x1000; /* Circular buffer size for System_printf() */ SysMin.bufSize = 0x400;
Hi Omid,
This document is quite helpful in understanding TI-RTOS, but to begin development, I would suggest you instead to start with the "empty" example: https://dev.ti.com/tirex/explore/node?node=A__APALJVbDifPTzAjspzfa1A__com.ti.SIMPLELINK_CC13XX_CC26XX_SDK__BSEc4rl__LATEST.
From there, you can make use of our Driver Porting Layer (DPL), which will also you to switch between FreeRTOS, NoRTOS and TI-RTOS: https://dev.ti.com/tirex/explore/node?node=A__AD0ghBnDPMQSci35.HFlFA__com.ti.SIMPLELINK_CC13XX_CC26XX_SDK__BSEc4rl__LATEST
To get started with the threading mechanism, please have a look at TaskP.h: https://dev.ti.com/tirex/explore/content/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/docs/drivers/doxygen/html/_task_p_8h.html
Regards,
Arthur
Hello Arthur,
Thanks for the reply.
My goal is to implement the example given in the TI-RTOS kernel.
Could you please tell me also about the .cfg file? How create and edit that?
I already created the empty example from the TI-RTOS example directory, but that example does not have any .cfg file.
Also, I want to learn how to do the RTOS configuration with the configuration script and I do not want to use the p_thread and posix.
Thanks
Hi Omid,
Then I would suggest you to start from the empty_LP_CC1352P7_1_tirtos7_ticlang example. From there, you can use the DPL APIs I mentioned earlier.
You will find that the APIs are very similar to the ones used in the TI-RTOS document. If need be, I can also provide some examples.
The .cfg file was used before the advent of SysConfig, which is the tool that is now used to configure your application. TI-RTOS, for instance, is configurable under the following SysConfig menu.
As of pthread and posix, you can avoid using them by using our TaskP.h API. I am still available if you need more details.
Regards,
Arthur
I see, thanks for the clarification.
I will create an example for this to implement what you recommended, but I have the following follow-up question.
Do you happen to know why the complier cannot find the 'xdc/cfg/global.h' ? Is it because some parameters on sysconfig must be set or that library has been removed or moved around and no longer is needed.
Thanks.
Hi Omid,
It has indeed been removed so this is to be expected.
Regards,
Arthur