rtconfig.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. #ifndef RT_CONFIG_H__
  2. #define RT_CONFIG_H__
  3. /* RT-Thread Kernel */
  4. #define RT_NAME_MAX 20
  5. #define RT_USING_SMART
  6. #define RT_CPUS_NR 1
  7. #define RT_ALIGN_SIZE 8
  8. #define RT_THREAD_PRIORITY_256
  9. #define RT_THREAD_PRIORITY_MAX 256
  10. #define RT_TICK_PER_SECOND 100
  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 16384
  16. #define RT_USING_TIMER_SOFT
  17. #define RT_TIMER_THREAD_PRIO 4
  18. #define RT_TIMER_THREAD_STACK_SIZE 16384
  19. #define RT_USING_CPU_USAGE_TRACER
  20. /* kservice optimization */
  21. /* end of kservice optimization */
  22. /* klibc optimization */
  23. #define RT_KLIBC_USING_VSNPRINTF_LONGLONG
  24. /* end of klibc optimization */
  25. #define RT_USING_DEBUG
  26. #define RT_DEBUGING_ASSERT
  27. #define RT_DEBUGING_COLOR
  28. #define RT_DEBUGING_CONTEXT
  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_PAGE_MAX_ORDER 11
  38. #define RT_USING_MEMPOOL
  39. #define RT_USING_SMALL_MEM
  40. #define RT_USING_SMALL_MEM_AS_HEAP
  41. #define RT_USING_MEMTRACE
  42. #define RT_USING_HEAP
  43. /* end of Memory Management */
  44. #define RT_USING_DEVICE
  45. #define RT_USING_DEVICE_OPS
  46. #define RT_USING_SCHED_THREAD_CTX
  47. #define RT_USING_CONSOLE
  48. #define RT_CONSOLEBUF_SIZE 256
  49. #define RT_CONSOLE_DEVICE_NAME "uart"
  50. #define RT_VER_NUM 0x50200
  51. #define RT_USING_STDC_ATOMIC
  52. #define RT_BACKTRACE_LEVEL_MAX_NR 32
  53. /* end of RT-Thread Kernel */
  54. #define ARCH_CPU_64BIT
  55. #define RT_USING_CACHE
  56. #define ARCH_MM_MMU
  57. #define KERNEL_VADDR_START 0x150000000
  58. #define ARCH_RISCV
  59. #define ARCH_RISCV_FPU
  60. #define ARCH_RISCV_FPU_D
  61. #define ARCH_RISCV64
  62. /* RT-Thread Components */
  63. #define RT_USING_COMPONENTS_INIT
  64. #define RT_USING_USER_MAIN
  65. #define RT_MAIN_THREAD_STACK_SIZE 16384
  66. #define RT_MAIN_THREAD_PRIORITY 10
  67. #define RT_USING_MSH
  68. #define RT_USING_FINSH
  69. #define FINSH_USING_MSH
  70. #define FINSH_THREAD_NAME "tshell"
  71. #define FINSH_THREAD_PRIORITY 20
  72. #define FINSH_THREAD_STACK_SIZE 8192
  73. #define FINSH_USING_HISTORY
  74. #define FINSH_HISTORY_LINES 5
  75. #define FINSH_USING_SYMTAB
  76. #define FINSH_CMD_SIZE 80
  77. #define MSH_USING_BUILT_IN_COMMANDS
  78. #define FINSH_USING_DESCRIPTION
  79. #define FINSH_ARG_MAX 10
  80. #define FINSH_USING_OPTION_COMPLETION
  81. /* DFS: device virtual file system */
  82. #define RT_USING_DFS
  83. #define DFS_USING_POSIX
  84. #define DFS_USING_WORKDIR
  85. #define DFS_FD_MAX 32
  86. #define RT_USING_DFS_V2
  87. #define RT_USING_DFS_ELMFAT
  88. /* elm-chan's FatFs, Generic FAT Filesystem Module */
  89. #define RT_DFS_ELM_CODE_PAGE 437
  90. #define RT_DFS_ELM_WORD_ACCESS
  91. #define RT_DFS_ELM_USE_LFN_3
  92. #define RT_DFS_ELM_USE_LFN 3
  93. #define RT_DFS_ELM_LFN_UNICODE_0
  94. #define RT_DFS_ELM_LFN_UNICODE 0
  95. #define RT_DFS_ELM_MAX_LFN 255
  96. #define RT_DFS_ELM_DRIVES 8
  97. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  98. #define RT_DFS_ELM_REENTRANT
  99. #define RT_DFS_ELM_MUTEX_TIMEOUT 3000
  100. /* end of elm-chan's FatFs, Generic FAT Filesystem Module */
  101. #define RT_USING_DFS_DEVFS
  102. #define RT_USING_DFS_ROMFS
  103. #define RT_USING_DFS_PTYFS
  104. #define RT_USING_PAGECACHE
  105. /* page cache config */
  106. #define RT_PAGECACHE_COUNT 4096
  107. #define RT_PAGECACHE_ASPACE_COUNT 1024
  108. #define RT_PAGECACHE_PRELOAD 4
  109. #define RT_PAGECACHE_HASH_NR 1024
  110. #define RT_PAGECACHE_GC_WORK_LEVEL 90
  111. #define RT_PAGECACHE_GC_STOP_LEVEL 70
  112. /* end of page cache config */
  113. /* end of DFS: device virtual file system */
  114. #define RT_USING_FAL
  115. #define FAL_DEBUG_CONFIG
  116. #define FAL_DEBUG 1
  117. #define FAL_PART_HAS_TABLE_CFG
  118. /* Device Drivers */
  119. #define RT_USING_DEV_BUS
  120. #define RT_USING_DEVICE_IPC
  121. #define RT_UNAMED_PIPE_NUMBER 64
  122. #define RT_USING_SYSTEM_WORKQUEUE
  123. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 8192
  124. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  125. #define RT_USING_SERIAL
  126. #define RT_USING_SERIAL_V1
  127. #define RT_SERIAL_USING_DMA
  128. #define RT_SERIAL_RB_BUFSZ 64
  129. #define RT_USING_I2C
  130. #define RT_USING_I2C_BITOPS
  131. #define RT_USING_NULL
  132. #define RT_USING_ZERO
  133. #define RT_USING_RANDOM
  134. #define RT_USING_PWM
  135. #define RT_USING_RTC
  136. #define RT_USING_WDT
  137. #define RT_USING_TOUCH
  138. #define RT_USING_PIN
  139. #define RT_USING_KTIME
  140. #define RT_USING_HWTIMER
  141. /* end of Device Drivers */
  142. /* C/C++ and POSIX layer */
  143. /* ISO-ANSI C layer */
  144. /* Timezone and Daylight Saving Time */
  145. #define RT_LIBC_USING_LIGHT_TZ_DST
  146. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  147. #define RT_LIBC_TZ_DEFAULT_MIN 0
  148. #define RT_LIBC_TZ_DEFAULT_SEC 0
  149. /* end of Timezone and Daylight Saving Time */
  150. /* end of ISO-ANSI C layer */
  151. /* POSIX (Portable Operating System Interface) layer */
  152. #define RT_USING_POSIX_FS
  153. #define RT_USING_POSIX_DEVIO
  154. #define RT_USING_POSIX_STDIO
  155. #define RT_USING_POSIX_TERMIOS
  156. #define RT_USING_POSIX_DELAY
  157. #define RT_USING_POSIX_CLOCK
  158. #define RT_USING_POSIX_TIMER
  159. /* Interprocess Communication (IPC) */
  160. /* Socket is in the 'Network' category */
  161. /* end of Interprocess Communication (IPC) */
  162. /* end of POSIX (Portable Operating System Interface) layer */
  163. /* end of C/C++ and POSIX layer */
  164. /* Network */
  165. #define RT_USING_SAL
  166. #define SAL_INTERNET_CHECK
  167. /* Docking with protocol stacks */
  168. #define SAL_USING_LWIP
  169. /* end of Docking with protocol stacks */
  170. #define SAL_USING_POSIX
  171. #define RT_USING_NETDEV
  172. #define NETDEV_USING_IFCONFIG
  173. #define NETDEV_USING_PING
  174. #define NETDEV_USING_NETSTAT
  175. #define NETDEV_USING_AUTO_DEFAULT
  176. #define NETDEV_IPV4 1
  177. #define NETDEV_IPV6 0
  178. #define RT_USING_LWIP
  179. #define RT_USING_LWIP212
  180. #define RT_USING_LWIP_VER_NUM 0x20102
  181. #define RT_LWIP_MEM_ALIGNMENT 4
  182. #define RT_LWIP_IGMP
  183. #define RT_LWIP_ICMP
  184. #define RT_LWIP_DNS
  185. #define RT_LWIP_DHCP
  186. #define IP_SOF_BROADCAST 1
  187. #define IP_SOF_BROADCAST_RECV 1
  188. /* Static IPv4 Address */
  189. #define RT_LWIP_IPADDR "192.168.1.30"
  190. #define RT_LWIP_GWADDR "192.168.1.1"
  191. #define RT_LWIP_MSKADDR "255.255.255.0"
  192. /* end of Static IPv4 Address */
  193. #define RT_LWIP_UDP
  194. #define RT_LWIP_TCP
  195. #define RT_LWIP_RAW
  196. #define RT_MEMP_NUM_NETCONN 8
  197. #define RT_LWIP_PBUF_NUM 16
  198. #define RT_LWIP_RAW_PCB_NUM 4
  199. #define RT_LWIP_UDP_PCB_NUM 4
  200. #define RT_LWIP_TCP_PCB_NUM 4
  201. #define RT_LWIP_TCP_SEG_NUM 40
  202. #define RT_LWIP_TCP_SND_BUF 8196
  203. #define RT_LWIP_TCP_WND 8196
  204. #define RT_LWIP_TCPTHREAD_PRIORITY 10
  205. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  206. #define RT_LWIP_TCPTHREAD_STACKSIZE 8192
  207. #define RT_LWIP_ETHTHREAD_PRIORITY 12
  208. #define RT_LWIP_ETHTHREAD_STACKSIZE 8192
  209. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  210. #define RT_LWIP_REASSEMBLY_FRAG
  211. #define LWIP_NETIF_STATUS_CALLBACK 1
  212. #define LWIP_NETIF_LINK_CALLBACK 1
  213. #define RT_LWIP_NETIF_NAMESIZE 6
  214. #define SO_REUSE 1
  215. #define LWIP_SO_RCVTIMEO 1
  216. #define LWIP_SO_SNDTIMEO 1
  217. #define LWIP_SO_RCVBUF 1
  218. #define LWIP_SO_LINGER 0
  219. #define LWIP_NETIF_LOOPBACK 0
  220. #define RT_LWIP_USING_PING
  221. /* end of Network */
  222. /* Memory protection */
  223. /* end of Memory protection */
  224. /* Utilities */
  225. #define RT_USING_RESOURCE_ID
  226. #define RT_USING_ADT
  227. #define RT_USING_ADT_AVL
  228. #define RT_USING_ADT_BITMAP
  229. #define RT_USING_ADT_HASHMAP
  230. #define RT_USING_ADT_REF
  231. /* end of Utilities */
  232. #define RT_USING_LWP
  233. #define RT_LWP_MAX_NR 30
  234. #define LWP_TASK_STACK_SIZE 16384
  235. #define RT_CH_MSG_MAX_NR 1024
  236. #define LWP_CONSOLE_INPUT_BUFFER_SIZE 1024
  237. #define LWP_TID_MAX_NR 64
  238. #define RT_LWP_SHM_MAX_NR 64
  239. #define RT_USING_LDSO
  240. #define LWP_USING_TERMINAL
  241. #define LWP_PTY_MAX_PARIS_LIMIT 64
  242. /* Memory management */
  243. /* end of Memory management */
  244. /* Using USB legacy version */
  245. /* end of Using USB legacy version */
  246. /* end of RT-Thread Components */
  247. /* RT-Thread Utestcases */
  248. /* end of RT-Thread Utestcases */
  249. /* RT-Thread online packages */
  250. /* IoT - internet of things */
  251. /* Wi-Fi */
  252. /* Marvell WiFi */
  253. /* end of Marvell WiFi */
  254. /* Wiced WiFi */
  255. /* end of Wiced WiFi */
  256. /* CYW43012 WiFi */
  257. /* end of CYW43012 WiFi */
  258. /* BL808 WiFi */
  259. /* end of BL808 WiFi */
  260. /* CYW43439 WiFi */
  261. /* end of CYW43439 WiFi */
  262. /* end of Wi-Fi */
  263. /* IoT Cloud */
  264. /* end of IoT Cloud */
  265. /* end of IoT - internet of things */
  266. /* security packages */
  267. /* end of security packages */
  268. /* language packages */
  269. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  270. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  271. /* XML: Extensible Markup Language */
  272. /* end of XML: Extensible Markup Language */
  273. /* end of language packages */
  274. /* multimedia packages */
  275. /* LVGL: powerful and easy-to-use embedded GUI library */
  276. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  277. /* u8g2: a monochrome graphic library */
  278. /* end of u8g2: a monochrome graphic library */
  279. /* end of multimedia packages */
  280. /* tools packages */
  281. /* end of tools packages */
  282. /* system packages */
  283. /* enhanced kernel services */
  284. /* end of enhanced kernel services */
  285. /* acceleration: Assembly language or algorithmic acceleration packages */
  286. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  287. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  288. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  289. /* Micrium: Micrium software products porting for RT-Thread */
  290. /* end of Micrium: Micrium software products porting for RT-Thread */
  291. /* end of system packages */
  292. /* peripheral libraries and drivers */
  293. /* HAL & SDK Drivers */
  294. /* STM32 HAL & SDK Drivers */
  295. /* end of STM32 HAL & SDK Drivers */
  296. /* Kendryte SDK */
  297. /* end of Kendryte SDK */
  298. /* end of HAL & SDK Drivers */
  299. /* sensors drivers */
  300. /* end of sensors drivers */
  301. /* touch drivers */
  302. /* end of touch drivers */
  303. /* end of peripheral libraries and drivers */
  304. /* AI packages */
  305. /* end of AI packages */
  306. /* Signal Processing and Control Algorithm Packages */
  307. /* end of Signal Processing and Control Algorithm Packages */
  308. /* miscellaneous packages */
  309. /* project laboratory */
  310. /* end of project laboratory */
  311. /* samples: kernel and components samples */
  312. /* end of samples: kernel and components samples */
  313. /* entertainment: terminal games and other interesting software packages */
  314. /* end of entertainment: terminal games and other interesting software packages */
  315. /* end of miscellaneous packages */
  316. /* Arduino libraries */
  317. /* Projects and Demos */
  318. /* end of Projects and Demos */
  319. /* Sensors */
  320. /* end of Sensors */
  321. /* Display */
  322. /* end of Display */
  323. /* Timing */
  324. /* end of Timing */
  325. /* Data Processing */
  326. /* end of Data Processing */
  327. /* Data Storage */
  328. /* Communication */
  329. /* end of Communication */
  330. /* Device Control */
  331. /* end of Device Control */
  332. /* Other */
  333. /* end of Other */
  334. /* Signal IO */
  335. /* end of Signal IO */
  336. /* Uncategorized */
  337. /* end of Arduino libraries */
  338. /* end of RT-Thread online packages */
  339. #define BOARD_allwinnerd1
  340. #define ENABLE_FPU
  341. #define __STACKSIZE__ 16384
  342. /* General Drivers Configuration */
  343. #define BSP_USING_M7
  344. /* General Purpose UARTs */
  345. #define BSP_USING_UART0
  346. #define UART0_TX_USING_GPIOB8
  347. #define UART0_RX_USING_GPIOB9
  348. /* end of General Purpose UARTs */
  349. #define BSP_USING_WDT
  350. #define BSP_USING_RTC
  351. #define BSP_USING_SDMMC
  352. #define SD_CARD_CHECK
  353. #define BSP_USING_FS
  354. /* Board extended module Drivers */
  355. /* end of Board extended module Drivers */
  356. /* end of General Drivers Configuration */
  357. #define RT_USING_SUNXI_HAL
  358. /* UART Devices */
  359. #define DRIVERS_UART
  360. /* end of UART Devices */
  361. /* CCMU Devices */
  362. #define DRIVERS_CCMU
  363. #define DRIVERS_SUNXI_CLK
  364. /* end of CCMU Devices */
  365. /* DMA Devices */
  366. #define DRIVERS_DMA
  367. /* end of DMA Devices */
  368. /* GPIO Devices */
  369. #define DRIVERS_GPIO
  370. /* end of GPIO Devices */
  371. /* Video support for sunxi */
  372. /* end of Video support for sunxi */
  373. /* SDMMC Devices */
  374. /* end of SDMMC Devices */
  375. /* SPI Devices */
  376. #define DRIVERS_SPI
  377. /* end of SPI Devices */
  378. /* TWI Devices */
  379. /* end of TWI Devices */
  380. /* G2D Devices */
  381. #define DRIVERS_G2D
  382. /* end of G2D Devices */
  383. #define DRIVERS_USB
  384. /* USB HOST */
  385. /* end of USB HOST */
  386. /* USB DEVICE */
  387. #define USB_DEVICE
  388. #define HAL_TEST_UDC
  389. /* end of USB DEVICE */
  390. /* CE Devices */
  391. #define DRIVERS_CE
  392. /* end of CE Devices */
  393. /* EFUSE Devices */
  394. #define DRIVERS_EFUSE
  395. /* end of EFUSE Devices */
  396. #endif