board.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. */
  14. // <<< Use Configuration Wizard in Context Menu >>>
  15. #ifndef __BOARD_H__
  16. #define __BOARD_H__
  17. #include <stm32f4xx.h>
  18. #include <stm32f4xx_hal.h>
  19. // <o> Internal SRAM memory size[Kbytes] <8-64>
  20. // <i>Default: 64
  21. #define STM32_SRAM_SIZE 64
  22. #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
  23. // <o> Console on USART: <0=> no console <1=>USART 1 <2=>USART 2 <3=> USART 3
  24. // <i>Default: 1
  25. #define STM32_CONSOLE_USART 2
  26. #if STM32_CONSOLE_USART == 0
  27. #define CONSOLE_DEVICE "no"
  28. #elif STM32_CONSOLE_USART == 1
  29. #define CONSOLE_DEVICE "uart1"
  30. #elif STM32_CONSOLE_USART == 2
  31. #define CONSOLE_DEVICE "uart2"
  32. #elif STM32_CONSOLE_USART == 3
  33. #define CONSOLE_DEVICE "uart3"
  34. #endif
  35. #define FINSH_DEVICE_NAME CONSOLE_DEVICE
  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 (0x20000000 + 128*1024)
  47. #endif
  48. extern void rt_hw_board_init(void);
  49. // <<< Use Configuration Wizard in Context Menu >>>