Merge pull request #3721 from ArdaFu/master

[BSP][TM4C129X] Fix the bug that HEAP is not initialized at system start up.
This commit is contained in:
Bernard Xiong 2020-06-24 14:52:49 +08:00 committed by GitHub
commit 08048bbcb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);