diff options
| author | Bernard Xiong <[email protected]> | 2020-06-24 14:52:49 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-06-24 14:52:49 +0800 |
| commit | 08048bbcb7de07bfacbf498ca1feed641c1acae9 (patch) | |
| tree | 770b8fde765734b3e00f83c8da74c81ccac2ac7c /bsp | |
| parent | b31822420b32f796919c9d629b1c464cfddeb7ad (diff) | |
| parent | 8e2a699d635ee875d73b2b295b2f802ba65a5fa4 (diff) | |
Merge pull request #3721 from ArdaFu/master
[BSP][TM4C129X] Fix the bug that HEAP is not initialized at system start up.
Diffstat (limited to 'bsp')
| -rw-r--r-- | bsp/tm4c129x/applications/board.c | 6 | ||||
| -rw-r--r-- | bsp/tm4c129x/applications/board.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/bsp/tm4c129x/applications/board.c b/bsp/tm4c129x/applications/board.c index 0da547e867..382cf28cf8 100644 --- a/bsp/tm4c129x/applications/board.c +++ b/bsp/tm4c129x/applications/board.c @@ -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); } diff --git a/bsp/tm4c129x/applications/board.h b/bsp/tm4c129x/applications/board.h index 8103d0b1f1..20b038db30 100644 --- a/bsp/tm4c129x/applications/board.h +++ b/bsp/tm4c129x/applications/board.h @@ -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); |
