board.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. // <bool name="RT_USING_UART1" description="Using UART1" default="true" />
  31. //#define RT_USING_UART1
  32. // <bool name="RT_USING_UART2" description="Using UART2" default="true" />
  33. //#define RT_USING_UART2
  34. // </RDTConfigurator>
  35. #ifdef __CC_ARM
  36. extern int Image$$RW_IRAM1$$ZI$$Limit;
  37. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  38. #elif __ICCARM__
  39. #pragma section="HEAP"
  40. #define HEAP_BEGIN (__segment_end("HEAP"))
  41. #else
  42. extern int __bss_end;
  43. #define HEAP_BEGIN ((void *)&__bss_end)
  44. #endif
  45. #define HEAP_END (void*)(0x10000000 + 0x8000)
  46. void rt_hw_board_init(void);
  47. int rt_hw_board_heap_init(void);
  48. int rt_vbus_do_init(void);
  49. #endif