rtconfig.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  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 1024
  15. /* kservice optimization */
  16. /* end of kservice optimization */
  17. /* klibc optimization */
  18. /* end of klibc optimization */
  19. #define RT_USING_DEBUG
  20. #define RT_DEBUGING_ASSERT
  21. #define RT_DEBUGING_COLOR
  22. #define RT_DEBUGING_CONTEXT
  23. #define RT_USING_OVERFLOW_CHECK
  24. /* Inter-Thread communication */
  25. #define RT_USING_SEMAPHORE
  26. #define RT_USING_MUTEX
  27. #define RT_USING_EVENT
  28. #define RT_USING_MAILBOX
  29. #define RT_USING_MESSAGEQUEUE
  30. #define RT_USING_SIGNALS
  31. /* end of Inter-Thread communication */
  32. /* Memory Management */
  33. #define RT_USING_MEMPOOL
  34. #define RT_USING_SMALL_MEM
  35. #define RT_USING_SMALL_MEM_AS_HEAP
  36. #define RT_USING_HEAP
  37. /* end of Memory Management */
  38. #define RT_USING_DEVICE
  39. #define RT_USING_CONSOLE
  40. #define RT_CONSOLEBUF_SIZE 256
  41. #define RT_CONSOLE_DEVICE_NAME "uart0"
  42. #define RT_VER_NUM 0x50200
  43. #define RT_BACKTRACE_LEVEL_MAX_NR 32
  44. /* end of RT-Thread Kernel */
  45. #define RT_USING_HW_ATOMIC
  46. #define RT_USING_CPU_FFS
  47. #define ARCH_ARM
  48. #define ARCH_ARM_CORTEX_M
  49. #define ARCH_ARM_CORTEX_M4
  50. /* RT-Thread Components */
  51. #define RT_USING_COMPONENTS_INIT
  52. #define RT_USING_USER_MAIN
  53. #define RT_MAIN_THREAD_STACK_SIZE 2048
  54. #define RT_MAIN_THREAD_PRIORITY 10
  55. #define RT_USING_MSH
  56. #define RT_USING_FINSH
  57. #define FINSH_USING_MSH
  58. #define FINSH_THREAD_NAME "tshell"
  59. #define FINSH_THREAD_PRIORITY 20
  60. #define FINSH_THREAD_STACK_SIZE 2048
  61. #define FINSH_USING_HISTORY
  62. #define FINSH_HISTORY_LINES 5
  63. #define FINSH_USING_SYMTAB
  64. #define FINSH_CMD_SIZE 80
  65. #define MSH_USING_BUILT_IN_COMMANDS
  66. #define FINSH_USING_DESCRIPTION
  67. #define FINSH_ARG_MAX 10
  68. #define FINSH_USING_OPTION_COMPLETION
  69. /* DFS: device virtual file system */
  70. #define RT_USING_DFS
  71. #define DFS_USING_POSIX
  72. #define DFS_USING_WORKDIR
  73. #define RT_USING_DFS_MNTTABLE
  74. #define DFS_FD_MAX 32
  75. #define RT_USING_DFS_V1
  76. #define DFS_FILESYSTEMS_MAX 8
  77. #define DFS_FILESYSTEM_TYPES_MAX 4
  78. #define RT_USING_DFS_ELMFAT
  79. /* elm-chan's FatFs, Generic FAT Filesystem Module */
  80. #define RT_DFS_ELM_CODE_PAGE 437
  81. #define RT_DFS_ELM_WORD_ACCESS
  82. #define RT_DFS_ELM_USE_LFN_3
  83. #define RT_DFS_ELM_USE_LFN 3
  84. #define RT_DFS_ELM_LFN_UNICODE_0
  85. #define RT_DFS_ELM_LFN_UNICODE 0
  86. #define RT_DFS_ELM_MAX_LFN 255
  87. #define RT_DFS_ELM_DRIVES 8
  88. #define RT_DFS_ELM_MAX_SECTOR_SIZE 4096
  89. #define RT_DFS_ELM_REENTRANT
  90. #define RT_DFS_ELM_MUTEX_TIMEOUT 3000
  91. /* end of elm-chan's FatFs, Generic FAT Filesystem Module */
  92. #define RT_USING_DFS_DEVFS
  93. /* end of DFS: device virtual file system */
  94. #define RT_USING_FAL
  95. #define FAL_DEBUG_CONFIG
  96. #define FAL_DEBUG 1
  97. #define FAL_PART_HAS_TABLE_CFG
  98. /* Device Drivers */
  99. #define RT_USING_DEVICE_IPC
  100. #define RT_UNAMED_PIPE_NUMBER 64
  101. #define RT_USING_SYSTEM_WORKQUEUE
  102. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048
  103. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  104. #define RT_USING_SERIAL
  105. #define RT_USING_SERIAL_V1
  106. #define RT_SERIAL_USING_DMA
  107. #define RT_SERIAL_RB_BUFSZ 128
  108. #define RT_USING_CAN
  109. #define RT_USING_I2C
  110. #define RT_USING_I2C_BITOPS
  111. #define RT_USING_ADC
  112. #define RT_USING_PWM
  113. #define RT_USING_PM
  114. #define PM_TICKLESS_THRESHOLD_TIME 2
  115. #define RT_USING_RTC
  116. #define RT_USING_SDIO
  117. #define RT_SDIO_STACK_SIZE 2048
  118. #define RT_SDIO_THREAD_PRIORITY 15
  119. #define RT_MMCSD_STACK_SIZE 2048
  120. #define RT_MMCSD_THREAD_PRIORITY 22
  121. #define RT_MMCSD_MAX_PARTITION 16
  122. #define RT_USING_SPI
  123. #define RT_USING_QSPI
  124. #define RT_USING_SFUD
  125. #define RT_SFUD_USING_SFDP
  126. #define RT_SFUD_USING_FLASH_INFO_TABLE
  127. #define RT_SFUD_SPI_MAX_HZ 50000000
  128. #define RT_USING_WDT
  129. #define RT_USING_AUDIO
  130. #define RT_AUDIO_REPLAY_MP_BLOCK_SIZE 4096
  131. #define RT_AUDIO_REPLAY_MP_BLOCK_COUNT 2
  132. #define RT_AUDIO_RECORD_PIPE_SIZE 2048
  133. #define RT_USING_HWCRYPTO
  134. #define RT_HWCRYPTO_DEFAULT_NAME "hwcryto"
  135. #define RT_HWCRYPTO_IV_MAX_SIZE 16
  136. #define RT_HWCRYPTO_KEYBIT_MAX_SIZE 256
  137. #define RT_HWCRYPTO_USING_AES
  138. #define RT_HWCRYPTO_USING_AES_ECB
  139. #define RT_HWCRYPTO_USING_AES_CBC
  140. #define RT_HWCRYPTO_USING_AES_CFB
  141. #define RT_HWCRYPTO_USING_AES_CTR
  142. #define RT_HWCRYPTO_USING_AES_OFB
  143. #define RT_HWCRYPTO_USING_DES
  144. #define RT_HWCRYPTO_USING_DES_ECB
  145. #define RT_HWCRYPTO_USING_DES_CBC
  146. #define RT_HWCRYPTO_USING_3DES
  147. #define RT_HWCRYPTO_USING_3DES_ECB
  148. #define RT_HWCRYPTO_USING_3DES_CBC
  149. #define RT_HWCRYPTO_USING_SHA1
  150. #define RT_HWCRYPTO_USING_SHA2
  151. #define RT_HWCRYPTO_USING_SHA2_224
  152. #define RT_HWCRYPTO_USING_SHA2_256
  153. #define RT_HWCRYPTO_USING_SHA2_384
  154. #define RT_HWCRYPTO_USING_SHA2_512
  155. #define RT_HWCRYPTO_USING_RNG
  156. #define RT_HWCRYPTO_USING_CRC
  157. #define RT_HWCRYPTO_USING_CRC_07
  158. #define RT_HWCRYPTO_USING_CRC_8005
  159. #define RT_HWCRYPTO_USING_CRC_1021
  160. #define RT_HWCRYPTO_USING_CRC_04C11DB7
  161. #define RT_USING_PIN
  162. #define RT_USING_HWTIMER
  163. /* end of Device Drivers */
  164. /* C/C++ and POSIX layer */
  165. /* ISO-ANSI C layer */
  166. /* Timezone and Daylight Saving Time */
  167. #define RT_LIBC_USING_LIGHT_TZ_DST
  168. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  169. #define RT_LIBC_TZ_DEFAULT_MIN 0
  170. #define RT_LIBC_TZ_DEFAULT_SEC 0
  171. /* end of Timezone and Daylight Saving Time */
  172. /* end of ISO-ANSI C layer */
  173. /* POSIX (Portable Operating System Interface) layer */
  174. #define RT_USING_POSIX_FS
  175. #define RT_USING_POSIX_DEVIO
  176. /* Interprocess Communication (IPC) */
  177. /* Socket is in the 'Network' category */
  178. /* end of Interprocess Communication (IPC) */
  179. /* end of POSIX (Portable Operating System Interface) layer */
  180. /* end of C/C++ and POSIX layer */
  181. /* Network */
  182. #define RT_USING_SAL
  183. #define SAL_INTERNET_CHECK
  184. /* Docking with protocol stacks */
  185. #define SAL_USING_LWIP
  186. /* end of Docking with protocol stacks */
  187. #define SAL_USING_POSIX
  188. #define RT_USING_NETDEV
  189. #define NETDEV_USING_IFCONFIG
  190. #define NETDEV_USING_PING
  191. #define NETDEV_USING_NETSTAT
  192. #define NETDEV_USING_AUTO_DEFAULT
  193. #define NETDEV_IPV4 1
  194. #define NETDEV_IPV6 0
  195. #define RT_USING_LWIP
  196. #define RT_USING_LWIP203
  197. #define RT_USING_LWIP_VER_NUM 0x20003
  198. #define RT_LWIP_MEM_ALIGNMENT 4
  199. #define RT_LWIP_IGMP
  200. #define RT_LWIP_ICMP
  201. #define RT_LWIP_DNS
  202. #define RT_LWIP_DHCP
  203. #define IP_SOF_BROADCAST 1
  204. #define IP_SOF_BROADCAST_RECV 1
  205. /* Static IPv4 Address */
  206. #define RT_LWIP_IPADDR "192.168.1.30"
  207. #define RT_LWIP_GWADDR "192.168.1.1"
  208. #define RT_LWIP_MSKADDR "255.255.255.0"
  209. /* end of Static IPv4 Address */
  210. #define RT_LWIP_UDP
  211. #define RT_LWIP_TCP
  212. #define RT_LWIP_RAW
  213. #define RT_MEMP_NUM_NETCONN 8
  214. #define RT_LWIP_PBUF_NUM 16
  215. #define RT_LWIP_RAW_PCB_NUM 4
  216. #define RT_LWIP_UDP_PCB_NUM 4
  217. #define RT_LWIP_TCP_PCB_NUM 4
  218. #define RT_LWIP_TCP_SEG_NUM 40
  219. #define RT_LWIP_TCP_SND_BUF 8196
  220. #define RT_LWIP_TCP_WND 8196
  221. #define RT_LWIP_TCPTHREAD_PRIORITY 10
  222. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  223. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  224. #define RT_LWIP_ETHTHREAD_PRIORITY 12
  225. #define RT_LWIP_ETHTHREAD_STACKSIZE 1024
  226. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  227. #define LWIP_NETIF_STATUS_CALLBACK 1
  228. #define LWIP_NETIF_LINK_CALLBACK 1
  229. #define RT_LWIP_NETIF_NAMESIZE 6
  230. #define SO_REUSE 1
  231. #define LWIP_SO_RCVTIMEO 1
  232. #define LWIP_SO_SNDTIMEO 1
  233. #define LWIP_SO_RCVBUF 1
  234. #define LWIP_SO_LINGER 0
  235. #define LWIP_NETIF_LOOPBACK 0
  236. #define RT_LWIP_USING_PING
  237. /* end of Network */
  238. /* Memory protection */
  239. /* end of Memory protection */
  240. /* Utilities */
  241. #define RT_USING_UTEST
  242. #define UTEST_THR_STACK_SIZE 4096
  243. #define UTEST_THR_PRIORITY 20
  244. /* end of Utilities */
  245. /* Using USB legacy version */
  246. #define RT_USING_USB
  247. #define RT_USING_USB_HOST
  248. #define RT_USBH_MSTORAGE
  249. #define UDISK_MOUNTPOINT "/mnt/udisk/"
  250. #define RT_USING_USB_DEVICE
  251. #define RT_USBD_THREAD_STACK_SZ 4096
  252. #define USB_VENDOR_ID 0x0FFE
  253. #define USB_PRODUCT_ID 0x0001
  254. #define _RT_USB_DEVICE_HID
  255. #define RT_USB_DEVICE_HID
  256. #define RT_USB_DEVICE_HID_MOUSE
  257. /* end of Using USB legacy version */
  258. /* end of RT-Thread Components */
  259. /* RT-Thread Utestcases */
  260. /* end of RT-Thread Utestcases */
  261. /* RT-Thread online packages */
  262. /* IoT - internet of things */
  263. /* Wi-Fi */
  264. /* Marvell WiFi */
  265. /* end of Marvell WiFi */
  266. /* Wiced WiFi */
  267. /* end of Wiced WiFi */
  268. /* CYW43012 WiFi */
  269. /* end of CYW43012 WiFi */
  270. /* BL808 WiFi */
  271. /* end of BL808 WiFi */
  272. /* CYW43439 WiFi */
  273. /* end of CYW43439 WiFi */
  274. /* end of Wi-Fi */
  275. /* IoT Cloud */
  276. /* end of IoT Cloud */
  277. /* end of IoT - internet of things */
  278. /* security packages */
  279. /* end of security packages */
  280. /* language packages */
  281. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  282. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  283. /* XML: Extensible Markup Language */
  284. /* end of XML: Extensible Markup Language */
  285. /* end of language packages */
  286. /* multimedia packages */
  287. /* LVGL: powerful and easy-to-use embedded GUI library */
  288. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  289. /* u8g2: a monochrome graphic library */
  290. /* end of u8g2: a monochrome graphic library */
  291. /* end of multimedia packages */
  292. /* tools packages */
  293. /* end of tools packages */
  294. /* system packages */
  295. /* enhanced kernel services */
  296. /* end of enhanced kernel services */
  297. /* acceleration: Assembly language or algorithmic acceleration packages */
  298. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  299. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  300. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  301. /* Micrium: Micrium software products porting for RT-Thread */
  302. /* end of Micrium: Micrium software products porting for RT-Thread */
  303. /* end of system packages */
  304. /* peripheral libraries and drivers */
  305. /* HAL & SDK Drivers */
  306. /* STM32 HAL & SDK Drivers */
  307. /* end of STM32 HAL & SDK Drivers */
  308. /* Infineon HAL Packages */
  309. /* end of Infineon HAL Packages */
  310. /* Kendryte SDK */
  311. /* end of Kendryte SDK */
  312. /* end of HAL & SDK Drivers */
  313. /* sensors drivers */
  314. /* end of sensors drivers */
  315. /* touch drivers */
  316. /* end of touch drivers */
  317. /* end of peripheral libraries and drivers */
  318. /* AI packages */
  319. /* end of AI packages */
  320. /* Signal Processing and Control Algorithm Packages */
  321. /* end of Signal Processing and Control Algorithm Packages */
  322. /* miscellaneous packages */
  323. /* project laboratory */
  324. /* end of project laboratory */
  325. /* samples: kernel and components samples */
  326. /* end of samples: kernel and components samples */
  327. /* entertainment: terminal games and other interesting software packages */
  328. /* end of entertainment: terminal games and other interesting software packages */
  329. /* end of miscellaneous packages */
  330. /* Arduino libraries */
  331. /* Projects and Demos */
  332. /* end of Projects and Demos */
  333. /* Sensors */
  334. /* end of Sensors */
  335. /* Display */
  336. /* end of Display */
  337. /* Timing */
  338. /* end of Timing */
  339. /* Data Processing */
  340. /* end of Data Processing */
  341. /* Data Storage */
  342. /* Communication */
  343. /* end of Communication */
  344. /* Device Control */
  345. /* end of Device Control */
  346. /* Other */
  347. /* end of Other */
  348. /* Signal IO */
  349. /* end of Signal IO */
  350. /* Uncategorized */
  351. /* end of Arduino libraries */
  352. /* end of RT-Thread online packages */
  353. /* Hardware Drivers Config */
  354. /* On-chip Peripheral Drivers */
  355. #define SOC_SERIES_M480
  356. #define BSP_USE_STDDRIVER_SOURCE
  357. #define BSP_USING_PDMA
  358. #define NU_PDMA_MEMFUN_ACTOR_MAX 2
  359. #define NU_PDMA_SGTBL_POOL_SIZE 16
  360. #define BSP_USING_FMC
  361. #define BSP_USING_GPIO
  362. #define BSP_USING_CLK
  363. #define NU_CLK_INVOKE_WKTMR
  364. #define BSP_USING_EMAC
  365. #define NU_EMAC_PDMA_MEMCOPY
  366. #define NU_EMAC_PDMA_MEMCOPY_THRESHOLD 128
  367. #define BSP_USING_RTC
  368. #define NU_RTC_SUPPORT_MSH_CMD
  369. #define BSP_USING_TMR
  370. #define BSP_USING_UART
  371. #define BSP_USING_UART0
  372. #define BSP_USING_I2C
  373. #define BSP_USING_I2C1
  374. #define BSP_USING_I2C2
  375. #define BSP_USING_SDH
  376. #define BSP_USING_SDH0
  377. #define BSP_USING_SPI
  378. #define BSP_USING_SPI_PDMA
  379. #define BSP_USING_SPI0_NONE
  380. #define BSP_USING_SPI1_NONE
  381. #define BSP_USING_SPI2_NONE
  382. #define BSP_USING_SPI3
  383. #define BSP_USING_I2S
  384. #define NU_I2S_DMA_FIFO_SIZE 2048
  385. #define BSP_USING_QSPI
  386. #define BSP_USING_QSPI0
  387. #define BSP_USING_QSPI0_PDMA
  388. #define BSP_USING_CRYPTO
  389. #define BSP_USING_CRC
  390. #define NU_CRC_USE_PDMA
  391. #define BSP_USING_WDT
  392. #define BSP_USING_USBD
  393. #define BSP_USING_HSUSBH
  394. #define NU_USBHOST_HUB_POLLING_INTERVAL 100
  395. /* end of On-chip Peripheral Drivers */
  396. /* On-board Peripheral Drivers */
  397. #define BSP_USING_NULINKME
  398. #define BOARD_USING_IP101GR
  399. #define BOARD_USING_NAU88L25
  400. #define BOARD_USING_STORAGE_SDCARD
  401. #define BOARD_USING_STORAGE_SPIFLASH
  402. #define BOARD_USING_USB_D_H
  403. #define BOARD_USING_HSUSBH_USBD
  404. /* end of On-board Peripheral Drivers */
  405. /* Board extended module drivers */
  406. /* end of Board extended module drivers */
  407. /* Nuvoton Packages Config */
  408. #define NU_PKG_USING_UTILS
  409. #define NU_PKG_USING_DEMO
  410. #define NU_PKG_USING_NAU88L25
  411. /* end of Nuvoton Packages Config */
  412. /* end of Hardware Drivers Config */
  413. #endif