[BSP][TM4C129X] Fix the bug that HEAP is not initalized at system start up.

This commit is contained in:
ArdaFu 2020-06-24 13:35:49 +08:00
parent 3408c57d9e
commit 8e2a699d63
2 changed files with 6 additions and 2 deletions

View File

@ -55,12 +55,16 @@ extern void PendSV_Handler(void);
extern void HardFault_Handler(void);
/**
* This function will initial LPC40xx board.
* This function will initial TM4C129X board.
*/
void rt_hw_board_init()
{
//init low level drivers. e.g. cpu uart etc.
rt_components_board_init();
//init HEAP.
#ifdef RT_USING_HEAP
rt_system_heap_init(HEAP_BEGIN, HEAP_END);
#endif
//redirect RTT stdio to CONSOLE device
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
}

View File

@ -33,7 +33,7 @@ extern int Image$$RW_IRAM$$ZI$$Limit;
extern int _ebss;
#define HEAP_BEGIN ((void *)&_ebss)
#endif
#define HEAP_END (0x20000000 + 256*1024)
#define HEAP_END ((void *)(0x20000000 + 256*1024))
#define FINSH_DEVICE_NAME RT_CONSOLE_DEVICE_NAME
void rt_hw_board_init(void);