Skip to content

Commit bf7a1d7

Browse files
authored
Merge pull request #5371 from mysterywolf/common
[stm32][drv_common] add LOG_E for Error_Handler
2 parents ca851b3 + 05d15b1 commit bf7a1d7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bsp/stm32/libraries/HAL_Drivers/drv_common.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@
1616
#include "drv_usart_v2.h"
1717
#else
1818
#include "drv_usart.h"
19-
#endif
20-
#endif
19+
#endif /* RT_USING_SERIAL */
20+
#endif /* RT_USING_SERIAL_V2 */
21+
22+
#define DBG_TAG "drv_common"
23+
#define DBG_LVL DBG_INFO
24+
#include <rtdbg.h>
2125

2226
#ifdef RT_USING_FINSH
2327
#include <finsh.h>
@@ -115,6 +119,7 @@ void _Error_Handler(char *s, int num)
115119
{
116120
/* USER CODE BEGIN Error_Handler */
117121
/* User can add his own implementation to report the HAL error return state */
122+
LOG_E("Error_Handler at file:%s num:%d", s, num);
118123
while (1)
119124
{
120125
}

0 commit comments

Comments
 (0)