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.

AM263P4: Threadx RTOS integration

Part Number: AM263P4

Tool/software:

We see that TI is now an eclipse threadx member.

We have used ThreadX before, and are happy to see if TI is moving this direction.  We do not need specifically any stacks that come with threadx (ethernet, or filesystem) currently, just the RTOS functionality to start.  We used ThreadX's trace buffer capability often to help when debugging a multithreaded system and would like to continue to use that functionality if possible as well.  ThreadX is also an open-source community project which allows us as members to receive functional safety documentation and integration documentation which is a huge plus and aligns with TI's functional safety strategy (as opposed to other RTOS).  

When we tried to port over ourselves, we ran into the following issues

  • In ThreadX's source code there is a cortex r5 port that seems incomplete.  The tx_initialize_low_level.s does not build with the tiarmasm.exe but this .s file seems to be a in a different assembly format than the rest of the .s files in the r5 port.
  • The R5 also does not have a SysTick peripheral which is what threadx uses for its context switching in cortex m series.  The am243x mcu-plus-sdk includes an example hello_world project with ThreadX but this seems to be a port for an A core?
  • Finally, the R5 does not handle interrupts in the same way the cortex m series does so ThreadX's register stacking and etc. might need to change for the cortex r5.

 is there a timeline or capability support to port this over to the R5 cores?

 

As an aside.

There seems to be some Porting for FreeRTOS, but quite limited implementation actually, and less ideal for functional safety for us.

In my exploration of the FreeRTOS implementation in the am263px mcu plus I found that the trace macros have been defined to be empty.  

Where in the freeRtos.h header many of the trace macros have been defined as nothing.  I tried to get freeRTOS plus trace running to be able to use this in our project but was unsuccessful.  This can probably be done pretty straight forwardly by porting the freeRTOS plus trace source to the cortex R5 which includes setting up a 1us running counter and giving access to the register from the trace portion of freeRTOS.  If there is a way to do this or has been done before I would like to know to implement this if we continue to use freeRTOS.