rtconfig.h 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. #ifndef RT_CONFIG_H__
  2. #define RT_CONFIG_H__
  3. /* Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) */
  4. /* RT-Thread Kernel */
  5. #define RT_NAME_MAX 8
  6. #define RT_ALIGN_SIZE 4
  7. #define RT_THREAD_PRIORITY_32
  8. #define RT_THREAD_PRIORITY_MAX 32
  9. #define RT_TICK_PER_SECOND 1000
  10. #define RT_USING_OVERFLOW_CHECK
  11. #define RT_USING_HOOK
  12. #define RT_HOOK_USING_FUNC_PTR
  13. #define RT_USING_IDLE_HOOK
  14. #define RT_IDLE_HOOK_LIST_SIZE 4
  15. #define IDLE_THREAD_STACK_SIZE 256
  16. #define RT_USING_TIMER_SOFT
  17. #define RT_TIMER_THREAD_PRIO 4
  18. /* ★ 512 -> 1024: selfcheck 的拍照超时定时器改为 SOFT_TIMER 后, 回调运行在 timer 线程,
  19. 而该回调会调 HMI_WRITE() -> rt_vsnprintf(), 软格式化本身就要好几百字节栈,
  20. 512 不够用(栈溢出不会有任何提示, 只有 hard fault)。 */
  21. #define RT_TIMER_THREAD_STACK_SIZE 1024
  22. /* kservice optimization */
  23. #define RT_KSERVICE_USING_STDLIB
  24. #define RT_KSERVICE_USING_TINY_SIZE
  25. #define RT_KPRINTF_USING_LONGLONG
  26. /* end of kservice optimization */
  27. #define RT_DEBUG
  28. #define RT_DEBUG_COLOR
  29. /* Inter-Thread communication */
  30. #define RT_USING_SEMAPHORE
  31. #define RT_USING_MUTEX
  32. #define RT_USING_EVENT
  33. #define RT_USING_MAILBOX
  34. #define RT_USING_MESSAGEQUEUE
  35. /* end of Inter-Thread communication */
  36. /* Memory Management */
  37. #define RT_USING_MEMPOOL
  38. #define RT_USING_SMALL_MEM
  39. #define RT_USING_SMALL_MEM_AS_HEAP
  40. #define RT_USING_MEMTRACE
  41. #define RT_USING_HEAP_ISR
  42. #define RT_USING_HEAP
  43. /* end of Memory Management */
  44. /* Kernel Device Object */
  45. #define RT_USING_DEVICE
  46. #define RT_USING_CONSOLE
  47. #define RT_CONSOLEBUF_SIZE 1024
  48. #define RT_CONSOLE_DEVICE_NAME "uart1"
  49. /* end of Kernel Device Object */
  50. #define RT_VER_NUM 0x40101
  51. /* end of RT-Thread Kernel */
  52. #define ARCH_ARM
  53. #define RT_USING_CPU_FFS
  54. #define ARCH_ARM_CORTEX_M
  55. #define ARCH_ARM_CORTEX_M3
  56. /* RT-Thread Components */
  57. #define RT_USING_COMPONENTS_INIT
  58. #define RT_USING_USER_MAIN
  59. /* ★ 2048 太小: Check_ParamConfig() 跑在 main 线程,里面有大量 ef_get_env_blob
  60. 调用 + rt_kprintf(vsnprintf 本身就要几百字节栈)。原值 2048 在加了参数双备份
  61. 自检后实测爆栈 hard fault,恢复到 RT-Thread 默认的 4096。 */
  62. #define RT_MAIN_THREAD_STACK_SIZE 4096
  63. #define RT_MAIN_THREAD_PRIORITY 10
  64. #define RT_USING_LEGACY
  65. #define RT_USING_MSH
  66. #define RT_USING_FINSH
  67. #define FINSH_USING_MSH
  68. #define FINSH_THREAD_NAME "tshell"
  69. #define FINSH_THREAD_PRIORITY 20
  70. #define FINSH_THREAD_STACK_SIZE 4096
  71. #define FINSH_USING_SYMTAB
  72. #define FINSH_CMD_SIZE 80
  73. #define MSH_USING_BUILT_IN_COMMANDS
  74. #define FINSH_USING_DESCRIPTION
  75. #define FINSH_ARG_MAX 10
  76. #define RT_USING_FAL
  77. #define FAL_DEBUG_CONFIG
  78. #define FAL_DEBUG 1
  79. #define FAL_PART_HAS_TABLE_CFG
  80. #define FAL_USING_SFUD_PORT
  81. #define FAL_USING_NOR_FLASH_DEV_NAME "W25Q16"
  82. /* Device Drivers */
  83. #define RT_USING_DEVICE_IPC
  84. #define RT_USING_SERIAL
  85. #define RT_USING_SERIAL_V2
  86. #define RT_SERIAL_USING_DMA
  87. #define RT_USING_HWTIMER
  88. #define RT_USING_PIN
  89. #define RT_USING_ADC
  90. #define RT_USING_PWM
  91. #define RT_USING_RTC
  92. //#define RT_USING_ALARM
  93. #define RT_USING_SPI
  94. #define RT_USING_SFUD
  95. #define RT_SFUD_USING_SFDP
  96. #define RT_SFUD_USING_FLASH_INFO_TABLE
  97. #define RT_SFUD_SPI_MAX_HZ 50000000
  98. #define RT_USING_WDT
  99. /* Using USB */
  100. /* end of Using USB */
  101. /* end of Device Drivers */
  102. /* C/C++ and POSIX layer */
  103. #define RT_LIBC_DEFAULT_TIMEZONE 0
  104. /* POSIX (Portable Operating System Interface) layer */
  105. #define RT_USING_POSIX_DELAY
  106. #define RT_USING_POSIX_CLOCK
  107. #define RT_USING_POSIX_TIMER
  108. /* Interprocess Communication (IPC) */
  109. /* Socket is in the 'Network' category */
  110. /* end of Interprocess Communication (IPC) */
  111. /* end of POSIX (Portable Operating System Interface) layer */
  112. /* end of C/C++ and POSIX layer */
  113. /* Network */
  114. /* end of Network */
  115. /* Utilities */
  116. #define RT_USING_RYM
  117. /* end of Utilities */
  118. /* end of RT-Thread Components */
  119. /* RT-Thread online packages */
  120. /* IoT - internet of things */
  121. #define PKG_USING_FREEMODBUS
  122. #define PKG_MODBUS_MASTER
  123. /* advanced configuration */
  124. #define RT_M_DISCRETE_INPUT_START 0
  125. #define RT_M_DISCRETE_INPUT_NDISCRETES 16
  126. #define RT_M_COIL_START 0
  127. #define RT_M_COIL_NCOILS 64
  128. #define RT_M_REG_INPUT_START 0
  129. #define RT_M_REG_INPUT_NREGS 10
  130. #define RT_M_REG_HOLDING_START 0
  131. #define RT_M_REG_HOLDING_NREGS 10
  132. #define RT_M_HD_RESERVE 0
  133. #define RT_M_IN_RESERVE 4
  134. #define RT_M_CO_RESERVE 0
  135. #define RT_M_DI_RESERVE 4
  136. /* end of advanced configuration */
  137. #define PKG_MODBUS_MASTER_RTU
  138. #define PKG_MODBUS_MASTER_SAMPLE
  139. #define MB_SAMPLE_TEST_SLAVE_ADDR 1
  140. #define MB_MASTER_USING_PORT_NUM 5
  141. #define MB_MASTER_USING_PORT_BAUDRATE 9600
  142. #define PKG_USING_FREEMODBUS_LATEST_VERSION
  143. /* Wi-Fi */
  144. /* Marvell WiFi */
  145. /* end of Marvell WiFi */
  146. /* Wiced WiFi */
  147. /* end of Wiced WiFi */
  148. /* CYW43012 WiFi */
  149. /* end of CYW43012 WiFi */
  150. /* BL808 WiFi */
  151. /* end of BL808 WiFi */
  152. /* CYW43439 WiFi */
  153. /* end of CYW43439 WiFi */
  154. /* end of Wi-Fi */
  155. /* IoT Cloud */
  156. /* end of IoT Cloud */
  157. #define PKG_USING_OTA_DOWNLOADER
  158. #define PKG_USING_YMODEM_OTA
  159. #define PKG_USING_OTA_DOWNLOADER_V100
  160. /* end of IoT - internet of things */
  161. /* security packages */
  162. /* end of security packages */
  163. /* language packages */
  164. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  165. #define PKG_USING_CJSON
  166. #define PKG_USING_CJSON_V1717
  167. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  168. /* XML: Extensible Markup Language */
  169. /* end of XML: Extensible Markup Language */
  170. /* end of language packages */
  171. /* multimedia packages */
  172. /* LVGL: powerful and easy-to-use embedded GUI library */
  173. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  174. /* u8g2: a monochrome graphic library */
  175. /* end of u8g2: a monochrome graphic library */
  176. /* end of multimedia packages */
  177. /* tools packages */
  178. #define PKG_USING_EASYFLASH
  179. #define PKG_EASYFLASH_ENV
  180. #define PKG_EASYFLASH_IAP
  181. #define PKG_EASYFLASH_ERASE_GRAN 4096
  182. #define PKG_EASYFLASH_WRITE_GRAN_32BITS
  183. #define PKG_EASYFLASH_WRITE_GRAN 32
  184. #define PKG_EASYFLASH_START_ADDR 0
  185. #define PKG_EASYFLASH_DEBUG
  186. #define PKG_USING_EASYFLASH_V410
  187. #define PKG_EASYFLASH_VER_NUM 0x40100
  188. /* end of tools packages */
  189. /* system packages */
  190. /* enhanced kernel services */
  191. /* end of enhanced kernel services */
  192. /* acceleration: Assembly language or algorithmic acceleration packages */
  193. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  194. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  195. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  196. /* Micrium: Micrium software products porting for RT-Thread */
  197. /* end of Micrium: Micrium software products porting for RT-Thread */
  198. #define PKG_USING_SYSWATCH
  199. #define SYSWATCH_EXCEPT_RESOLVE_MODE_2
  200. #define SYSWATCH_EXCEPT_RESOLVE_MODE 2
  201. #define SYSWATCH_EXCEPT_TIMEOUT 60
  202. #define SYSWATCH_EXCEPT_CONFIRM_TMO 15
  203. #define SYSWATCH_EXCEPT_RESUME_DLY 15
  204. #define SYSWATCH_THREAD_PRIO 0
  205. #define SYSWATCH_THREAD_STK_SIZE 1024
  206. #define SYSWATCH_THREAD_NAME "syswatch"
  207. #define SYSWATCH_WDT_NAME "wdt"
  208. #define SYSWATCH_WDT_TIMEOUT 5
  209. #define PKG_USING_SYSWATCH_LATEST_VERSION
  210. /* end of system packages */
  211. /* peripheral libraries and drivers */
  212. /* HAL & SDK Drivers */
  213. /* STM32 HAL & SDK Drivers */
  214. /* end of STM32 HAL & SDK Drivers */
  215. /* Infineon HAL Packages */
  216. /* end of Infineon HAL Packages */
  217. /* Kendryte SDK */
  218. /* end of Kendryte SDK */
  219. /* WCH HAL & SDK Drivers */
  220. /* end of WCH HAL & SDK Drivers */
  221. /* AT32 HAL & SDK Drivers */
  222. /* end of AT32 HAL & SDK Drivers */
  223. /* HC32 DDL Drivers */
  224. /* end of HC32 DDL Drivers */
  225. /* NXP HAL & SDK Drivers */
  226. /* end of NXP HAL & SDK Drivers */
  227. /* NUVOTON Drivers */
  228. /* end of NUVOTON Drivers */
  229. /* end of HAL & SDK Drivers */
  230. /* sensors drivers */
  231. /* end of sensors drivers */
  232. /* touch drivers */
  233. /* end of touch drivers */
  234. #define PKG_USING_LEDBLINK
  235. #define PKG_USING_LEDBLINK_LATEST_VERSION
  236. /* end of peripheral libraries and drivers */
  237. /* AI packages */
  238. /* end of AI packages */
  239. /* Signal Processing and Control Algorithm Packages */
  240. /* end of Signal Processing and Control Algorithm Packages */
  241. /* miscellaneous packages */
  242. /* project laboratory */
  243. /* end of project laboratory */
  244. /* samples: kernel and components samples */
  245. /* end of samples: kernel and components samples */
  246. /* entertainment: terminal games and other interesting software packages */
  247. /* end of entertainment: terminal games and other interesting software packages */
  248. /* end of miscellaneous packages */
  249. /* Arduino libraries */
  250. /* Projects and Demos */
  251. /* end of Projects and Demos */
  252. /* Sensors */
  253. /* end of Sensors */
  254. /* Display */
  255. /* end of Display */
  256. /* Timing */
  257. /* end of Timing */
  258. /* Data Processing */
  259. /* end of Data Processing */
  260. /* Data Storage */
  261. /* Communication */
  262. /* end of Communication */
  263. /* Device Control */
  264. /* end of Device Control */
  265. /* Other */
  266. /* end of Other */
  267. /* Signal IO */
  268. /* end of Signal IO */
  269. /* Uncategorized */
  270. /* end of Arduino libraries */
  271. /* end of RT-Thread online packages */
  272. /* samples: kernel and components samples */
  273. /* end of samples: kernel and components samples */
  274. #define RT_STUDIO_BUILT_IN
  275. #endif