main.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #include <cstdio>
  2. #include "arm_math_types.h"
  3. extern int testmain(const char *);
  4. extern "C" const char *patternData;
  5. //! \note for IAR
  6. #ifdef __IS_COMPILER_IAR__
  7. # undef __IS_COMPILER_IAR__
  8. #endif
  9. #if defined(__IAR_SYSTEMS_ICC__)
  10. # define __IS_COMPILER_IAR__ 1
  11. #endif
  12. //! \note for arm compiler 5
  13. #ifdef __IS_COMPILER_ARM_COMPILER_5__
  14. # undef __IS_COMPILER_ARM_COMPILER_5__
  15. #endif
  16. #if ((__ARMCC_VERSION >= 5000000) && (__ARMCC_VERSION < 6000000))
  17. # define __IS_COMPILER_ARM_COMPILER_5__ 1
  18. #endif
  19. //! @}
  20. //! \note for arm compiler 6
  21. #ifdef __IS_COMPILER_ARM_COMPILER_6__
  22. # undef __IS_COMPILER_ARM_COMPILER_6__
  23. #endif
  24. #if ((__ARMCC_VERSION >= 6000000) && (__ARMCC_VERSION < 7000000))
  25. # define __IS_COMPILER_ARM_COMPILER_6__ 1
  26. #endif
  27. #ifdef __IS_COMPILER_LLVM__
  28. # undef __IS_COMPILER_LLVM__
  29. #endif
  30. #if defined(__clang__) && !__IS_COMPILER_ARM_COMPILER_6__
  31. # define __IS_COMPILER_LLVM__ 1
  32. #else
  33. //! \note for gcc
  34. #ifdef __IS_COMPILER_GCC__
  35. # undef __IS_COMPILER_GCC__
  36. #endif
  37. #if defined(__GNUC__) && !(__IS_COMPILER_ARM_COMPILER_6__ || __IS_COMPILER_LLVM__)
  38. # define __IS_COMPILER_GCC__ 1
  39. #endif
  40. //! @}
  41. #endif
  42. //! @}
  43. #if defined(ARMCM33_DSP_FP) && defined(__IS_COMPILER_GCC__)
  44. extern "C" void _exit(int return_code);
  45. #endif
  46. int main()
  47. {
  48. int r;
  49. r=testmain(patternData);
  50. /*
  51. Temporary solution to solve problems with IPSS support for M33.
  52. */
  53. #if defined(ARMCM33_DSP_FP) && defined(__IS_COMPILER_GCC__)
  54. _exit(r);
  55. #endif
  56. return(r);
  57. }