board.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 "LPC407x_8x_177x_8x.h"
  19. #include <rtthread.h>
  20. /* SRAM allocation for Peripherals */
  21. #define USB_RAM_BASE 0x20000000
  22. #define MCI_RAM_BASE 0x20002000
  23. #define ETH_RAM_BASE 0x20004000
  24. /* use SDRAM in default */
  25. #define LPC_EXT_SDRAM 1
  26. /* disable SDRAM in default */
  27. #ifndef LPC_EXT_SDRAM
  28. #define LPC_EXT_SDRAM 0
  29. #endif
  30. // <RDTConfigurator URL="http://www.rt-thread.com/eclipse">
  31. // <integer name="LPC_EXT_SDRAM" description="Begin Address of External SDRAM" default="0xA0000000" />
  32. #define LPC_EXT_SDRAM_BEGIN 0xA0000000
  33. // <integer name="LPC_EXT_SDRAM_END" description="End Address of External SDRAM" default="0xA2000000" />
  34. #define LPC_EXT_SDRAM_END 0xA2000000
  35. // <bool name="RT_USING_UART0" description="Using UART0" default="true" />
  36. #define RT_USING_UART0
  37. // <bool name="RT_USING_UART1" description="Using UART1" default="true" />
  38. //#define RT_USING_UART1
  39. // <bool name="RT_USING_UART2" description="Using UART2" default="true" />
  40. #define RT_USING_UART2
  41. // </RDTConfigurator>
  42. #ifdef __CC_ARM
  43. extern int Image$$RW_IRAM1$$ZI$$Limit;
  44. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  45. #elif __ICCARM__
  46. #pragma section="HEAP"
  47. #define HEAP_BEGIN (__segment_end("HEAP"))
  48. #else
  49. extern int __bss_end;
  50. #define HEAP_BEGIN ((void *)&__bss_end)
  51. #endif
  52. #define HEAP_END (void*)(0x10000000 + 0x10000)
  53. #define FINSH_DEVICE_NAME RT_CONSOLE_DEVICE_NAME
  54. void rt_hw_board_init(void);
  55. #endif