Skip to content

Commit dabf3d9

Browse files
committed
solve the issue of abnormal startup of STM32MP157
1 parent 928e473 commit dabf3d9

File tree

12 files changed

+2091
-4056
lines changed

12 files changed

+2091
-4056
lines changed

bsp/stm32/libraries/HAL_Drivers/drv_common.c

+2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ void HAL_Delay(__IO uint32_t Delay)
111111
/* re-implement tick interface for STM32 HAL */
112112
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
113113
{
114+
#ifndef SOC_SERIES_STM32MP1
114115
rt_hw_systick_init();
116+
#endif
115117

116118
/* Return function status */
117119
return HAL_OK;

bsp/stm32/libraries/HAL_Drivers/nano/drv_console.c

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ static UART_HandleTypeDef console_uart;
1616

1717
void rt_hw_console_init(void)
1818
{
19-
HAL_UART_DeInit(&console_uart);
2019
#ifdef USART1
2120
if (rt_strcmp(RT_CONSOLE_DEVICE_NAME, "uart1") == 0)
2221
{

bsp/stm32/stm32f407-rt-spark/SConstruct

+17
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ except:
1515
print(RTT_ROOT)
1616
exit(-1)
1717

18+
def bsp_pkg_check():
19+
import subprocess
20+
21+
check_paths = [
22+
os.path.join("packages", "CMSIS-Core-latest"),
23+
os.path.join("packages", "stm32f4_cmsis_driver-latest"),
24+
os.path.join("packages", "stm32f4_hal_driver-latest")
25+
]
26+
27+
need_update = not all(os.path.exists(p) for p in check_paths)
28+
29+
if need_update:
30+
print("\n==============================================================")
31+
print("Dependency packages missing, please running 'pkgs --update'...")
32+
print("==============================================================")
33+
exit(1)
34+
1835
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
1936

2037
DefaultEnvironment(tools=[])

0 commit comments

Comments
 (0)