e2000q_demo_rtsmart.h 13 KB

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