]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/commitdiff
osal_safertos: KW Issues Fix
authorDon Dominic <a0486429@ti.com>
Mon, 1 Aug 2022 09:02:56 +0000 (14:32 +0530)
committerRishabh Garg <rishabh@ti.com>
Mon, 1 Aug 2022 12:45:11 +0000 (07:45 -0500)
- Initialize CSL_ArmR5CPUInfo struct.
- Add proper DebugP_assert instead of while 1 loop

Signed-off-by: Don Dominic <a0486429@ti.com>
packages/ti/osal/SemaphoreP.h
packages/ti/osal/src/safertos/SafeRTOS_config.c
packages/ti/osal/src/safertos/SafeRTOS_config_r5f.c

index 1b51aac7c9566853933ae11cd8f0609d2b431add..9a7902585a7065c7d075c2a702de2059b87b7a0f 100644 (file)
@@ -236,7 +236,7 @@ extern SemaphoreP_Status SemaphoreP_postFromISR(SemaphoreP_Handle semPhandle);
 extern int32_t SemaphoreP_getCount(SemaphoreP_Handle semPhandle);
 
 /*!
- *  @brief  Function to clear a semaphore for resuse.
+ *  @brief  Function to clear a semaphore for reuse.
  *
  *  @param  semPhandle  A SemaphoreP_Handle returned from ::SemaphoreP_create
  */
index fa0360088a3cf63594c9a400a2742df02871a721..1b75dd4f71e6753eb123a486538f9a2e9a5fe74f 100644 (file)
@@ -256,7 +256,7 @@ void prvGetOSTimerParams( Safertos_OSTimerParams *params)
     }
 #endif
 #if defined (BUILD_MCU)
-    CSL_ArmR5CPUInfo info;
+    CSL_ArmR5CPUInfo info = {0};
 
     CSL_armR5GetCpuID(&info);
     if (info.grpId == (uint32_t)CSL_ARM_R5_CLUSTER_GROUP_ID_0)
index a338fb9c306e12d2c37379f0f28fe4ab52a51dd0..5a4f396db6e14f1bafc0d16b29f5d5d5295bf1f4 100644 (file)
@@ -169,7 +169,7 @@ __attribute__((section(".startupCode")))  void _system_post_cinit( void )
     osalArch_Init(&cfg);\r
 \r
     uint32_t            loopCnt = 0U, regAddr;\r
-    CSL_ArmR5CPUInfo    info;\r
+    CSL_ArmR5CPUInfo    info = {0};\r
     uint32_t            maxIntrs;\r
     CSL_vimRegs         *pRegs;\r
 \r
@@ -286,7 +286,10 @@ portBaseType prvSetupHardware( void )
 \r
 void vFiqHandler( void )\r
 {\r
-    while( 1 ); /* vFiqhandler not used in SAFERTOS */\r
+    /* FIQ is not supported with SafeRTOS.\r
+     *\r
+     * Force an assert(), then stop here so application writers can catch the error. */\r
+    DebugP_assert(0); \r
 }\r
 \r
 /*-------------------------------------------------------------------------*/
\ No newline at end of file