Skip to content

Commit 08048bb

Browse files
authored
Merge pull request #3721 from ArdaFu/master
[BSP][TM4C129X] Fix the bug that HEAP is not initialized at system start up.
2 parents b318224 + 8e2a699 commit 08048bb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

bsp/tm4c129x/applications/board.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@ extern void PendSV_Handler(void);
5555
extern void HardFault_Handler(void);
5656

5757
/**
58-
* This function will initial LPC40xx board.
58+
* This function will initial TM4C129X board.
5959
*/
6060
void rt_hw_board_init()
6161
{
6262
//init low level drivers. e.g. cpu uart etc.
6363
rt_components_board_init();
64+
//init HEAP.
65+
#ifdef RT_USING_HEAP
66+
rt_system_heap_init(HEAP_BEGIN, HEAP_END);
67+
#endif
6468
//redirect RTT stdio to CONSOLE device
6569
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
6670
}

bsp/tm4c129x/applications/board.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern int Image$$RW_IRAM$$ZI$$Limit;
3333
extern int _ebss;
3434
#define HEAP_BEGIN ((void *)&_ebss)
3535
#endif
36-
#define HEAP_END (0x20000000 + 256*1024)
36+
#define HEAP_END ((void *)(0x20000000 + 256*1024))
3737

3838
#define FINSH_DEVICE_NAME RT_CONSOLE_DEVICE_NAME
3939
void rt_hw_board_init(void);

0 commit comments

Comments
 (0)