From b45d2326c981364d786fd552e57d92696e735be6 Mon Sep 17 00:00:00 2001 From: bigmagic Date: Fri, 3 Apr 2020 20:26:50 +0800 Subject: [PATCH] fix x1000 memory use bug --- bsp/x1000/drivers/board.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bsp/x1000/drivers/board.c b/bsp/x1000/drivers/board.c index 9cce5b883f..0ed5021382 100644 --- a/bsp/x1000/drivers/board.c +++ b/bsp/x1000/drivers/board.c @@ -90,6 +90,13 @@ void rt_hw_board_init(void) /* init hardware interrupt */ rt_hw_interrupt_init(); + +#ifdef RT_USING_HEAP + /* init memory system */ + rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END); +#endif + + /* init uart */ rt_hw_uart_init(); #ifdef RT_USING_CONSOLE @@ -97,11 +104,6 @@ void rt_hw_board_init(void) rt_console_set_device(RT_CONSOLE_DEVICE_NAME); #endif /* RT_USING_CONSOLE */ -#ifdef RT_USING_HEAP - /* init memory system */ - rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END); -#endif - #ifdef RT_USING_COMPONENTS_INIT rt_components_board_init(); #endif