commit for customized Makefile and build script. && Implemented a User_Main function call demo as a bridge to allow program execution to transition from main.c to C++ environment.

This commit is contained in:
2026-09-14 20:11:48 +08:00
parent 534c017e0f
commit 44f1fcc592
6 changed files with 359 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
extern "C"
{
#include "usart.h"
}
// 自定义函数入口
extern "C" void User_Main(void)
{
HAL_UART_Transmit(&huart2, (const uint8_t *)"Hello world from C++ !!\r\n", 25, 1000);
return;
}