platform.c 598 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2012-04-15 Bernard the first version.
  9. */
  10. #include "platform.h"
  11. #ifdef RT_USING_MEMHEAP
  12. static struct rt_memheap _memheap;
  13. #endif
  14. void platform_init(void)
  15. {
  16. #ifdef RT_USING_MEMHEAP
  17. /* create memory heap object on 0x2007 C000 - 0x2008 4000*/
  18. #ifdef RT_USING_LWIP
  19. rt_memheap_init(&_memheap, "system", (void*)0x2007C000, 16*1024);
  20. #else
  21. rt_memheap_init(&_memheap, "system", (void*)0x2007C000, 32*1024);
  22. #endif
  23. #endif
  24. }