summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 28e4b9a)
raw | patch | inline | side by side (from parent 1: 28e4b9a)
author | Don Dominic <a0486429@ti.com> | |
Tue, 23 Mar 2021 06:19:01 +0000 (11:49 +0530) | ||
committer | Sujith 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>
Signed-off-by: Don Dominic <a0486429@ti.com>
packages/ti/osal/osal_component.mk | patch | blob | history | |
packages/ti/osal/test/src/main_osal_test.c | patch | blob | history |
index 60a980658e8c3608396f7f8de117795f9fcf4d5a..99a84d60bb554bac9969249ea413031482572334 100644 (file)
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
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
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))
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
diff --git a/packages/ti/osal/test/src/main_osal_test.c b/packages/ti/osal/test/src/main_osal_test.c
index 23b4126bd5f509e0404fc9cd8d5df3f72998a550..a78e83fffa55c0fc39b49e3a772804a165bff65d 100644 (file)
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
#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