rtconfig.h 14 KB

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