rtconfig.h 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  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. #define RT_USING_HW_ATOMIC
  48. #define RT_USING_CPU_FFS
  49. #define ARCH_ARM
  50. #define ARCH_ARM_CORTEX_M
  51. #define ARCH_ARM_CORTEX_M4
  52. /* RT-Thread Components */
  53. #define RT_USING_COMPONENTS_INIT
  54. #define RT_USING_USER_MAIN
  55. #define RT_MAIN_THREAD_STACK_SIZE 2048
  56. #define RT_MAIN_THREAD_PRIORITY 10
  57. #define RT_USING_MSH
  58. #define RT_USING_FINSH
  59. #define FINSH_USING_MSH
  60. #define FINSH_THREAD_NAME "tshell"
  61. #define FINSH_THREAD_PRIORITY 20
  62. #define FINSH_THREAD_STACK_SIZE 4096
  63. #define FINSH_USING_HISTORY
  64. #define FINSH_HISTORY_LINES 5
  65. #define FINSH_USING_SYMTAB
  66. #define FINSH_CMD_SIZE 80
  67. #define MSH_USING_BUILT_IN_COMMANDS
  68. #define FINSH_USING_DESCRIPTION
  69. #define FINSH_ARG_MAX 10
  70. #define FINSH_USING_OPTION_COMPLETION
  71. /* DFS: device virtual file system */
  72. #define RT_USING_DFS
  73. #define DFS_USING_POSIX
  74. #define DFS_USING_WORKDIR
  75. #define DFS_FD_MAX 16
  76. #define RT_USING_DFS_V1
  77. #define DFS_FILESYSTEMS_MAX 4
  78. #define DFS_FILESYSTEM_TYPES_MAX 4
  79. #define RT_USING_DFS_DEVFS
  80. /* end of DFS: device virtual file system */
  81. /* Device Drivers */
  82. #define RT_USING_DEVICE_IPC
  83. #define RT_UNAMED_PIPE_NUMBER 64
  84. #define RT_USING_SYSTEM_WORKQUEUE
  85. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048
  86. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  87. #define RT_USING_SERIAL
  88. #define RT_USING_SERIAL_V1
  89. #define RT_SERIAL_USING_DMA
  90. #define RT_SERIAL_RB_BUFSZ 64
  91. #define RT_USING_I2C
  92. #define RT_USING_RTC
  93. #define RT_USING_KTIME
  94. /* end of Device Drivers */
  95. /* C/C++ and POSIX layer */
  96. /* ISO-ANSI C layer */
  97. /* Timezone and Daylight Saving Time */
  98. #define RT_LIBC_USING_LIGHT_TZ_DST
  99. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  100. #define RT_LIBC_TZ_DEFAULT_MIN 0
  101. #define RT_LIBC_TZ_DEFAULT_SEC 0
  102. /* end of Timezone and Daylight Saving Time */
  103. /* end of ISO-ANSI C layer */
  104. /* POSIX (Portable Operating System Interface) layer */
  105. #define RT_USING_POSIX_FS
  106. #define RT_USING_POSIX_DEVIO
  107. #define RT_USING_POSIX_POLL
  108. #define RT_USING_POSIX_SELECT
  109. #define RT_USING_POSIX_SOCKET
  110. #define RT_USING_POSIX_AIO
  111. #define RT_USING_POSIX_DELAY
  112. #define RT_USING_POSIX_CLOCK
  113. #define RT_USING_POSIX_TIMER
  114. #define RT_USING_PTHREADS
  115. #define PTHREAD_NUM_MAX 8
  116. /* Interprocess Communication (IPC) */
  117. /* Socket is in the 'Network' category */
  118. /* end of Interprocess Communication (IPC) */
  119. /* end of POSIX (Portable Operating System Interface) layer */
  120. /* end of C/C++ and POSIX layer */
  121. /* Network */
  122. #define RT_USING_SAL
  123. #define SAL_INTERNET_CHECK
  124. /* Docking with protocol stacks */
  125. #define SAL_USING_LWIP
  126. /* end of Docking with protocol stacks */
  127. #define SAL_USING_POSIX
  128. #define RT_USING_NETDEV
  129. #define NETDEV_USING_IFCONFIG
  130. #define NETDEV_USING_PING
  131. #define NETDEV_USING_NETSTAT
  132. #define NETDEV_USING_AUTO_DEFAULT
  133. #define NETDEV_IPV4 1
  134. #define NETDEV_IPV6 0
  135. #define RT_USING_LWIP
  136. #define RT_USING_LWIP_LOCAL_VERSION
  137. #define RT_USING_LWIP212
  138. #define RT_USING_LWIP_VER_NUM 0x20102
  139. #define RT_LWIP_MEM_ALIGNMENT 4
  140. #define RT_LWIP_IGMP
  141. #define RT_LWIP_ICMP
  142. #define RT_LWIP_DNS
  143. #define RT_LWIP_DHCP
  144. #define IP_SOF_BROADCAST 1
  145. #define IP_SOF_BROADCAST_RECV 1
  146. /* Static IPv4 Address */
  147. #define RT_LWIP_IPADDR "192.168.1.30"
  148. #define RT_LWIP_GWADDR "192.168.1.1"
  149. #define RT_LWIP_MSKADDR "255.255.255.0"
  150. /* end of Static IPv4 Address */
  151. #define RT_LWIP_UDP
  152. #define RT_LWIP_TCP
  153. #define RT_LWIP_RAW
  154. #define RT_MEMP_NUM_NETCONN 8
  155. #define RT_LWIP_PBUF_NUM 16
  156. #define RT_LWIP_RAW_PCB_NUM 4
  157. #define RT_LWIP_UDP_PCB_NUM 4
  158. #define RT_LWIP_TCP_PCB_NUM 4
  159. #define RT_LWIP_TCP_SEG_NUM 40
  160. #define RT_LWIP_TCP_SND_BUF 8196
  161. #define RT_LWIP_TCP_WND 8196
  162. #define RT_LWIP_TCPTHREAD_PRIORITY 10
  163. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  164. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  165. #define RT_LWIP_ETHTHREAD_PRIORITY 12
  166. #define RT_LWIP_ETHTHREAD_STACKSIZE 1024
  167. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  168. #define LWIP_NETIF_STATUS_CALLBACK 1
  169. #define LWIP_NETIF_LINK_CALLBACK 1
  170. #define RT_LWIP_NETIF_NAMESIZE 6
  171. #define SO_REUSE 1
  172. #define LWIP_SO_RCVTIMEO 1
  173. #define LWIP_SO_SNDTIMEO 1
  174. #define LWIP_SO_RCVBUF 1
  175. #define LWIP_SO_LINGER 0
  176. #define LWIP_NETIF_LOOPBACK 0
  177. #define RT_LWIP_USING_PING
  178. /* end of Network */
  179. /* Memory protection */
  180. /* end of Memory protection */
  181. /* Utilities */
  182. #define RT_USING_RESOURCE_ID
  183. /* end of Utilities */
  184. /* Using USB legacy version */
  185. /* end of Using USB legacy version */
  186. /* end of RT-Thread Components */
  187. /* RT-Thread Utestcases */
  188. /* end of RT-Thread Utestcases */
  189. /* RT-Thread online packages */
  190. /* IoT - internet of things */
  191. /* Wi-Fi */
  192. /* Marvell WiFi */
  193. /* end of Marvell WiFi */
  194. /* Wiced WiFi */
  195. /* end of Wiced WiFi */
  196. /* CYW43012 WiFi */
  197. /* end of CYW43012 WiFi */
  198. /* BL808 WiFi */
  199. /* end of BL808 WiFi */
  200. /* CYW43439 WiFi */
  201. /* end of CYW43439 WiFi */
  202. /* end of Wi-Fi */
  203. /* IoT Cloud */
  204. /* end of IoT Cloud */
  205. /* end of IoT - internet of things */
  206. /* security packages */
  207. /* end of security packages */
  208. /* language packages */
  209. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  210. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  211. /* XML: Extensible Markup Language */
  212. /* end of XML: Extensible Markup Language */
  213. /* end of language packages */
  214. /* multimedia packages */
  215. /* LVGL: powerful and easy-to-use embedded GUI library */
  216. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  217. /* u8g2: a monochrome graphic library */
  218. /* end of u8g2: a monochrome graphic library */
  219. /* end of multimedia packages */
  220. /* tools packages */
  221. /* end of tools packages */
  222. /* system packages */
  223. /* enhanced kernel services */
  224. /* end of enhanced kernel services */
  225. /* acceleration: Assembly language or algorithmic acceleration packages */
  226. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  227. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  228. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  229. /* Micrium: Micrium software products porting for RT-Thread */
  230. /* end of Micrium: Micrium software products porting for RT-Thread */
  231. /* end of system packages */
  232. /* peripheral libraries and drivers */
  233. /* HAL & SDK Drivers */
  234. /* STM32 HAL & SDK Drivers */
  235. /* end of STM32 HAL & SDK Drivers */
  236. /* Infineon HAL Packages */
  237. /* end of Infineon HAL Packages */
  238. /* Kendryte SDK */
  239. /* end of Kendryte SDK */
  240. /* end of HAL & SDK Drivers */
  241. /* sensors drivers */
  242. /* end of sensors drivers */
  243. /* touch drivers */
  244. /* end of touch drivers */
  245. /* end of peripheral libraries and drivers */
  246. /* AI packages */
  247. /* end of AI packages */
  248. /* Signal Processing and Control Algorithm Packages */
  249. /* end of Signal Processing and Control Algorithm Packages */
  250. /* miscellaneous packages */
  251. /* project laboratory */
  252. /* end of project laboratory */
  253. /* samples: kernel and components samples */
  254. /* end of samples: kernel and components samples */
  255. /* entertainment: terminal games and other interesting software packages */
  256. /* end of entertainment: terminal games and other interesting software packages */
  257. /* end of miscellaneous packages */
  258. /* Arduino libraries */
  259. /* Projects and Demos */
  260. /* end of Projects and Demos */
  261. /* Sensors */
  262. /* end of Sensors */
  263. /* Display */
  264. /* end of Display */
  265. /* Timing */
  266. /* end of Timing */
  267. /* Data Processing */
  268. /* end of Data Processing */
  269. /* Data Storage */
  270. /* Communication */
  271. /* end of Communication */
  272. /* Device Control */
  273. /* end of Device Control */
  274. /* Other */
  275. /* end of Other */
  276. /* Signal IO */
  277. /* end of Signal IO */
  278. /* Uncategorized */
  279. /* end of Arduino libraries */
  280. /* end of RT-Thread online packages */
  281. /* Hardware Drivers Config */
  282. #define SOC_SAME54P20
  283. /* end of Hardware Drivers Config */
  284. /* Onboard Peripheral Drivers */
  285. #define SAME5X_CAN0
  286. #define SAME5X_ADC0
  287. #define SAME5X_I2C0
  288. #define SAME5X_GMAC
  289. /* end of Onboard Peripheral Drivers */
  290. /* Application Demo Config */
  291. #define SAM_CAN_EXAMPLE
  292. #define SAM_ADC_EXAMPLE
  293. #define SAM_I2C_EXAMPLE
  294. #define SAM_LWIP_EXAMPLE
  295. /* end of Application Demo Config */
  296. #define SOC_SAME54
  297. #endif