cmsis_core.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _CMSIS_CORE_H_
  13. #define _CMSIS_CORE_H_
  14. #include "kernel_config.h"
  15. #ifdef CONFIG_CPU_ARM_CA5
  16. #define __CA_REV 0x0000U /* Core revision r0p0 */
  17. #define __CORTEX_A 5U /* Cortex-A5 Core */
  18. #define __FPU_PRESENT 1U /* FPU present */
  19. #define __GIC_PRESENT 1U /* GIC present */
  20. #define __TIM_PRESENT 0U /* TIM present */
  21. #define __L2C_PRESENT 0U /* L2C present */
  22. #define GIC_DISTRIBUTOR_BASE (CONFIG_GIC_BASE_ADDRESS)
  23. #define GIC_INTERFACE_BASE (CONFIG_GIC_BASE_ADDRESS + CONFIG_GIC_CPU_INTERFACE_OFFSET)
  24. #define IRQ_GIC_LINE_COUNT (32 + CONFIG_IRQ_COUNT)
  25. typedef unsigned IRQn_Type;
  26. #include "Core_A/cmsis_compiler.h"
  27. #include "Core_A/cmsis_cp15.h"
  28. #include "Core_A/core_ca.h"
  29. #include "Core_A/irq_ctrl.h"
  30. #elif defined(CONFIG_CPU_ARM_CM4F)
  31. #define __FPU_PRESENT 1U
  32. #define __MPU_PRESENT 0U
  33. #define __NVIC_PRIO_BITS 5U
  34. typedef unsigned IRQn_Type;
  35. #include "Core_M/cmsis_compiler.h"
  36. #include "Core_M/core_cm4.h"
  37. #elif defined(CONFIG_CPU_ARM_CM33F)
  38. #define __FPU_PRESENT 1U
  39. #define __DSP_PRESENT 1U
  40. #define __MPU_PRESENT 1U
  41. #define __SAUREGION_PRESENT 1U
  42. #define __NVIC_PRIO_BITS CONFIG_NVIC_PRIORITY_BITS
  43. #define __Vendor_SysTickConfig 1U
  44. typedef unsigned IRQn_Type;
  45. #include "Core_M/cmsis_compiler.h"
  46. #include "Core_M/core_cm33.h"
  47. #endif
  48. #endif