From 5e565f35686b41ae5b5a2125213e01d8aa9d0e61 Mon Sep 17 00:00:00 2001 From: Oxore Date: Mon, 6 Mar 2023 01:14:11 +0300 Subject: Move FreeRTOS handlers to retarget.cpp --- app/main.c | 32 -------------------------------- app/platform/retarget.cpp | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 32 deletions(-) create mode 100644 app/platform/retarget.cpp (limited to 'app') diff --git a/app/main.c b/app/main.c index 0e1c6c1..4c0881f 100644 --- a/app/main.c +++ b/app/main.c @@ -253,36 +253,4 @@ int main () vTaskStartScheduler(); // И запускаем диспетчер задач ( он же планировщик ) } // end of main - - -#ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed ( uint8_t* file, uint32_t line ) -{ - /* User can add his own implementation to report the file name and line number, - ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - - /* Infinite loop */ - for (;;) - { - } -} -#endif - - -// Специальные ф-ии FreeRTOS ------------------------------------------------ // -void vApplicationMallocFailedHook ( void ) { for( ;; ); } -void vApplicationStackOverflowHook ( TaskHandle_t pxTask, char *pcTaskName ) { - (void) pxTask; - (void) pcTaskName; - for( ;; ); -} -void vApplicationIdleHook ( void ) { } - /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/app/platform/retarget.cpp b/app/platform/retarget.cpp new file mode 100644 index 0000000..52be99f --- /dev/null +++ b/app/platform/retarget.cpp @@ -0,0 +1,15 @@ +extern "C" void vApplicationMallocFailedHook(void) +{ + for (;;); +} + +extern "C" void vApplicationStackOverflowHook(void *task_handle, char *task_name) +{ + (void) task_handle; + (void) task_name; + for (;;); +} + +extern "C" void vApplicationIdleHook(void) +{ +} -- cgit v1.2.3