Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT


TMS570 port patch for non preemtive scheduler

Posted by Emanuel Bringas on May 9, 2013
Hi, I want to use FreeRTOS in a Hercules TMS570 with CCSv5, and I used this port -> http://www.freertos.org/Free_RTOS_for_TI_RM48_and_TMS570.html

When I configured the FreeRTOS scheduler as non-preemptive I got compilation and semantic errors. My fix of these errors is attached.

Please, let me know if my changes are correct.

Thanks in advance!

diff -Naur CORTEX_R4_RM48_TMS570_CCS5-original/FreeRTOS/portable/CCS/ARM_Cortex-R4/port.c CORTEX_R4_RM48_TMS570_CCS5/FreeRTOS/portable/CCS/ARM_Cortex-R4/port.c
--- CORTEX_R4_RM48_TMS570_CCS5-original/FreeRTOS/portable/CCS/ARM_Cortex-R4/port.c2013-04-30 22:04:48.000000000 -0300are
+++ CORTEX_R4_RM48_TMS570_CCS5/FreeRTOS/portable/CCS/ARM_Cortex-R4/port.c2013-05-09 16:23:15.285074598 -0300
@@ -279,7 +279,8 @@
__interrupt void vPortNonPreemptiveTick( void )
/* clear clock interrupt flag */
-RTI->INTFLAG = 0x00000001;
+portRTI_INTFLAG_REG = 0x00000001;

/* Increment the tick count - this may make a delaying task ready
to run - but a context switch is not performed. */
diff -Naur CORTEX_R4_RM48_TMS570_CCS5-original/FreeRTOSConfig.h CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h
--- CORTEX_R4_RM48_TMS570_CCS5-original/FreeRTOSConfig.h2013-05-07 11:11:00.000000000 -0300
+++ CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h2013-05-09 16:22:54.238407769 -0300
@@ -95,7 +95,7 @@
* See http://www.freertos.org/a00110.html.

-#define configUSE_PREEMPTION1
+#define configUSE_PREEMPTION0
#define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 1
diff -Naur CORTEX_R4_RM48_TMS570_CCS5-original/startup/sys_startup.c CORTEX_R4_RM48_TMS570_CCS5/startup/sys_startup.c
--- CORTEX_R4_RM48_TMS570_CCS5-original/startup/sys_startup.c2012-10-18 15:37:00.000000000 -0300
+++ CORTEX_R4_RM48_TMS570_CCS5/startup/sys_startup.c2013-05-09 16:23:01.068407822 -0300
@@ -43,7 +43,11 @@
+#if configUSE_PREEMPTION == 1
vPortPreemptiveTick,/* RTI */
+ vPortNonPreemptiveTick,

RE: TMS570 port patch for non preemtive scheduler

Posted by Richard on May 10, 2013
Thanks for taking the time to point this out, I can confirm your finding and have added it to the known issues list. I have tested this compiles but not that it runs so please let me know if more than just this one line change is required.


RE: TMS570 port patch for non preemtive scheduler

Posted by Emanuel Bringas on May 10, 2013
Thanks Richard,

please note that the fix includes also a change in the interrupts vector (it seems you forgot to mention it in the known issues list), which is the last in the patch.
FWIW, it runs for me.

BTW, do you know who did this port, so I can check with him/her about this fix? The author is not named in the files.


RE: TMS570 port patch for non preemtive scheduler

Posted by Richard on May 10, 2013
I updated the known issue to include a note about replacing the installed vector too.

“do you know who did this port”



[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS