]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/commitdiff
[PDK-9369] OSAL: FreeRTOS Support for J721E/J7VCL/AM65xx R5F cores
authorDon Dominic <a0486429@ti.com>
Tue, 23 Mar 2021 06:19:01 +0000 (11:49 +0530)
committerSujith Shivalingappa <sujith.s@ti.com>
Thu, 8 Apr 2021 06:20:44 +0000 (01:20 -0500)
- Verified OSAL FreeRTOS UT on all R5F cores in j721e/j7200/am65xx

Signed-off-by: Don Dominic <a0486429@ti.com>
packages/ti/osal/osal_component.mk
packages/ti/osal/test/src/main_osal_test.c

index 60a980658e8c3608396f7f8de117795f9fcf4d5a..99a84d60bb554bac9969249ea413031482572334 100644 (file)
@@ -288,6 +288,7 @@ OSAL_Baremetal_TestApp_SBL_APPIMAGEGEN = no
 endif
 export OSAL_Baremetal_TestApp_SBL_APPIMAGEGEN
 
+# OSAL FreeRTOS unit test app
 OSAL_freertos_TestApp_COMP_LIST = OSAL_freertos_TestApp
 OSAL_freertos_TestApp_RELPATH = ti/osal/test/freertos
 OSAL_freertos_TestApp_PATH = $(PDK_OSAL_COMP_PATH)/test/freertos
@@ -298,7 +299,7 @@ export OSAL_freertos_TestApp_BOARD_DEPENDENCY
 export OSAL_freertos_TestApp_CORE_DEPENDENCY
 OSAL_freertos_TestApp_PKG_LIST = OSAL_freertos_TestApp
 OSAL_freertos_TestApp_INCLUDE = $(OSAL_freertos_TestApp_PATH)
-OSAL_freertos_TestApp_BOARDLIST = tpr12_evm
+OSAL_freertos_TestApp_BOARDLIST = $(libosal_freertos_BOARDLIST)
 export OSAL_freertos_TestApp_BOARDLIST
 OSAL_freertos_TestApp_SBL_APPIMAGEGEN = yes
 export OSAL_freertos_TestApp_SBL_APPIMAGEGEN
@@ -400,16 +401,19 @@ endif
 ifeq ($(SOC),$(filter $(SOC), am65xx))
  OSAL_TestApp_$(SOC)_CORELIST = mpu1_0 mcu1_0
  OSAL_Baremetal_TestApp_$(SOC)_CORELIST = mpu1_0 mcu1_0
+ OSAL_freertos_TestApp_$(SOC)_CORELIST = mcu1_0 mcu1_1
 endif
 
 ifeq ($(SOC),$(filter $(SOC), j721e))
      OSAL_TestApp_$(SOC)_CORELIST = mpu1_0 mcu1_0 mcu2_0 mcu3_0 c66xdsp_1 c7x_1
+ OSAL_TestApp_$(SOC)_CORELIST = mpu1_0 mcu1_0 mcu2_0 mcu3_0 c66xdsp_1 c7x_1
  OSAL_Baremetal_TestApp_$(SOC)_CORELIST = mpu1_0 mcu1_0 mcu2_0 mcu3_0
+ OSAL_freertos_TestApp_$(SOC)_CORELIST = mcu1_0 mcu1_1 mcu2_0 mcu2_1 mcu3_0 mcu3_1
 endif
 
 ifeq ($(SOC),$(filter $(SOC), j7200))
  OSAL_TestApp_$(SOC)_CORELIST = mpu1_0 mcu1_0 mcu2_0
  OSAL_Baremetal_TestApp_$(SOC)_CORELIST = mpu1_0 mcu1_0 mcu2_0
+ OSAL_freertos_TestApp_$(SOC)_CORELIST = mcu1_0 mcu1_1 mcu2_0 mcu2_1
 endif
 
 ifeq ($(SOC),$(filter $(SOC), tpr12))
@@ -425,6 +429,7 @@ endif
 
 export OSAL_Baremetal_TestApp_$(SOC)_CORELIST
 export OSAL_TestApp_$(SOC)_CORELIST
+export OSAL_freertos_TestApp_$(SOC)_CORELIST
 
 osal_EXAMPLE_LIST += OSAL_Baremetal_TestApp
 osal_EXAMPLE_LIST += OSAL_freertos_TestApp
index 23b4126bd5f509e0404fc9cd8d5df3f72998a550..a78e83fffa55c0fc39b49e3a772804a165bff65d 100644 (file)
@@ -553,9 +553,13 @@ bool OSAL_timer_test()
     TimerP_Status timerStatus;
     Osal_HwAttrs  hwAttrs;
 
-#if defined(BARE_METAL) || defined(FREERTOS)
+#if defined(BARE_METAL)
     int32_t       id    = OSAL_TEST_TIMER_ID;
 #else
+    /* Pass TimerP_ANY for FreeRTOS, since FreeRTOS kernel running on each core
+     * will use one timer per core. So if there is a conflict in the id passed
+     * TimerP_create will fail. See FreeRTOS_config_<core>.h for details about
+     * the timer instance used by each core */
     int32_t       id    = TimerP_ANY;
 #endif
 
@@ -568,7 +572,7 @@ bool OSAL_timer_test()
 #endif
 
 #if defined(SOC_J721E)
-#if !defined(BARE_METAL)
+#if !(defined(BARE_METAL) || defined(FREERTOS))
 #if defined(BUILD_C66X_1) || defined(BUILD_C66X_2) || defined(BUILD_C7X_1) || defined(BUILD_MCU1_0)
     id                  = OSAL_TEST_TIMER_ID;
 #endif