Skip to content

Commit b45d232

Browse files
committed
fix x1000 memory use bug
1 parent 0f57faa commit b45d232

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

bsp/x1000/drivers/board.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,20 @@ void rt_hw_board_init(void)
9090

9191
/* init hardware interrupt */
9292
rt_hw_interrupt_init();
93+
94+
#ifdef RT_USING_HEAP
95+
/* init memory system */
96+
rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
97+
#endif
98+
99+
/* init uart */
93100
rt_hw_uart_init();
94101

95102
#ifdef RT_USING_CONSOLE
96103
/* set console device */
97104
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
98105
#endif /* RT_USING_CONSOLE */
99106

100-
#ifdef RT_USING_HEAP
101-
/* init memory system */
102-
rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
103-
#endif
104-
105107
#ifdef RT_USING_COMPONENTS_INIT
106108
rt_components_board_init();
107109
#endif

0 commit comments

Comments
 (0)