2013-01-08 22:40:58 +08:00
|
|
|
/*
|
2021-03-17 02:26:35 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2013-01-08 22:40:58 +08:00
|
|
|
*
|
2018-10-22 11:02:14 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2013-01-08 22:40:58 +08:00
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2012-04-15 Bernard the first version.
|
|
|
|
*/
|
|
|
|
#include "platform.h"
|
|
|
|
|
|
|
|
#ifdef RT_USING_MEMHEAP
|
|
|
|
static struct rt_memheap _memheap;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void platform_init(void)
|
|
|
|
{
|
|
|
|
#ifdef RT_USING_MEMHEAP
|
2021-03-17 02:26:35 +08:00
|
|
|
/* create memory heap object on 0x2007 C000 - 0x2008 4000*/
|
2013-01-08 22:40:58 +08:00
|
|
|
#ifdef RT_USING_LWIP
|
2021-03-17 02:26:35 +08:00
|
|
|
rt_memheap_init(&_memheap, "system", (void*)0x2007C000, 16*1024);
|
2013-01-08 22:40:58 +08:00
|
|
|
#else
|
2021-03-17 02:26:35 +08:00
|
|
|
rt_memheap_init(&_memheap, "system", (void*)0x2007C000, 32*1024);
|
2013-01-08 22:40:58 +08:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|