diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | app/main.c | 32 | ||||
-rw-r--r-- | app/platform/retarget.cpp | 15 |
3 files changed, 17 insertions, 32 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1648bb4..113b3a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,7 @@ set(nixie_clock_sources "app/main.c" "app/stm32f0xx_it.c" "app/system_stm32f0xx.c" + "app/platform/retarget.cpp" "app/platform/stm32f0-gcc/freertos/port.c" "app/platform/stm32f0-gcc/startup/handlers_cm.c" "app/platform/stm32f0-gcc/startup/stack.cpp" @@ -141,6 +142,7 @@ target_compile_options(${PROJECT_NAME} PRIVATE ) target_link_options(${PROJECT_NAME} PRIVATE + --specs=nano.specs ${cpu_options} -Wl,--gc-sections -T${linker_script_mcu} @@ -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) +{ +} |