board.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * File : board.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2009, 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. * 2009-09-22 Bernard add board.h to this bsp
  13. * 2010-02-04 Magicoe add board.h to LPC176x bsp
  14. * 2013-12-18 Bernard porting to LPC4088 bsp
  15. */
  16. #ifndef __BOARD_H__
  17. #define __BOARD_H__
  18. #include "LPC43xx.h"
  19. #include <rtthread.h>
  20. /* disable SDRAM in default */
  21. #ifndef LPC_EXT_SDRAM
  22. #define LPC_EXT_SDRAM 0
  23. #endif
  24. // <RDTConfigurator URL="http://www.rt-thread.com/eclipse">
  25. // <integer name="LPC_EXT_SDRAM" description="Begin Address of External SDRAM" default="0xA0000000" />
  26. #define LPC_EXT_SDRAM_BEGIN 0xA0000000
  27. // <integer name="LPC_EXT_SDRAM_END" description="End Address of External SDRAM" default="0xA2000000" />
  28. #define LPC_EXT_SDRAM_END 0xA2000000
  29. // <bool name="RT_USING_UART0" description="Using UART0" default="true" />
  30. #define RT_USING_UART0
  31. // <bool name="RT_USING_UART1" description="Using UART1" default="true" />
  32. //#define RT_USING_UART1
  33. // <bool name="RT_USING_UART2" description="Using UART2" default="true" />
  34. //#define RT_USING_UART2
  35. // </RDTConfigurator>
  36. #ifdef __CC_ARM
  37. extern int Image$$RW_IRAM1$$ZI$$Limit;
  38. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  39. #elif __ICCARM__
  40. #pragma section="HEAP"
  41. #define HEAP_BEGIN (__segment_end("HEAP"))
  42. #else
  43. extern int __bss_end;
  44. #define HEAP_BEGIN ((void *)&__bss_end)
  45. #endif
  46. #define HEAP_END (void*)(0x10000000 + 0x20000)
  47. void rt_hw_board_init(void);
  48. int rt_hw_board_heap_init(void);
  49. #endif