proj_config.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. // #ifndef _PROJ_CONFIG_H_
  2. // #define _PROJ_CONFIG_H_
  3. // #define DISABLE (0)
  4. // #define ENABLE (1)
  5. // /*
  6. // * Clock settings section
  7. // * Note:
  8. // *
  9. // */
  10. // #define XTAL_CLOCK (40000000)
  11. // #define RCO_CLOCK (32000)
  12. // #define PLL_CLOCK (160000000)
  13. // //TODO: SystemCoreClock
  14. // #define SYSTEM_CLOCK (160000000)
  15. // /*
  16. // * Module enable/disable control
  17. // */
  18. // #define FULL_ASSERT DISABLE
  19. // #define PRINTF_OMIT DISABLE // when release software, set 1 to omit all printf logs
  20. // #define PRINT_TO_RTT DISABLE // 1: print to segger rtt 0: print to uart1
  21. // #define FLASH_XIP ENABLE
  22. // /*
  23. // * flash image settings
  24. // */
  25. // #define FLASH_IMAGE_VER_MAJOR 1
  26. // #define FLASH_IMAGE_VER_MINOR 1
  27. // #define SOC_CRP_FLAG 0
  28. // /*
  29. // * Hardware config
  30. // */
  31. // #define CFG_UART0_TX_BUF_SIZE 256
  32. // #define CFG_UART0_RX_BUF_SIZE 512
  33. // #define CFG_UART_BAUDRATE_LOG 115200
  34. // #endif /* _PROJ_CONFIG_H_ */
  35. #ifndef _PROJ_CONFIG_H_
  36. #define _PROJ_CONFIG_H_
  37. #define DISABLE (0)
  38. #define ENABLE (1)
  39. #define __CONFIG_OS_KERNEL RTOS_FREERTOS
  40. #define INCLUDE_xTaskGetHandle 1
  41. #define INCLUDE_uxTaskGetStackHighWaterMark 1
  42. /*
  43. * Clock settings section
  44. * Note:
  45. *
  46. */
  47. #define XTAL_CLOCK (40000000)
  48. #define RCO_CLOCK (32000)
  49. #define PLL_CLOCK (160000000)
  50. //TODO: SystemCoreClock
  51. #define SYSTEM_CLOCK (160000000)
  52. /*
  53. * Module enable/disable control
  54. */
  55. #define FLASH_XIP ENABLE
  56. #define LN_ASSERT_EN ENABLE
  57. #define HAL_ASSERT_EN ENABLE
  58. #define PRINTF_OMIT DISABLE // when release software, set 1 to omit all printf logs
  59. #define OS_TICK_COMPENSATE
  60. //Check big and endian mode
  61. #if defined ( __CC_ARM )
  62. #if defined (__BIG_ENDIAN)
  63. #error "Please set the compiler to little-endian mode"
  64. #endif
  65. #elif defined ( __GNUC__ )
  66. #if (__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)
  67. #error "Please set the compiler to little-endian mode"
  68. #endif // __BYTE_ORDER__
  69. #else
  70. #error "Unsupported compiler"
  71. #endif
  72. #ifndef LITTLE_ENDIAN
  73. #define LITTLE_ENDIAN 1234
  74. #endif
  75. /*
  76. * flash image settings
  77. */
  78. #define FLASH_IMAGE_VER_MAJOR 0
  79. #define FLASH_IMAGE_VER_MINOR 1
  80. #define SOC_CRP_FLAG 0
  81. /*
  82. * Hardware config
  83. */
  84. #define CFG_UART0_TX_BUF_SIZE 256
  85. #define CFG_UART0_RX_BUF_SIZE 256
  86. #define CFG_UART1_TX_BUF_SIZE 128
  87. #define CFG_UART1_RX_BUF_SIZE 256
  88. #define CFG_UART2_TX_BUF_SIZE 128
  89. #define CFG_UART2_RX_BUF_SIZE 256
  90. #define CFG_UART_BAUDRATE_LOG 921600
  91. #define CFG_UART_BAUDRATE_CONSOLE 115200
  92. #endif /* _PROJ_CONFIG_H_ */