rtconfig.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. #ifndef RT_CONFIG_H__
  2. #define RT_CONFIG_H__
  3. /* RT-Thread Kernel */
  4. #define RT_NAME_MAX 8
  5. #define RT_CPUS_NR 1
  6. #define RT_ALIGN_SIZE 8
  7. #define RT_THREAD_PRIORITY_32
  8. #define RT_THREAD_PRIORITY_MAX 32
  9. #define RT_TICK_PER_SECOND 1000
  10. #define RT_USING_HOOK
  11. #define RT_HOOK_USING_FUNC_PTR
  12. #define RT_USING_IDLE_HOOK
  13. #define RT_IDLE_HOOK_LIST_SIZE 4
  14. #define IDLE_THREAD_STACK_SIZE 256
  15. #define RT_USING_TIMER_SOFT
  16. #define RT_TIMER_THREAD_PRIO 4
  17. #define RT_TIMER_THREAD_STACK_SIZE 512
  18. /* kservice optimization */
  19. /* end of kservice optimization */
  20. /* klibc optimization */
  21. /* end of klibc optimization */
  22. #define RT_USING_DEBUG
  23. #define RT_DEBUGING_ASSERT
  24. #define RT_DEBUGING_COLOR
  25. #define RT_DEBUGING_CONTEXT
  26. #define RT_USING_OVERFLOW_CHECK
  27. /* Inter-Thread communication */
  28. #define RT_USING_SEMAPHORE
  29. #define RT_USING_MUTEX
  30. #define RT_USING_EVENT
  31. #define RT_USING_MAILBOX
  32. #define RT_USING_MESSAGEQUEUE
  33. /* end of Inter-Thread communication */
  34. /* Memory Management */
  35. #define RT_USING_MEMPOOL
  36. #define RT_USING_SMALL_MEM
  37. #define RT_USING_SMALL_MEM_AS_HEAP
  38. #define RT_USING_HEAP
  39. /* end of Memory Management */
  40. #define RT_USING_DEVICE
  41. #define RT_USING_CONSOLE
  42. #define RT_CONSOLEBUF_SIZE 128
  43. #define RT_CONSOLE_DEVICE_NAME "uart0"
  44. #define RT_VER_NUM 0x50200
  45. #define RT_BACKTRACE_LEVEL_MAX_NR 32
  46. /* end of RT-Thread Kernel */
  47. /* RT-Thread Components */
  48. #define RT_USING_COMPONENTS_INIT
  49. #define RT_USING_USER_MAIN
  50. #define RT_MAIN_THREAD_STACK_SIZE 2048
  51. #define RT_MAIN_THREAD_PRIORITY 10
  52. #define RT_USING_MSH
  53. #define RT_USING_FINSH
  54. #define FINSH_USING_MSH
  55. #define FINSH_THREAD_NAME "tshell"
  56. #define FINSH_THREAD_PRIORITY 20
  57. #define FINSH_THREAD_STACK_SIZE 4096
  58. #define FINSH_USING_HISTORY
  59. #define FINSH_HISTORY_LINES 5
  60. #define FINSH_USING_SYMTAB
  61. #define FINSH_CMD_SIZE 80
  62. #define MSH_USING_BUILT_IN_COMMANDS
  63. #define FINSH_USING_DESCRIPTION
  64. #define FINSH_ARG_MAX 10
  65. #define FINSH_USING_OPTION_COMPLETION
  66. /* DFS: device virtual file system */
  67. #define RT_USING_DFS
  68. #define DFS_USING_POSIX
  69. #define DFS_USING_WORKDIR
  70. #define DFS_FD_MAX 16
  71. #define RT_USING_DFS_V1
  72. #define DFS_FILESYSTEMS_MAX 4
  73. #define DFS_FILESYSTEM_TYPES_MAX 4
  74. #define RT_USING_DFS_DEVFS
  75. /* end of DFS: device virtual file system */
  76. /* Device Drivers */
  77. #define RT_USING_DEVICE_IPC
  78. #define RT_UNAMED_PIPE_NUMBER 64
  79. #define RT_USING_SYSTEM_WORKQUEUE
  80. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048
  81. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  82. #define RT_USING_SERIAL
  83. #define RT_USING_SERIAL_V1
  84. #define RT_SERIAL_USING_DMA
  85. #define RT_SERIAL_RB_BUFSZ 64
  86. #define RT_USING_I2C
  87. #define RT_USING_I2C_BITOPS
  88. #define RT_USING_PWM
  89. #define RT_USING_RTC
  90. #define RT_USING_SOFT_RTC
  91. #define RT_USING_SPI
  92. #define RT_USING_WDT
  93. #define RT_USING_HWCRYPTO
  94. #define RT_HWCRYPTO_DEFAULT_NAME "hwcryto"
  95. #define RT_HWCRYPTO_IV_MAX_SIZE 16
  96. #define RT_HWCRYPTO_KEYBIT_MAX_SIZE 256
  97. #define RT_HWCRYPTO_USING_AES
  98. #define RT_HWCRYPTO_USING_AES_ECB
  99. #define RT_HWCRYPTO_USING_AES_CBC
  100. #define RT_HWCRYPTO_USING_MD5
  101. #define RT_HWCRYPTO_USING_SHA1
  102. #define RT_HWCRYPTO_USING_RNG
  103. #define RT_HWCRYPTO_USING_CRC
  104. #define RT_HWCRYPTO_USING_CRC_07
  105. #define RT_HWCRYPTO_USING_CRC_8005
  106. #define RT_HWCRYPTO_USING_CRC_1021
  107. #define RT_HWCRYPTO_USING_CRC_04C11DB7
  108. #define RT_HWCRYPTO_USING_BIGNUM
  109. #define RT_HWCRYPTO_USING_BIGNUM_EXPTMOD
  110. #define RT_HWCRYPTO_USING_BIGNUM_MULMOD
  111. #define RT_USING_WIFI
  112. #define RT_WLAN_DEVICE_STA_NAME "wlan0"
  113. #define RT_WLAN_DEVICE_AP_NAME "wlan1"
  114. #define RT_WLAN_SSID_MAX_LENGTH 32
  115. #define RT_WLAN_PASSWORD_MAX_LENGTH 32
  116. #define RT_WLAN_DEV_EVENT_NUM 2
  117. #define RT_WLAN_MANAGE_ENABLE
  118. #define RT_WLAN_SCAN_WAIT_MS 10000
  119. #define RT_WLAN_CONNECT_WAIT_MS 10000
  120. #define RT_WLAN_SCAN_SORT
  121. #define RT_WLAN_MSH_CMD_ENABLE
  122. #define RT_WLAN_JOIN_SCAN_BY_MGNT
  123. #define RT_WLAN_AUTO_CONNECT_ENABLE
  124. #define AUTO_CONNECTION_PERIOD_MS 2000
  125. #define RT_WLAN_CFG_ENABLE
  126. #define RT_WLAN_CFG_INFO_MAX 3
  127. #define RT_WLAN_PROT_ENABLE
  128. #define RT_WLAN_PROT_NAME_LEN 8
  129. #define RT_WLAN_PROT_MAX 2
  130. #define RT_WLAN_DEFAULT_PROT "lwip"
  131. #define RT_WLAN_PROT_LWIP_ENABLE
  132. #define RT_WLAN_PROT_LWIP_NAME "lwip"
  133. #define RT_WLAN_WORK_THREAD_ENABLE
  134. #define RT_WLAN_WORKQUEUE_THREAD_NAME "wlan_job"
  135. #define RT_WLAN_WORKQUEUE_THREAD_SIZE 2048
  136. #define RT_WLAN_WORKQUEUE_THREAD_PRIO 22
  137. #define RT_USING_PIN
  138. #define RT_USING_HWTIMER
  139. /* end of Device Drivers */
  140. /* C/C++ and POSIX layer */
  141. /* ISO-ANSI C layer */
  142. /* Timezone and Daylight Saving Time */
  143. #define RT_LIBC_USING_LIGHT_TZ_DST
  144. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  145. #define RT_LIBC_TZ_DEFAULT_MIN 0
  146. #define RT_LIBC_TZ_DEFAULT_SEC 0
  147. /* end of Timezone and Daylight Saving Time */
  148. /* end of ISO-ANSI C layer */
  149. /* POSIX (Portable Operating System Interface) layer */
  150. #define RT_USING_POSIX_FS
  151. #define RT_USING_POSIX_POLL
  152. #define RT_USING_POSIX_SELECT
  153. /* Interprocess Communication (IPC) */
  154. /* Socket is in the 'Network' category */
  155. /* end of Interprocess Communication (IPC) */
  156. /* end of POSIX (Portable Operating System Interface) layer */
  157. /* end of C/C++ and POSIX layer */
  158. /* Network */
  159. #define RT_USING_SAL
  160. #define SAL_INTERNET_CHECK
  161. /* Docking with protocol stacks */
  162. #define SAL_USING_LWIP
  163. /* end of Docking with protocol stacks */
  164. #define SAL_USING_POSIX
  165. #define RT_USING_NETDEV
  166. #define NETDEV_USING_IFCONFIG
  167. #define NETDEV_USING_PING
  168. #define NETDEV_USING_NETSTAT
  169. #define NETDEV_USING_AUTO_DEFAULT
  170. #define NETDEV_IPV4 1
  171. #define NETDEV_IPV6 0
  172. #define RT_USING_LWIP
  173. #define RT_USING_LWIP203
  174. #define RT_USING_LWIP_VER_NUM 0x20003
  175. #define RT_LWIP_MEM_ALIGNMENT 4
  176. #define RT_LWIP_IGMP
  177. #define RT_LWIP_ICMP
  178. #define RT_LWIP_DNS
  179. #define RT_LWIP_DHCP
  180. #define IP_SOF_BROADCAST 1
  181. #define IP_SOF_BROADCAST_RECV 1
  182. /* Static IPv4 Address */
  183. #define RT_LWIP_IPADDR "192.168.1.30"
  184. #define RT_LWIP_GWADDR "192.168.1.1"
  185. #define RT_LWIP_MSKADDR "255.255.255.0"
  186. /* end of Static IPv4 Address */
  187. #define RT_LWIP_UDP
  188. #define RT_LWIP_TCP
  189. #define RT_LWIP_RAW
  190. #define RT_MEMP_NUM_NETCONN 8
  191. #define RT_LWIP_PBUF_NUM 16
  192. #define RT_LWIP_RAW_PCB_NUM 4
  193. #define RT_LWIP_UDP_PCB_NUM 4
  194. #define RT_LWIP_TCP_PCB_NUM 4
  195. #define RT_LWIP_TCP_SEG_NUM 40
  196. #define RT_LWIP_TCP_SND_BUF 10240
  197. #define RT_LWIP_TCP_WND 10240
  198. #define RT_LWIP_TCPTHREAD_PRIORITY 10
  199. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  200. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  201. #define LWIP_NO_RX_THREAD
  202. #define LWIP_NO_TX_THREAD
  203. #define RT_LWIP_ETHTHREAD_PRIORITY 12
  204. #define RT_LWIP_ETHTHREAD_STACKSIZE 1024
  205. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  206. #define LWIP_NETIF_STATUS_CALLBACK 1
  207. #define LWIP_NETIF_LINK_CALLBACK 1
  208. #define RT_LWIP_NETIF_NAMESIZE 6
  209. #define SO_REUSE 1
  210. #define LWIP_SO_RCVTIMEO 1
  211. #define LWIP_SO_SNDTIMEO 1
  212. #define LWIP_SO_RCVBUF 1
  213. #define LWIP_SO_LINGER 0
  214. #define LWIP_NETIF_LOOPBACK 0
  215. #define RT_LWIP_USING_PING
  216. #define LWIP_USING_DHCPD
  217. #define DHCPD_SERVER_IP "192.168.169.1"
  218. /* end of Network */
  219. /* Memory protection */
  220. /* end of Memory protection */
  221. /* Utilities */
  222. #define RT_USING_ULOG
  223. #define ULOG_OUTPUT_LVL_I
  224. #define ULOG_OUTPUT_LVL 6
  225. #define ULOG_USING_ISR_LOG
  226. #define ULOG_ASSERT_ENABLE
  227. #define ULOG_LINE_BUF_SIZE 128
  228. /* log format */
  229. #define ULOG_USING_COLOR
  230. #define ULOG_OUTPUT_TIME
  231. #define ULOG_OUTPUT_LEVEL
  232. #define ULOG_OUTPUT_TAG
  233. /* end of log format */
  234. #define ULOG_BACKEND_USING_CONSOLE
  235. /* end of Utilities */
  236. /* Using USB legacy version */
  237. /* end of Using USB legacy version */
  238. /* end of RT-Thread Components */
  239. /* RT-Thread Utestcases */
  240. /* end of RT-Thread Utestcases */
  241. /* RT-Thread online packages */
  242. /* IoT - internet of things */
  243. /* Wi-Fi */
  244. /* Marvell WiFi */
  245. /* end of Marvell WiFi */
  246. /* Wiced WiFi */
  247. /* end of Wiced WiFi */
  248. /* CYW43012 WiFi */
  249. /* end of CYW43012 WiFi */
  250. /* BL808 WiFi */
  251. /* end of BL808 WiFi */
  252. /* CYW43439 WiFi */
  253. /* end of CYW43439 WiFi */
  254. /* end of Wi-Fi */
  255. #define PKG_USING_NETUTILS
  256. #define PKG_NETUTILS_NTP
  257. #define NTP_USING_AUTO_SYNC
  258. #define NTP_AUTO_SYNC_FIRST_DELAY 30
  259. #define NTP_AUTO_SYNC_PERIOD 3600
  260. #define NETUTILS_NTP_HOSTNAME "cn.ntp.org.cn"
  261. #define NETUTILS_NTP_HOSTNAME2 "ntp.rt-thread.org"
  262. #define NETUTILS_NTP_HOSTNAME3 "edu.ntp.org.cn"
  263. #define PKG_USING_NETUTILS_LATEST_VERSION
  264. #define PKG_NETUTILS_VER_NUM 0x99999
  265. /* IoT Cloud */
  266. /* end of IoT Cloud */
  267. /* end of IoT - internet of things */
  268. /* security packages */
  269. /* end of security packages */
  270. /* language packages */
  271. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  272. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  273. /* XML: Extensible Markup Language */
  274. /* end of XML: Extensible Markup Language */
  275. /* end of language packages */
  276. /* multimedia packages */
  277. /* LVGL: powerful and easy-to-use embedded GUI library */
  278. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  279. /* u8g2: a monochrome graphic library */
  280. /* end of u8g2: a monochrome graphic library */
  281. /* end of multimedia packages */
  282. /* tools packages */
  283. /* end of tools packages */
  284. /* system packages */
  285. /* enhanced kernel services */
  286. /* end of enhanced kernel services */
  287. /* acceleration: Assembly language or algorithmic acceleration packages */
  288. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  289. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  290. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  291. /* Micrium: Micrium software products porting for RT-Thread */
  292. /* end of Micrium: Micrium software products porting for RT-Thread */
  293. /* end of system packages */
  294. /* peripheral libraries and drivers */
  295. /* HAL & SDK Drivers */
  296. /* STM32 HAL & SDK Drivers */
  297. /* end of STM32 HAL & SDK Drivers */
  298. /* Infineon HAL Packages */
  299. /* end of Infineon HAL Packages */
  300. /* Kendryte SDK */
  301. /* end of Kendryte SDK */
  302. /* end of HAL & SDK Drivers */
  303. /* sensors drivers */
  304. /* end of sensors drivers */
  305. /* touch drivers */
  306. /* end of touch drivers */
  307. #define PKG_USING_WM_LIBRARIES
  308. #define PKG_USING_WM_LIBRARIES_LATEST_VERSION
  309. /* end of peripheral libraries and drivers */
  310. /* AI packages */
  311. /* end of AI packages */
  312. /* Signal Processing and Control Algorithm Packages */
  313. /* end of Signal Processing and Control Algorithm Packages */
  314. /* miscellaneous packages */
  315. /* project laboratory */
  316. /* end of project laboratory */
  317. /* samples: kernel and components samples */
  318. /* end of samples: kernel and components samples */
  319. /* entertainment: terminal games and other interesting software packages */
  320. /* end of entertainment: terminal games and other interesting software packages */
  321. /* end of miscellaneous packages */
  322. /* Arduino libraries */
  323. /* Projects and Demos */
  324. /* end of Projects and Demos */
  325. /* Sensors */
  326. /* end of Sensors */
  327. /* Display */
  328. /* end of Display */
  329. /* Timing */
  330. /* end of Timing */
  331. /* Data Processing */
  332. /* end of Data Processing */
  333. /* Data Storage */
  334. /* Communication */
  335. /* end of Communication */
  336. /* Device Control */
  337. /* end of Device Control */
  338. /* Other */
  339. /* end of Other */
  340. /* Signal IO */
  341. /* end of Signal IO */
  342. /* Uncategorized */
  343. /* end of Arduino libraries */
  344. /* end of RT-Thread online packages */
  345. #define BSP_USING_WM_LIBRARIES
  346. /* W60x Device config */
  347. #define SOC_W600_A8xx
  348. #define W600_EV_BOARD
  349. /* end of W60x Device config */
  350. /* On-chip Peripheral Drivers */
  351. #define BSP_USING_UART
  352. #define BSP_USING_UART0
  353. #define BSP_USING_PIN
  354. #define BSP_USING_WIFI
  355. /* end of On-chip Peripheral Drivers */
  356. /* External Libraries */
  357. #define WM_USING_ONESHOT
  358. /* end of External Libraries */
  359. #define SOC_W60X
  360. #endif