1
0

platform.c 769 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * File : platform.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2012, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2012-04-15 Bernard the first version.
  13. */
  14. #include "platform.h"
  15. #ifdef RT_USING_MEMHEAP
  16. static struct rt_memheap _memheap;
  17. #endif
  18. void platform_init(void)
  19. {
  20. #ifdef RT_USING_MEMHEAP
  21. /* create memory heap object on 0x2007 C000 - 0x2008 4000*/
  22. #ifdef RT_USING_LWIP
  23. rt_memheap_init(&_memheap, "system", (void*)0x2007C000, 16*1024);
  24. #else
  25. rt_memheap_init(&_memheap, "system", (void*)0x2007C000, 32*1024);
  26. #endif
  27. #endif
  28. }