1 #ifndef RT_CONFIG_H__ 2 #define RT_CONFIG_H__ 3 4 /* RT-Thread Kernel */ 5 6 /* klibc options */ 7 8 /* rt_vsnprintf options */ 9 10 #define RT_KLIBC_USING_VSNPRINTF_LONGLONG 11 #define RT_KLIBC_USING_VSNPRINTF_STANDARD 12 #define RT_KLIBC_USING_VSNPRINTF_DECIMAL_SPECIFIERS 13 #define RT_KLIBC_USING_VSNPRINTF_EXPONENTIAL_SPECIFIERS 14 #define RT_KLIBC_USING_VSNPRINTF_WRITEBACK_SPECIFIER 15 #define RT_KLIBC_USING_VSNPRINTF_CHECK_NUL_IN_FORMAT_SPECIFIER 16 #define RT_KLIBC_USING_VSNPRINTF_INTEGER_BUFFER_SIZE 32 17 #define RT_KLIBC_USING_VSNPRINTF_DECIMAL_BUFFER_SIZE 32 18 #define RT_KLIBC_USING_VSNPRINTF_FLOAT_PRECISION 6 19 #define RT_KLIBC_USING_VSNPRINTF_MAX_INTEGRAL_DIGITS_FOR_DECIMAL 9 20 #define RT_KLIBC_USING_VSNPRINTF_LOG10_TAYLOR_TERMS 4 21 /* end of rt_vsnprintf options */ 22 23 /* rt_vsscanf options */ 24 25 /* end of rt_vsscanf options */ 26 27 /* rt_memset options */ 28 29 /* end of rt_memset options */ 30 31 /* rt_memcpy options */ 32 33 /* end of rt_memcpy options */ 34 35 /* rt_memmove options */ 36 37 /* end of rt_memmove options */ 38 39 /* rt_memcmp options */ 40 41 /* end of rt_memcmp options */ 42 43 /* rt_strstr options */ 44 45 /* end of rt_strstr options */ 46 47 /* rt_strcasecmp options */ 48 49 /* end of rt_strcasecmp options */ 50 51 /* rt_strncpy options */ 52 53 /* end of rt_strncpy options */ 54 55 /* rt_strcpy options */ 56 57 /* end of rt_strcpy options */ 58 59 /* rt_strncmp options */ 60 61 /* end of rt_strncmp options */ 62 63 /* rt_strcmp options */ 64 65 /* end of rt_strcmp options */ 66 67 /* rt_strlen options */ 68 69 /* end of rt_strlen options */ 70 71 /* rt_strnlen options */ 72 73 /* end of rt_strnlen options */ 74 /* end of klibc options */ 75 #define RT_NAME_MAX 16 76 #define RT_USING_SMART 77 #define RT_CPUS_NR 1 78 #define RT_ALIGN_SIZE 8 79 #define RT_THREAD_PRIORITY_32 80 #define RT_THREAD_PRIORITY_MAX 32 81 #define RT_TICK_PER_SECOND 1000 82 #define RT_USING_OVERFLOW_CHECK 83 #define RT_USING_HOOK 84 #define RT_HOOK_USING_FUNC_PTR 85 #define RT_USING_HOOKLIST 86 #define RT_USING_IDLE_HOOK 87 #define RT_IDLE_HOOK_LIST_SIZE 4 88 #define IDLE_THREAD_STACK_SIZE 8192 89 #define RT_USING_TIMER_SOFT 90 #define RT_TIMER_THREAD_PRIO 4 91 #define RT_TIMER_THREAD_STACK_SIZE 8192 92 #define RT_USING_CPU_USAGE_TRACER 93 94 /* kservice options */ 95 96 /* end of kservice options */ 97 #define RT_USING_DEBUG 98 #define RT_DEBUGING_ASSERT 99 #define RT_DEBUGING_COLOR 100 #define RT_DEBUGING_CONTEXT 101 102 /* Inter-Thread communication */ 103 104 #define RT_USING_SEMAPHORE 105 #define RT_USING_MUTEX 106 #define RT_USING_EVENT 107 #define RT_USING_MAILBOX 108 #define RT_USING_MESSAGEQUEUE 109 /* end of Inter-Thread communication */ 110 111 /* Memory Management */ 112 113 #define RT_USING_MEMPOOL 114 #define RT_USING_SLAB 115 #define RT_USING_SLAB_AS_HEAP 116 #define RT_USING_HEAP 117 /* end of Memory Management */ 118 #define RT_USING_DEVICE 119 #define RT_USING_DEVICE_OPS 120 #define RT_USING_CONSOLE 121 #define RT_CONSOLEBUF_SIZE 256 122 #define RT_CONSOLE_DEVICE_NAME "uart" 123 #define RT_VER_NUM 0x50201 124 #define RT_USING_STDC_ATOMIC 125 #define RT_BACKTRACE_LEVEL_MAX_NR 32 126 /* end of RT-Thread Kernel */ 127 #define ARCH_CPU_64BIT 128 #define RT_USING_CACHE 129 #define ARCH_MM_MMU 130 #define KERNEL_VADDR_START 0xffffffc000000000 131 #define ARCH_RISCV 132 #define ARCH_RISCV_FPU 133 #define ARCH_RISCV_VECTOR 134 #define ARCH_VECTOR_VLEN_128 135 #define ARCH_RISCV_FPU_D 136 #define ARCH_RISCV64 137 #define ARCH_USING_NEW_CTX_SWITCH 138 #define ARCH_REMAP_KERNEL 139 140 /* RT-Thread Components */ 141 142 #define RT_USING_COMPONENTS_INIT 143 #define RT_USING_USER_MAIN 144 #define RT_MAIN_THREAD_STACK_SIZE 8192 145 #define RT_MAIN_THREAD_PRIORITY 10 146 #define RT_USING_MSH 147 #define RT_USING_FINSH 148 #define FINSH_USING_MSH 149 #define FINSH_THREAD_NAME "tshell" 150 #define FINSH_THREAD_PRIORITY 20 151 #define FINSH_THREAD_STACK_SIZE 8192 152 #define FINSH_USING_HISTORY 153 #define FINSH_HISTORY_LINES 5 154 #define FINSH_USING_SYMTAB 155 #define FINSH_CMD_SIZE 80 156 #define MSH_USING_BUILT_IN_COMMANDS 157 #define FINSH_USING_DESCRIPTION 158 #define FINSH_ARG_MAX 10 159 #define FINSH_USING_OPTION_COMPLETION 160 161 /* DFS: device virtual file system */ 162 163 #define RT_USING_DFS 164 #define DFS_USING_POSIX 165 #define DFS_USING_WORKDIR 166 #define DFS_FD_MAX 16 167 #define RT_USING_DFS_V2 168 #define RT_USING_DFS_ELMFAT 169 170 /* elm-chan's FatFs, Generic FAT Filesystem Module */ 171 172 #define RT_DFS_ELM_CODE_PAGE 437 173 #define RT_DFS_ELM_WORD_ACCESS 174 #define RT_DFS_ELM_USE_LFN_3 175 #define RT_DFS_ELM_USE_LFN 3 176 #define RT_DFS_ELM_LFN_UNICODE_0 177 #define RT_DFS_ELM_LFN_UNICODE 0 178 #define RT_DFS_ELM_MAX_LFN 255 179 #define RT_DFS_ELM_DRIVES 2 180 #define RT_DFS_ELM_MAX_SECTOR_SIZE 512 181 #define RT_DFS_ELM_REENTRANT 182 #define RT_DFS_ELM_MUTEX_TIMEOUT 3000 183 /* end of elm-chan's FatFs, Generic FAT Filesystem Module */ 184 #define RT_USING_DFS_DEVFS 185 #define RT_USING_DFS_PTYFS 186 #define RT_USING_DFS_CROMFS 187 #define RT_USING_DFS_TMPFS 188 #define RT_USING_PAGECACHE 189 190 /* page cache config */ 191 192 #define RT_PAGECACHE_COUNT 4096 193 #define RT_PAGECACHE_ASPACE_COUNT 1024 194 #define RT_PAGECACHE_PRELOAD 4 195 #define RT_PAGECACHE_HASH_NR 1024 196 #define RT_PAGECACHE_GC_WORK_LEVEL 90 197 #define RT_PAGECACHE_GC_STOP_LEVEL 70 198 /* end of page cache config */ 199 /* end of DFS: device virtual file system */ 200 201 /* Device Drivers */ 202 203 #define RT_USING_DEVICE_IPC 204 #define RT_UNAMED_PIPE_NUMBER 64 205 #define RT_USING_SYSTEM_WORKQUEUE 206 #define RT_SYSTEM_WORKQUEUE_STACKSIZE 8192 207 #define RT_SYSTEM_WORKQUEUE_PRIORITY 23 208 #define RT_USING_SERIAL 209 #define RT_USING_SERIAL_V1 210 #define RT_SERIAL_USING_DMA 211 #define RT_SERIAL_RB_BUFSZ 64 212 #define RT_USING_SERIAL_BYPASS 213 #define RT_USING_CPUTIME 214 #define RT_USING_CPUTIME_RISCV 215 #define CPUTIME_TIMER_FREQ 25000000 216 #define RT_USING_NULL 217 #define RT_USING_ZERO 218 #define RT_USING_RANDOM 219 #define RT_USING_RTC 220 #define RT_USING_SDIO 221 #define RT_SDIO_STACK_SIZE 8192 222 #define RT_SDIO_THREAD_PRIORITY 15 223 #define RT_MMCSD_STACK_SIZE 8192 224 #define RT_MMCSD_THREAD_PRIORITY 22 225 #define RT_MMCSD_MAX_PARTITION 16 226 #define RT_USING_BLK 227 228 /* Partition Types */ 229 230 #define RT_BLK_PARTITION_DFS 231 #define RT_BLK_PARTITION_EFI 232 /* end of Partition Types */ 233 #define RT_USING_PIN 234 #define RT_USING_KTIME 235 /* end of Device Drivers */ 236 237 /* C/C++ and POSIX layer */ 238 239 /* ISO-ANSI C layer */ 240 241 /* Timezone and Daylight Saving Time */ 242 243 #define RT_LIBC_USING_LIGHT_TZ_DST 244 #define RT_LIBC_TZ_DEFAULT_HOUR 8 245 #define RT_LIBC_TZ_DEFAULT_MIN 0 246 #define RT_LIBC_TZ_DEFAULT_SEC 0 247 /* end of Timezone and Daylight Saving Time */ 248 /* end of ISO-ANSI C layer */ 249 250 /* POSIX (Portable Operating System Interface) layer */ 251 252 #define RT_USING_POSIX_FS 253 #define RT_USING_POSIX_DEVIO 254 #define RT_USING_POSIX_STDIO 255 #define RT_USING_POSIX_POLL 256 #define RT_USING_POSIX_SELECT 257 #define RT_USING_POSIX_EPOLL 258 #define RT_USING_POSIX_SIGNALFD 259 #define RT_SIGNALFD_MAX_NUM 10 260 #define RT_USING_POSIX_SOCKET 261 #define RT_USING_POSIX_TERMIOS 262 #define RT_USING_POSIX_DELAY 263 #define RT_USING_POSIX_CLOCK 264 #define RT_USING_POSIX_TIMER 265 266 /* Interprocess Communication (IPC) */ 267 268 269 /* Socket is in the 'Network' category */ 270 271 /* end of Interprocess Communication (IPC) */ 272 /* end of POSIX (Portable Operating System Interface) layer */ 273 /* end of C/C++ and POSIX layer */ 274 275 /* Network */ 276 277 #define RT_USING_SAL 278 #define SAL_INTERNET_CHECK 279 280 /* Docking with protocol stacks */ 281 282 #define SAL_USING_LWIP 283 /* end of Docking with protocol stacks */ 284 #define SAL_USING_POSIX 285 #define RT_USING_NETDEV 286 #define NETDEV_USING_IFCONFIG 287 #define NETDEV_USING_PING 288 #define NETDEV_USING_NETSTAT 289 #define NETDEV_USING_AUTO_DEFAULT 290 #define NETDEV_IPV4 1 291 #define NETDEV_IPV6 0 292 #define RT_USING_LWIP 293 #define RT_USING_LWIP212 294 #define RT_USING_LWIP_VER_NUM 0x20102 295 #define RT_LWIP_MEM_ALIGNMENT 8 296 #define RT_LWIP_IGMP 297 #define RT_LWIP_ICMP 298 #define RT_LWIP_DNS 299 #define RT_LWIP_DHCP 300 #define IP_SOF_BROADCAST 1 301 #define IP_SOF_BROADCAST_RECV 1 302 303 /* Static IPv4 Address */ 304 305 #define RT_LWIP_IPADDR "192.168.1.30" 306 #define RT_LWIP_GWADDR "192.168.1.1" 307 #define RT_LWIP_MSKADDR "255.255.255.0" 308 /* end of Static IPv4 Address */ 309 #define RT_LWIP_UDP 310 #define RT_LWIP_TCP 311 #define RT_LWIP_RAW 312 #define RT_MEMP_NUM_NETCONN 8 313 #define RT_LWIP_PBUF_NUM 16 314 #define RT_LWIP_RAW_PCB_NUM 4 315 #define RT_LWIP_UDP_PCB_NUM 4 316 #define RT_LWIP_TCP_PCB_NUM 4 317 #define RT_LWIP_TCP_SEG_NUM 40 318 #define RT_LWIP_TCP_SND_BUF 8196 319 #define RT_LWIP_TCP_WND 8196 320 #define RT_LWIP_TCPTHREAD_PRIORITY 10 321 #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8 322 #define RT_LWIP_TCPTHREAD_STACKSIZE 8192 323 #define RT_LWIP_ETHTHREAD_PRIORITY 12 324 #define RT_LWIP_ETHTHREAD_STACKSIZE 8192 325 #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8 326 #define LWIP_NETIF_STATUS_CALLBACK 1 327 #define LWIP_NETIF_LINK_CALLBACK 1 328 #define RT_LWIP_NETIF_NAMESIZE 6 329 #define SO_REUSE 1 330 #define LWIP_SO_RCVTIMEO 1 331 #define LWIP_SO_SNDTIMEO 1 332 #define LWIP_SO_RCVBUF 1 333 #define LWIP_SO_LINGER 0 334 #define LWIP_NETIF_LOOPBACK 0 335 #define RT_LWIP_USING_PING 336 /* end of Network */ 337 338 /* Memory protection */ 339 340 /* end of Memory protection */ 341 342 /* Utilities */ 343 344 #define RT_USING_RESOURCE_ID 345 #define RT_USING_ADT 346 #define RT_USING_ADT_AVL 347 #define RT_USING_ADT_BITMAP 348 #define RT_USING_ADT_HASHMAP 349 #define RT_USING_ADT_REF 350 /* end of Utilities */ 351 352 /* Memory management */ 353 354 #define RT_PAGE_AFFINITY_BLOCK_SIZE 0x1000 355 #define RT_PAGE_MAX_ORDER 11 356 357 /* Debugging */ 358 359 /* end of Debugging */ 360 /* end of Memory management */ 361 #define RT_USING_LWP 362 #define LWP_DEBUG 363 #define LWP_DEBUG_INIT 364 #define LWP_USING_RUNTIME 365 #define RT_LWP_MAX_NR 30 366 #define LWP_TASK_STACK_SIZE 16384 367 #define RT_CH_MSG_MAX_NR 1024 368 #define LWP_TID_MAX_NR 64 369 #define RT_LWP_SHM_MAX_NR 64 370 #define RT_USING_LDSO 371 #define LWP_USING_TERMINAL 372 #define LWP_PTY_MAX_PARIS_LIMIT 64 373 #define RT_USING_VDSO 374 375 /* Using USB legacy version */ 376 377 /* end of Using USB legacy version */ 378 /* end of RT-Thread Components */ 379 380 /* RT-Thread Utestcases */ 381 382 /* end of RT-Thread Utestcases */ 383 384 /* RT-Thread online packages */ 385 386 /* IoT - internet of things */ 387 388 389 /* Wi-Fi */ 390 391 /* Marvell WiFi */ 392 393 /* end of Marvell WiFi */ 394 395 /* Wiced WiFi */ 396 397 /* end of Wiced WiFi */ 398 399 /* CYW43012 WiFi */ 400 401 /* end of CYW43012 WiFi */ 402 403 /* BL808 WiFi */ 404 405 /* end of BL808 WiFi */ 406 407 /* CYW43439 WiFi */ 408 409 /* end of CYW43439 WiFi */ 410 /* end of Wi-Fi */ 411 412 /* IoT Cloud */ 413 414 /* end of IoT Cloud */ 415 /* end of IoT - internet of things */ 416 417 /* security packages */ 418 419 /* end of security packages */ 420 421 /* language packages */ 422 423 /* JSON: JavaScript Object Notation, a lightweight data-interchange format */ 424 425 /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */ 426 427 /* XML: Extensible Markup Language */ 428 429 /* end of XML: Extensible Markup Language */ 430 /* end of language packages */ 431 432 /* multimedia packages */ 433 434 /* LVGL: powerful and easy-to-use embedded GUI library */ 435 436 /* end of LVGL: powerful and easy-to-use embedded GUI library */ 437 438 /* u8g2: a monochrome graphic library */ 439 440 /* end of u8g2: a monochrome graphic library */ 441 /* end of multimedia packages */ 442 443 /* tools packages */ 444 445 /* end of tools packages */ 446 447 /* system packages */ 448 449 /* enhanced kernel services */ 450 451 /* end of enhanced kernel services */ 452 453 /* acceleration: Assembly language or algorithmic acceleration packages */ 454 455 /* end of acceleration: Assembly language or algorithmic acceleration packages */ 456 457 /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ 458 459 /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ 460 461 /* Micrium: Micrium software products porting for RT-Thread */ 462 463 /* end of Micrium: Micrium software products porting for RT-Thread */ 464 /* end of system packages */ 465 466 /* peripheral libraries and drivers */ 467 468 /* HAL & SDK Drivers */ 469 470 /* STM32 HAL & SDK Drivers */ 471 472 /* end of STM32 HAL & SDK Drivers */ 473 474 /* Infineon HAL Packages */ 475 476 /* end of Infineon HAL Packages */ 477 478 /* Kendryte SDK */ 479 480 /* end of Kendryte SDK */ 481 482 /* WCH HAL & SDK Drivers */ 483 484 /* end of WCH HAL & SDK Drivers */ 485 486 /* AT32 HAL & SDK Drivers */ 487 488 /* end of AT32 HAL & SDK Drivers */ 489 490 /* HC32 DDL Drivers */ 491 492 /* end of HC32 DDL Drivers */ 493 494 /* NXP HAL & SDK Drivers */ 495 496 /* end of NXP HAL & SDK Drivers */ 497 /* end of HAL & SDK Drivers */ 498 499 /* sensors drivers */ 500 501 /* end of sensors drivers */ 502 503 /* touch drivers */ 504 505 /* end of touch drivers */ 506 /* end of peripheral libraries and drivers */ 507 508 /* AI packages */ 509 510 /* end of AI packages */ 511 512 /* Signal Processing and Control Algorithm Packages */ 513 514 /* end of Signal Processing and Control Algorithm Packages */ 515 516 /* miscellaneous packages */ 517 518 /* project laboratory */ 519 520 /* end of project laboratory */ 521 522 /* samples: kernel and components samples */ 523 524 /* end of samples: kernel and components samples */ 525 526 /* entertainment: terminal games and other interesting software packages */ 527 528 /* end of entertainment: terminal games and other interesting software packages */ 529 #define PKG_USING_ZLIB 530 #define PKG_USING_ZLIB_LATEST_VERSION 531 /* end of miscellaneous packages */ 532 533 /* Arduino libraries */ 534 535 536 /* Projects and Demos */ 537 538 /* end of Projects and Demos */ 539 540 /* Sensors */ 541 542 /* end of Sensors */ 543 544 /* Display */ 545 546 /* end of Display */ 547 548 /* Timing */ 549 550 /* end of Timing */ 551 552 /* Data Processing */ 553 554 /* end of Data Processing */ 555 556 /* Data Storage */ 557 558 /* Communication */ 559 560 /* end of Communication */ 561 562 /* Device Control */ 563 564 /* end of Device Control */ 565 566 /* Other */ 567 568 /* end of Other */ 569 570 /* Signal IO */ 571 572 /* end of Signal IO */ 573 574 /* Uncategorized */ 575 576 /* end of Arduino libraries */ 577 /* end of RT-Thread online packages */ 578 579 /* Drivers Configuration */ 580 581 #define BSP_USING_HARDLOCK 582 #define BSP_USING_SDIO 583 #define BSP_USING_SDIO0 584 #define BSP_SD_MNT_DEVNAME "sd0p1" 585 /* end of Drivers Configuration */ 586 #define BOARD_C908 587 #define __STACKSIZE__ 65536 588 #define BSP_ROOTFS_TYPE_ELMFAT 589 #define BSP_RISCV_FPU_D 590 591 #endif 592