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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user