board.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-10-19 Nations first version
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #include "n32l43x.h"
  13. #include "drv_gpio.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #define N32_FLASH_START_ADRESS ((uint32_t)0x08000000)
  18. #define N32_FLASH_SIZE (128 * 1024)
  19. #define N32_FLASH_END_ADDRESS ((uint32_t)(N32_FLASH_START_ADRESS + N32_FLASH_SIZE))
  20. /* Internal SRAM memory size[Kbytes] <32>, Default: 32*/
  21. #define N32_SRAM_SIZE (32)
  22. #define N32_SRAM_END (0x20000000 + N32_SRAM_SIZE * 1024)
  23. void rt_hw_board_init(void);
  24. #if defined(__ARMCC_VERSION)
  25. extern int Image$$RW_IRAM1$$ZI$$Limit;
  26. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  27. #elif __ICCARM__
  28. #pragma section="CSTACK"
  29. #define HEAP_BEGIN (__segment_end("CSTACK"))
  30. #else
  31. extern int __bss_end;
  32. #define HEAP_BEGIN ((void *)&__bss_end)
  33. #endif
  34. #define HEAP_END N32_SRAM_END
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif /* __BOARD_H__ */