我的解决方法如下:
stm32xx_hap_msp.c:
...
/* USER CODE BEGIN 0 */
// 这里放置函数可以避免被cubemx重新生成时覆盖。
/**
*
@Brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
/* USER CODE END 0 */
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
...
我的解决方法如下:
stm32xx_hap_msp.c:
...
/* USER CODE BEGIN 0 */
// 这里放置函数可以避免被cubemx重新生成时覆盖。
/**
*
@Brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
/* USER CODE END 0 */
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
...
举报