rtconfig.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. #ifndef RT_CONFIG_H__
  2. #define RT_CONFIG_H__
  3. /* RT-Thread Kernel */
  4. #define RT_NAME_MAX 16
  5. #define RT_USING_SMP
  6. #define RT_CPUS_NR 2
  7. #define RT_ALIGN_SIZE 4
  8. #define RT_THREAD_PRIORITY_32
  9. #define RT_THREAD_PRIORITY_MAX 32
  10. #define RT_TICK_PER_SECOND 1000
  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 8192
  16. #define SYSTEM_THREAD_STACK_SIZE 8192
  17. #define RT_USING_TIMER_SOFT
  18. #define RT_TIMER_THREAD_PRIO 4
  19. #define RT_TIMER_THREAD_STACK_SIZE 8192
  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_USING_OVERFLOW_CHECK
  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 16
  38. #define RT_USING_SLAB
  39. #define RT_USING_MEMHEAP
  40. #define RT_MEMHEAP_FAST_MODE
  41. #define RT_USING_SLAB_AS_HEAP
  42. #define RT_USING_HEAP_ISR
  43. #define RT_USING_HEAP
  44. /* end of Memory Management */
  45. #define RT_USING_DEVICE
  46. #define RT_USING_SCHED_THREAD_CTX
  47. #define RT_USING_CONSOLE
  48. #define RT_CONSOLEBUF_SIZE 128
  49. #define RT_CONSOLE_DEVICE_NAME "uart1"
  50. #define RT_VER_NUM 0x50200
  51. #define RT_BACKTRACE_LEVEL_MAX_NR 32
  52. /* end of RT-Thread Kernel */
  53. /* AArch64 Architecture Configuration */
  54. #define ARCH_TEXT_OFFSET 0x80000
  55. #define ARCH_RAM_OFFSET 0x80000000
  56. #define ARCH_SECONDARY_CPU_STACK_SIZE 4096
  57. #define ARCH_HAVE_EFFICIENT_UNALIGNED_ACCESS
  58. #define ARCH_HEAP_SIZE 0x4000000
  59. #define ARCH_INIT_PAGE_SIZE 0x200000
  60. /* end of AArch64 Architecture Configuration */
  61. #define ARCH_CPU_64BIT
  62. #define RT_USING_CACHE
  63. #define RT_USING_HW_ATOMIC
  64. #define ARCH_ARM_BOOTWITH_FLUSH_CACHE
  65. #define RT_USING_CPU_FFS
  66. #define ARCH_MM_MMU
  67. #define ARCH_ARM
  68. #define ARCH_ARM_MMU
  69. #define ARCH_ARMV8
  70. /* RT-Thread Components */
  71. #define RT_USING_COMPONENTS_INIT
  72. #define RT_USING_USER_MAIN
  73. #define RT_MAIN_THREAD_STACK_SIZE 8192
  74. #define RT_MAIN_THREAD_PRIORITY 10
  75. #define RT_USING_MSH
  76. #define RT_USING_FINSH
  77. #define FINSH_USING_MSH
  78. #define FINSH_THREAD_NAME "tshell"
  79. #define FINSH_THREAD_PRIORITY 20
  80. #define FINSH_THREAD_STACK_SIZE 4096
  81. #define FINSH_USING_HISTORY
  82. #define FINSH_HISTORY_LINES 5
  83. #define FINSH_USING_SYMTAB
  84. #define FINSH_CMD_SIZE 80
  85. #define MSH_USING_BUILT_IN_COMMANDS
  86. #define FINSH_USING_DESCRIPTION
  87. #define FINSH_ARG_MAX 10
  88. #define FINSH_USING_OPTION_COMPLETION
  89. /* DFS: device virtual file system */
  90. #define RT_USING_DFS
  91. #define DFS_USING_POSIX
  92. #define DFS_USING_WORKDIR
  93. #define DFS_FD_MAX 16
  94. #define RT_USING_DFS_V1
  95. #define DFS_FILESYSTEMS_MAX 4
  96. #define DFS_FILESYSTEM_TYPES_MAX 4
  97. #define RT_USING_DFS_ELMFAT
  98. /* elm-chan's FatFs, Generic FAT Filesystem Module */
  99. #define RT_DFS_ELM_CODE_PAGE 437
  100. #define RT_DFS_ELM_WORD_ACCESS
  101. #define RT_DFS_ELM_USE_LFN_3
  102. #define RT_DFS_ELM_USE_LFN 3
  103. #define RT_DFS_ELM_LFN_UNICODE_0
  104. #define RT_DFS_ELM_LFN_UNICODE 0
  105. #define RT_DFS_ELM_MAX_LFN 255
  106. #define RT_DFS_ELM_DRIVES 2
  107. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  108. #define RT_DFS_ELM_REENTRANT
  109. #define RT_DFS_ELM_MUTEX_TIMEOUT 3000
  110. /* end of elm-chan's FatFs, Generic FAT Filesystem Module */
  111. #define RT_USING_DFS_DEVFS
  112. #define RT_USING_DFS_RAMFS
  113. /* end of DFS: device virtual file system */
  114. /* Device Drivers */
  115. #define RT_USING_DEV_BUS
  116. #define RT_USING_DEVICE_IPC
  117. #define RT_UNAMED_PIPE_NUMBER 64
  118. #define RT_USING_SYSTEM_WORKQUEUE
  119. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 8192
  120. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  121. #define RT_USING_SERIAL
  122. #define RT_USING_SERIAL_V1
  123. #define RT_SERIAL_USING_DMA
  124. #define RT_SERIAL_RB_BUFSZ 64
  125. #define RT_USING_CAN
  126. #define RT_CAN_USING_HDR
  127. #define RT_CAN_USING_CANFD
  128. #define RT_USING_I2C
  129. #define RT_USING_I2C_BITOPS
  130. #define RT_USING_NULL
  131. #define RT_USING_ZERO
  132. #define RT_USING_RANDOM
  133. #define RT_USING_PWM
  134. #define RT_USING_RTC
  135. #define RT_USING_SDIO
  136. #define RT_SDIO_STACK_SIZE 8192
  137. #define RT_SDIO_THREAD_PRIORITY 15
  138. #define RT_MMCSD_STACK_SIZE 8192
  139. #define RT_MMCSD_THREAD_PRIORITY 22
  140. #define RT_MMCSD_MAX_PARTITION 16
  141. #define RT_USING_SPI
  142. #define RT_USING_QSPI
  143. #define RT_USING_BLK
  144. /* Partition Types */
  145. #define RT_BLK_PARTITION_DFS
  146. #define RT_BLK_PARTITION_EFI
  147. /* end of Partition Types */
  148. #define RT_USING_PIN
  149. #define RT_USING_KTIME
  150. #define RT_USING_CHERRYUSB
  151. #define RT_CHERRYUSB_HOST
  152. #define RT_CHERRYUSB_HOST_XHCI
  153. #define RT_CHERRYUSB_HOST_HID
  154. #define RT_CHERRYUSB_HOST_MSC
  155. #define RT_LWIP_PBUF_POOL_BUFSIZE 1700
  156. /* end of Device Drivers */
  157. /* C/C++ and POSIX layer */
  158. /* ISO-ANSI C layer */
  159. /* Timezone and Daylight Saving Time */
  160. #define RT_LIBC_USING_LIGHT_TZ_DST
  161. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  162. #define RT_LIBC_TZ_DEFAULT_MIN 0
  163. #define RT_LIBC_TZ_DEFAULT_SEC 0
  164. /* end of Timezone and Daylight Saving Time */
  165. /* end of ISO-ANSI C layer */
  166. /* POSIX (Portable Operating System Interface) layer */
  167. #define RT_USING_POSIX_FS
  168. #define RT_USING_POSIX_DEVIO
  169. #define RT_USING_POSIX_STDIO
  170. #define RT_USING_POSIX_TERMIOS
  171. #define RT_USING_POSIX_DELAY
  172. #define RT_USING_POSIX_CLOCK
  173. #define RT_USING_POSIX_TIMER
  174. /* Interprocess Communication (IPC) */
  175. /* Socket is in the 'Network' category */
  176. /* end of Interprocess Communication (IPC) */
  177. /* end of POSIX (Portable Operating System Interface) layer */
  178. /* end of C/C++ and POSIX layer */
  179. /* Network */
  180. #define RT_USING_SAL
  181. #define SAL_INTERNET_CHECK
  182. /* Docking with protocol stacks */
  183. #define SAL_USING_LWIP
  184. /* end of Docking with protocol stacks */
  185. #define SAL_USING_POSIX
  186. #define RT_USING_NETDEV
  187. #define NETDEV_USING_IFCONFIG
  188. #define NETDEV_USING_PING
  189. #define NETDEV_USING_NETSTAT
  190. #define NETDEV_USING_AUTO_DEFAULT
  191. #define NETDEV_IPV4 1
  192. #define NETDEV_IPV6 0
  193. #define RT_USING_LWIP
  194. #define RT_USING_LWIP212
  195. #define RT_USING_LWIP_VER_NUM 0x20102
  196. #define RT_LWIP_MEM_ALIGNMENT 64
  197. #define RT_LWIP_IGMP
  198. #define RT_LWIP_ICMP
  199. #define RT_LWIP_DNS
  200. /* Static IPv4 Address */
  201. #define RT_LWIP_IPADDR "192.168.4.10"
  202. #define RT_LWIP_GWADDR "192.168.4.1"
  203. #define RT_LWIP_MSKADDR "255.255.255.0"
  204. /* end of Static IPv4 Address */
  205. #define RT_LWIP_UDP
  206. #define RT_LWIP_TCP
  207. #define RT_LWIP_RAW
  208. #define RT_MEMP_NUM_NETCONN 8
  209. #define RT_LWIP_PBUF_NUM 512
  210. #define RT_LWIP_RAW_PCB_NUM 4
  211. #define RT_LWIP_UDP_PCB_NUM 4
  212. #define RT_LWIP_TCP_PCB_NUM 4
  213. #define RT_LWIP_TCP_SEG_NUM 40
  214. #define RT_LWIP_TCP_SND_BUF 8196
  215. #define RT_LWIP_TCP_WND 8196
  216. #define RT_LWIP_TCPTHREAD_PRIORITY 16
  217. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  218. #define RT_LWIP_TCPTHREAD_STACKSIZE 16184
  219. #define RT_LWIP_ETHTHREAD_PRIORITY 12
  220. #define RT_LWIP_ETHTHREAD_STACKSIZE 8192
  221. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  222. #define RT_LWIP_REASSEMBLY_FRAG
  223. #define LWIP_NETIF_STATUS_CALLBACK 1
  224. #define LWIP_NETIF_LINK_CALLBACK 1
  225. #define RT_LWIP_NETIF_NAMESIZE 6
  226. #define SO_REUSE 1
  227. #define LWIP_SO_RCVTIMEO 1
  228. #define LWIP_SO_SNDTIMEO 1
  229. #define LWIP_SO_RCVBUF 1
  230. #define LWIP_SO_LINGER 0
  231. #define LWIP_NETIF_LOOPBACK 0
  232. #define RT_LWIP_USING_PING
  233. /* end of Network */
  234. /* Memory protection */
  235. /* end of Memory protection */
  236. /* Utilities */
  237. #define RT_USING_RYM
  238. #define YMODEM_USING_FILE_TRANSFER
  239. #define RT_USING_RESOURCE_ID
  240. #define RT_USING_ADT
  241. #define RT_USING_ADT_AVL
  242. #define RT_USING_ADT_BITMAP
  243. #define RT_USING_ADT_HASHMAP
  244. #define RT_USING_ADT_REF
  245. /* end of Utilities */
  246. /* Using USB legacy version */
  247. /* end of Using USB legacy version */
  248. /* end of RT-Thread Components */
  249. /* RT-Thread Utestcases */
  250. /* end of RT-Thread Utestcases */
  251. /* RT-Thread online packages */
  252. /* IoT - internet of things */
  253. /* Wi-Fi */
  254. /* Marvell WiFi */
  255. /* end of Marvell WiFi */
  256. /* Wiced WiFi */
  257. /* end of Wiced WiFi */
  258. /* CYW43012 WiFi */
  259. /* end of CYW43012 WiFi */
  260. /* BL808 WiFi */
  261. /* end of BL808 WiFi */
  262. /* CYW43439 WiFi */
  263. /* end of CYW43439 WiFi */
  264. /* end of Wi-Fi */
  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. /* Kendryte SDK */
  299. /* end of Kendryte SDK */
  300. /* end of HAL & SDK Drivers */
  301. /* sensors drivers */
  302. /* end of sensors drivers */
  303. /* touch drivers */
  304. /* end of touch drivers */
  305. /* end of peripheral libraries and drivers */
  306. /* AI packages */
  307. /* end of AI packages */
  308. /* Signal Processing and Control Algorithm Packages */
  309. /* end of Signal Processing and Control Algorithm Packages */
  310. /* miscellaneous packages */
  311. /* project laboratory */
  312. /* end of project laboratory */
  313. /* samples: kernel and components samples */
  314. #define PKG_USING_KERNEL_SAMPLES
  315. #define PKG_USING_KERNEL_SAMPLES_LATEST_VERSION
  316. #define PKG_USING_KERNEL_SAMPLES_EN
  317. /* end of samples: kernel and components samples */
  318. /* entertainment: terminal games and other interesting software packages */
  319. /* end of entertainment: terminal games and other interesting software packages */
  320. /* end of miscellaneous packages */
  321. /* Arduino libraries */
  322. /* Projects and Demos */
  323. /* end of Projects and Demos */
  324. /* Sensors */
  325. /* end of Sensors */
  326. /* Display */
  327. /* end of Display */
  328. /* Timing */
  329. /* end of Timing */
  330. /* Data Processing */
  331. /* end of Data Processing */
  332. /* Data Storage */
  333. /* Communication */
  334. /* end of Communication */
  335. /* Device Control */
  336. /* end of Device Control */
  337. /* Other */
  338. /* end of Other */
  339. /* Signal IO */
  340. /* end of Signal IO */
  341. /* Uncategorized */
  342. /* end of Arduino libraries */
  343. /* end of RT-Thread online packages */
  344. /* Hardware Drivers */
  345. /* On-chip Peripheral Drivers */
  346. #define BSP_USING_IOPAD
  347. #define BSP_USING_UART
  348. #define RT_USING_UART0
  349. #define RT_USING_UART1
  350. #define BSP_USING_SPI
  351. #define RT_USING_SPIM2
  352. #define BSP_USING_CAN
  353. #define RT_USING_CANFD
  354. #define RT_USING_CAN0
  355. #define RT_USING_CAN1
  356. #define BSP_USING_GPIO
  357. #define BSP_USING_QSPI
  358. #define RT_USING_QSPI0
  359. #define USING_QSPI_CHANNEL0
  360. #define BSP_USING_ETH
  361. #define BSP_USING_PWM
  362. #define BSP_USING_I2C
  363. #define I2C_USE_MIO
  364. #define RT_USING_MIO15
  365. #define BSP_USING_SDIF
  366. #define BSP_USING_SDCARD_FATFS
  367. #define USING_SDIF0
  368. #define USE_SDIF0_EMMC
  369. #define USING_SDIF1
  370. #define USE_SDIF1_TF
  371. #define BSP_USING_DC
  372. #define RT_USING_DC_CHANNEL0
  373. #define RT_USING_DC_CHANNEL1
  374. /* end of On-chip Peripheral Drivers */
  375. /* Board extended module Drivers */
  376. /* end of Hardware Drivers */
  377. #define BSP_USING_GIC
  378. #define BSP_USING_GICV3
  379. #define PHYTIUM_ARCH_AARCH64
  380. #define ARM_SPI_BIND_CPU_ID 0
  381. /* Standalone Setting */
  382. #define TARGET_ARMV8_AARCH64
  383. /* Soc configuration */
  384. #define TARGET_E2000D
  385. #define SOC_NAME "e2000"
  386. #define TARGET_TYPE_NAME "d"
  387. #define SOC_CORE_NUM 2
  388. #define F32BIT_MEMORY_ADDRESS 0x80000000
  389. #define F32BIT_MEMORY_LENGTH 0x80000000
  390. #define F64BIT_MEMORY_ADDRESS 0x2000000000
  391. #define F64BIT_MEMORY_LENGTH 0x800000000
  392. #define TARGET_E2000
  393. #define DEFAULT_DEBUG_PRINT_UART1
  394. /* end of Soc configuration */
  395. /* Board Configuration */
  396. #define E2000D_DEMO_BOARD
  397. #define BOARD_NAME "demo"
  398. /* IO mux configuration when board start up */
  399. /* end of IO mux configuration when board start up */
  400. /* end of Board Configuration */
  401. /* Sdk common configuration */
  402. #define ELOG_LINE_BUF_SIZE 0x100
  403. #define LOG_DEBUG
  404. /* end of Sdk common configuration */
  405. /* end of Standalone Setting */
  406. #endif