board.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (c) 2006-2018, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2009-09-22 Bernard add board.h to this bsp
  9. * 2010-02-04 Magicoe add board.h to LPC176x bsp
  10. * 2013-12-18 Bernard porting to LPC4088 bsp
  11. */
  12. #ifndef __BOARD_H__
  13. #define __BOARD_H__
  14. #include "LPC407x_8x_177x_8x.h"
  15. #include <rtthread.h>
  16. /* SRAM allocation for Peripherals */
  17. #define USB_RAM_BASE 0x20000000
  18. #define MCI_RAM_BASE 0x20002000
  19. #define ETH_RAM_BASE 0x20004000
  20. /* use SDRAM in default */
  21. #define LPC_EXT_SDRAM 1
  22. /* disable SDRAM in default */
  23. #ifndef LPC_EXT_SDRAM
  24. #define LPC_EXT_SDRAM 0
  25. #endif
  26. // <RDTConfigurator URL="http://www.rt-thread.com/eclipse">
  27. // <integer name="LPC_EXT_SDRAM" description="Begin Address of External SDRAM" default="0xA0000000" />
  28. #define LPC_EXT_SDRAM_BEGIN 0xA0000000
  29. // <integer name="LPC_EXT_SDRAM_END" description="End Address of External SDRAM" default="0xA2000000" />
  30. #define LPC_EXT_SDRAM_END 0xA2000000
  31. // <bool name="RT_USING_UART0" description="Using UART0" default="true" />
  32. #define RT_USING_UART0
  33. // <bool name="RT_USING_UART1" description="Using UART1" default="true" />
  34. //#define RT_USING_UART1
  35. // <bool name="RT_USING_UART2" description="Using UART2" default="true" />
  36. #define RT_USING_UART2
  37. // </RDTConfigurator>
  38. #ifdef __CC_ARM
  39. extern int Image$$RW_IRAM1$$ZI$$Limit;
  40. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  41. #elif __ICCARM__
  42. #pragma section="HEAP"
  43. #define HEAP_BEGIN (__segment_end("HEAP"))
  44. #else
  45. extern int __bss_end;
  46. #define HEAP_BEGIN ((void *)&__bss_end)
  47. #endif
  48. #define HEAP_END (void*)(0x10000000 + 0x10000)
  49. #define FINSH_DEVICE_NAME RT_CONSOLE_DEVICE_NAME
  50. void rt_hw_board_init(void);
  51. #endif