Problem running SBSFU with Keil RTX5 (RTOS)
I am trying to adapt an existing project that uses Keil RTX5 (RTOS2) which was written in C++ to include SBSFU functionality.
So far I have got the project to build. However I am not sure about the integrity of the build as Micro-lib does not support C++ so I had to exclude it in other to get the project to build.
Although the UserApp project that was part of the SBSFU example code had Micro-Lib enabled by default so not sure what impact this might have on the whole project.
When I run the code I get the following error
WARNING: A Reboot has been triggered by a Watchdog reset!My question has anyone been able to use any RTOS preferably the Keil RTX5 the with SBSFU and if so how did you go integrating.
On enabling the RTOS it adds the following 3 function which conflicts with the default generated one in stm32h7xx_it.c.
/**
* @brief This function handles SVCall exception.
* @param None
* @retval None
*/
void SVC_Handler(void)
{
}
/**
* @brief This function handles PendSVC exception.
* @param None
* @retval None
*/
void PendSV_Handler(void)
{
}
/**
* @brief This function handles SysTick Handler.
* @param None
* @retval None
*/
void SysTick_Handler(void)
{
HAL_IncTick();
}
Below is some code fragment showing how I have adapted the existing UserApp to be used by the OS.
#ifdef __cplusplus
extern "C" {
#endif
extern void FW_APP_Run(void); // declared in the main.c file
void FwAppRunTask(void *argument)
{
FW_APP_Run(); // User App firmware runs and never returns
}
/*----------------------------------------------------------------------------
* Application main thread
*---------------------------------------------------------------------------*/
void app_main(void)
{
// System Initialization
SystemCoreClockUpdate(); // Initialize CMSIS-RTOS
osKernelInitialize();
osThreadNew(FwAppRunTask, NULL, NULL);
osKernelStart();
for (;;) {}
}
#ifdef __cplusplus
}
#endifThe function FwAppRunTask() is responsible for kicking the IWDG with the following line of code WRITE_REG(IWDG1->KR, IWDG_KEY_RELOAD);
but for some reason I am not convenience that the system tick timer is working hence the reason the watchdog is causing the board to reset.
