e2000q_demo_rtthread.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  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 4
  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 4096
  16. #define SYSTEM_THREAD_STACK_SIZE 4096
  17. #define RT_USING_TIMER_SOFT
  18. #define RT_TIMER_THREAD_PRIO 4
  19. #define RT_TIMER_THREAD_STACK_SIZE 4096
  20. /* kservice optimization */
  21. /* end of kservice optimization */
  22. /* klibc optimization */
  23. /* end of klibc optimization */
  24. #define RT_USING_DEBUG
  25. #define RT_DEBUGING_ASSERT
  26. #define RT_DEBUGING_COLOR
  27. #define RT_DEBUGING_CONTEXT
  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. #define RT_USING_MESSAGEQUEUE_PRIORITY
  36. /* end of Inter-Thread communication */
  37. /* Memory Management */
  38. #define RT_PAGE_MAX_ORDER 11
  39. #define RT_USING_SLAB
  40. #define RT_USING_MEMHEAP
  41. #define RT_MEMHEAP_FAST_MODE
  42. #define RT_USING_SLAB_AS_HEAP
  43. #define RT_USING_HEAP_ISR
  44. #define RT_USING_HEAP
  45. /* end of Memory Management */
  46. #define RT_USING_DEVICE
  47. #define RT_USING_SCHED_THREAD_CTX
  48. #define RT_USING_CONSOLE
  49. #define RT_CONSOLEBUF_SIZE 256
  50. #define RT_CONSOLE_DEVICE_NAME "uart1"
  51. #define RT_VER_NUM 0x50200
  52. #define RT_USING_STDC_ATOMIC
  53. #define RT_BACKTRACE_LEVEL_MAX_NR 32
  54. /* end of RT-Thread Kernel */
  55. #define RT_USING_CACHE
  56. #define RT_USING_HW_ATOMIC
  57. #define RT_USING_CPU_FFS
  58. #define ARCH_MM_MMU
  59. #define ARCH_ARM
  60. #define ARCH_ARM_MMU
  61. #define ARCH_ARM_CORTEX_A
  62. #define RT_USING_GIC_V3
  63. /* RT-Thread Components */
  64. #define RT_USING_COMPONENTS_INIT
  65. #define RT_USING_USER_MAIN
  66. #define RT_MAIN_THREAD_STACK_SIZE 8192
  67. #define RT_MAIN_THREAD_PRIORITY 10
  68. #define RT_USING_MSH
  69. #define RT_USING_FINSH
  70. #define FINSH_USING_MSH
  71. #define FINSH_THREAD_NAME "tshell"
  72. #define FINSH_THREAD_PRIORITY 20
  73. #define FINSH_THREAD_STACK_SIZE 4096
  74. #define FINSH_USING_HISTORY
  75. #define FINSH_HISTORY_LINES 5
  76. #define FINSH_USING_SYMTAB
  77. #define FINSH_CMD_SIZE 80
  78. #define MSH_USING_BUILT_IN_COMMANDS
  79. #define FINSH_USING_DESCRIPTION
  80. #define FINSH_ARG_MAX 10
  81. #define FINSH_USING_OPTION_COMPLETION
  82. /* DFS: device virtual file system */
  83. #define RT_USING_DFS
  84. #define DFS_USING_POSIX
  85. #define DFS_USING_WORKDIR
  86. #define DFS_FD_MAX 16
  87. #define RT_USING_DFS_V1
  88. #define DFS_FILESYSTEMS_MAX 4
  89. #define DFS_FILESYSTEM_TYPES_MAX 4
  90. #define RT_USING_DFS_ELMFAT
  91. /* elm-chan's FatFs, Generic FAT Filesystem Module */
  92. #define RT_DFS_ELM_CODE_PAGE 437
  93. #define RT_DFS_ELM_WORD_ACCESS
  94. #define RT_DFS_ELM_USE_LFN_3
  95. #define RT_DFS_ELM_USE_LFN 3
  96. #define RT_DFS_ELM_LFN_UNICODE_0
  97. #define RT_DFS_ELM_LFN_UNICODE 0
  98. #define RT_DFS_ELM_MAX_LFN 255
  99. #define RT_DFS_ELM_DRIVES 2
  100. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  101. #define RT_DFS_ELM_REENTRANT
  102. #define RT_DFS_ELM_MUTEX_TIMEOUT 3000
  103. /* end of elm-chan's FatFs, Generic FAT Filesystem Module */
  104. #define RT_USING_DFS_DEVFS
  105. #define RT_USING_DFS_RAMFS
  106. #define RT_USING_DFS_MQUEUE
  107. /* end of DFS: device virtual file system */
  108. /* Device Drivers */
  109. #define RT_USING_DEV_BUS
  110. #define RT_USING_DEVICE_IPC
  111. #define RT_UNAMED_PIPE_NUMBER 64
  112. #define RT_USING_SYSTEM_WORKQUEUE
  113. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 4096
  114. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  115. #define RT_USING_SERIAL
  116. #define RT_USING_SERIAL_V1
  117. #define RT_SERIAL_USING_DMA
  118. #define RT_SERIAL_RB_BUFSZ 1024
  119. #define RT_USING_CAN
  120. #define RT_CAN_USING_CANFD
  121. #define RT_USING_I2C
  122. #define RT_USING_I2C_BITOPS
  123. #define RT_USING_NULL
  124. #define RT_USING_ZERO
  125. #define RT_USING_RANDOM
  126. #define RT_USING_PWM
  127. #define RT_USING_RTC
  128. #define RT_USING_SDIO
  129. #define RT_SDIO_STACK_SIZE 4096
  130. #define RT_SDIO_THREAD_PRIORITY 15
  131. #define RT_MMCSD_STACK_SIZE 4096
  132. #define RT_MMCSD_THREAD_PREORITY 22
  133. #define RT_MMCSD_MAX_PARTITION 16
  134. #define RT_USING_SPI
  135. #define RT_USING_QSPI
  136. #define RT_USING_PIN
  137. #define RT_USING_KTIME
  138. /* end of Device Drivers */
  139. /* C/C++ and POSIX layer */
  140. /* ISO-ANSI C layer */
  141. /* Timezone and Daylight Saving Time */
  142. #define RT_LIBC_USING_LIGHT_TZ_DST
  143. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  144. #define RT_LIBC_TZ_DEFAULT_MIN 0
  145. #define RT_LIBC_TZ_DEFAULT_SEC 0
  146. /* end of Timezone and Daylight Saving Time */
  147. /* end of ISO-ANSI C layer */
  148. /* POSIX (Portable Operating System Interface) layer */
  149. #define RT_USING_POSIX_FS
  150. #define RT_USING_POSIX_DEVIO
  151. #define RT_USING_POSIX_STDIO
  152. #define RT_USING_POSIX_POLL
  153. #define RT_USING_POSIX_SELECT
  154. #define RT_USING_POSIX_TERMIOS
  155. #define RT_USING_POSIX_AIO
  156. #define RT_USING_POSIX_DELAY
  157. #define RT_USING_POSIX_CLOCK
  158. #define RT_USING_POSIX_TIMER
  159. /* Interprocess Communication (IPC) */
  160. #define RT_USING_POSIX_PIPE
  161. #define RT_USING_POSIX_PIPE_SIZE 512
  162. #define RT_USING_POSIX_MESSAGE_QUEUE
  163. #define RT_USING_POSIX_MESSAGE_SEMAPHORE
  164. /* Socket is in the 'Network' category */
  165. /* end of Interprocess Communication (IPC) */
  166. /* end of POSIX (Portable Operating System Interface) layer */
  167. /* end of C/C++ and POSIX layer */
  168. /* Network */
  169. #define RT_USING_SAL
  170. #define SAL_INTERNET_CHECK
  171. /* Docking with protocol stacks */
  172. #define SAL_USING_LWIP
  173. /* end of Docking with protocol stacks */
  174. #define SAL_USING_POSIX
  175. #define RT_USING_NETDEV
  176. #define NETDEV_USING_IFCONFIG
  177. #define NETDEV_USING_PING
  178. #define NETDEV_USING_NETSTAT
  179. #define NETDEV_USING_AUTO_DEFAULT
  180. #define NETDEV_IPV4 1
  181. #define NETDEV_IPV6 0
  182. #define RT_USING_LWIP
  183. #define RT_USING_LWIP212
  184. #define RT_USING_LWIP_VER_NUM 0x20102
  185. #define RT_LWIP_MEM_ALIGNMENT 64
  186. #define RT_LWIP_IGMP
  187. #define RT_LWIP_ICMP
  188. #define RT_LWIP_DNS
  189. /* Static IPv4 Address */
  190. #define RT_LWIP_IPADDR "192.168.4.10"
  191. #define RT_LWIP_GWADDR "192.168.4.1"
  192. #define RT_LWIP_MSKADDR "255.255.255.0"
  193. /* end of Static IPv4 Address */
  194. #define RT_LWIP_UDP
  195. #define RT_LWIP_TCP
  196. #define RT_LWIP_RAW
  197. #define RT_MEMP_NUM_NETCONN 8
  198. #define RT_LWIP_PBUF_NUM 512
  199. #define RT_LWIP_RAW_PCB_NUM 4
  200. #define RT_LWIP_UDP_PCB_NUM 4
  201. #define RT_LWIP_TCP_PCB_NUM 4
  202. #define RT_LWIP_TCP_SEG_NUM 40
  203. #define RT_LWIP_TCP_SND_BUF 8196
  204. #define RT_LWIP_TCP_WND 8196
  205. #define RT_LWIP_TCPTHREAD_PRIORITY 16
  206. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  207. #define RT_LWIP_TCPTHREAD_STACKSIZE 16184
  208. #define RT_LWIP_ETHTHREAD_PRIORITY 12
  209. #define RT_LWIP_ETHTHREAD_STACKSIZE 8192
  210. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  211. #define RT_LWIP_REASSEMBLY_FRAG
  212. #define LWIP_NETIF_STATUS_CALLBACK 1
  213. #define LWIP_NETIF_LINK_CALLBACK 1
  214. #define RT_LWIP_NETIF_NAMESIZE 6
  215. #define SO_REUSE 1
  216. #define LWIP_SO_RCVTIMEO 1
  217. #define LWIP_SO_SNDTIMEO 1
  218. #define LWIP_SO_RCVBUF 1
  219. #define LWIP_SO_LINGER 0
  220. #define LWIP_NETIF_LOOPBACK 0
  221. #define RT_LWIP_USING_PING
  222. /* end of Network */
  223. /* Memory protection */
  224. /* end of Memory protection */
  225. /* Utilities */
  226. #define RT_USING_RYM
  227. #define YMODEM_USING_FILE_TRANSFER
  228. #define RT_USING_UTEST
  229. #define UTEST_THR_STACK_SIZE 4096
  230. #define UTEST_THR_PRIORITY 20
  231. #define RT_USING_RESOURCE_ID
  232. #define RT_USING_ADT
  233. #define RT_USING_ADT_AVL
  234. #define RT_USING_ADT_BITMAP
  235. #define RT_USING_ADT_HASHMAP
  236. #define RT_USING_ADT_REF
  237. /* end of Utilities */
  238. /* Using USB legacy version */
  239. /* end of Using USB legacy version */
  240. /* end of RT-Thread Components */
  241. /* RT-Thread Utestcases */
  242. /* end of RT-Thread Utestcases */
  243. /* RT-Thread online packages */
  244. /* IoT - internet of things */
  245. /* Wi-Fi */
  246. /* Marvell WiFi */
  247. /* end of Marvell WiFi */
  248. /* Wiced WiFi */
  249. /* end of Wiced WiFi */
  250. /* CYW43012 WiFi */
  251. /* end of CYW43012 WiFi */
  252. /* BL808 WiFi */
  253. /* end of BL808 WiFi */
  254. /* CYW43439 WiFi */
  255. /* end of CYW43439 WiFi */
  256. /* end of Wi-Fi */
  257. /* IoT Cloud */
  258. /* end of IoT Cloud */
  259. /* end of IoT - internet of things */
  260. /* security packages */
  261. /* end of security packages */
  262. /* language packages */
  263. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  264. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  265. /* XML: Extensible Markup Language */
  266. /* end of XML: Extensible Markup Language */
  267. /* end of language packages */
  268. /* multimedia packages */
  269. /* LVGL: powerful and easy-to-use embedded GUI library */
  270. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  271. /* u8g2: a monochrome graphic library */
  272. /* end of u8g2: a monochrome graphic library */
  273. /* end of multimedia packages */
  274. /* tools packages */
  275. /* end of tools packages */
  276. /* system packages */
  277. /* enhanced kernel services */
  278. /* end of enhanced kernel services */
  279. /* acceleration: Assembly language or algorithmic acceleration packages */
  280. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  281. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  282. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  283. /* Micrium: Micrium software products porting for RT-Thread */
  284. /* end of Micrium: Micrium software products porting for RT-Thread */
  285. /* end of system packages */
  286. /* peripheral libraries and drivers */
  287. /* HAL & SDK Drivers */
  288. /* STM32 HAL & SDK Drivers */
  289. /* end of STM32 HAL & SDK Drivers */
  290. /* Kendryte SDK */
  291. /* end of Kendryte SDK */
  292. /* end of HAL & SDK Drivers */
  293. /* sensors drivers */
  294. /* end of sensors drivers */
  295. /* touch drivers */
  296. /* end of touch drivers */
  297. /* end of peripheral libraries and drivers */
  298. /* AI packages */
  299. /* end of AI packages */
  300. /* Signal Processing and Control Algorithm Packages */
  301. /* end of Signal Processing and Control Algorithm Packages */
  302. /* miscellaneous packages */
  303. /* project laboratory */
  304. /* end of project laboratory */
  305. /* samples: kernel and components samples */
  306. /* end of samples: kernel and components samples */
  307. /* entertainment: terminal games and other interesting software packages */
  308. /* end of entertainment: terminal games and other interesting software packages */
  309. /* end of miscellaneous packages */
  310. /* Arduino libraries */
  311. /* Projects and Demos */
  312. /* end of Projects and Demos */
  313. /* Sensors */
  314. /* end of Sensors */
  315. /* Display */
  316. /* end of Display */
  317. /* Timing */
  318. /* end of Timing */
  319. /* Data Processing */
  320. /* end of Data Processing */
  321. /* Data Storage */
  322. /* Communication */
  323. /* end of Communication */
  324. /* Device Control */
  325. /* end of Device Control */
  326. /* Other */
  327. /* end of Other */
  328. /* Signal IO */
  329. /* end of Signal IO */
  330. /* Uncategorized */
  331. /* end of Arduino libraries */
  332. /* end of RT-Thread online packages */
  333. /* Hardware Drivers */
  334. /* On-chip Peripheral Drivers */
  335. #define BSP_USING_IOPAD
  336. #define BSP_USING_UART
  337. #define RT_USING_UART0
  338. #define RT_USING_UART1
  339. #define BSP_USING_SPI
  340. #define RT_USING_SPIM2
  341. #define BSP_USING_CAN
  342. #define RT_USING_CANFD
  343. #define RT_USING_CAN0
  344. #define RT_USING_CAN1
  345. #define BSP_USING_GPIO
  346. #define BSP_USING_QSPI
  347. #define RT_USING_QSPI0
  348. #define USING_QSPI_CHANNEL0
  349. #define BSP_USING_ETH
  350. #define RT_LWIP_PBUF_POOL_BUFSIZE 1700
  351. #define BSP_USING_PWM
  352. #define RT_USING_PWM2
  353. #define BSP_USING_I2C
  354. #define I2C_USE_MIO
  355. #define RT_USING_MIO15
  356. #define BSP_USING_SDIF
  357. #define BSP_USING_SDCARD_FATFS
  358. #define USING_SDIF0
  359. #define USE_SDIF0_EMMC
  360. #define USING_SDIF1
  361. #define USE_SDIF1_TF
  362. #define BSP_USING_DC
  363. #define RT_USING_DC_CHANNEL0
  364. #define RT_USING_DC_CHANNEL1
  365. /* end of On-chip Peripheral Drivers */
  366. /* Board extended module Drivers */
  367. /* end of Hardware Drivers */
  368. #define PHYTIUM_ARCH_AARCH32
  369. /* Standalone Setting */
  370. #define TARGET_ARMV8_AARCH32
  371. #define USE_AARCH64_L1_TO_AARCH32
  372. /* Soc configuration */
  373. #define TARGET_E2000Q
  374. #define SOC_NAME "e2000"
  375. #define TARGET_TYPE_NAME "q"
  376. #define SOC_CORE_NUM 4
  377. #define F32BIT_MEMORY_ADDRESS 0x80000000
  378. #define F32BIT_MEMORY_LENGTH 0x80000000
  379. #define F64BIT_MEMORY_ADDRESS 0x2000000000
  380. #define F64BIT_MEMORY_LENGTH 0x800000000
  381. #define TARGET_E2000
  382. #define DEFAULT_DEBUG_PRINT_UART1
  383. /* end of Soc configuration */
  384. /* Board Configuration */
  385. #define BOARD_NAME "demo"
  386. #define E2000Q_DEMO_BOARD
  387. /* IO mux configuration when board start up */
  388. /* end of IO mux configuration when board start up */
  389. /* end of Board Configuration */
  390. /* Sdk common configuration */
  391. #define ELOG_LINE_BUF_SIZE 0x100
  392. #define LOG_ERROR
  393. #define USE_DEFAULT_INTERRUPT_CONFIG
  394. #define INTERRUPT_ROLE_MASTER
  395. /* end of Sdk common configuration */
  396. /* end of Standalone Setting */
  397. #endif