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 20 76 #define RT_USING_SMART 77 #define RT_CPUS_NR 1 78 #define RT_ALIGN_SIZE 8 79 #define RT_THREAD_PRIORITY_256 80 #define RT_THREAD_PRIORITY_MAX 256 81 #define RT_TICK_PER_SECOND 100 82 #define RT_USING_HOOK 83 #define RT_HOOK_USING_FUNC_PTR 84 #define RT_USING_IDLE_HOOK 85 #define RT_IDLE_HOOK_LIST_SIZE 4 86 #define IDLE_THREAD_STACK_SIZE 16384 87 #define RT_USING_TIMER_SOFT 88 #define RT_TIMER_THREAD_PRIO 4 89 #define RT_TIMER_THREAD_STACK_SIZE 16384 90 #define RT_USING_CPU_USAGE_TRACER 91 92 /* kservice options */ 93 94 /* end of kservice options */ 95 #define RT_USING_DEBUG 96 #define RT_DEBUGING_ASSERT 97 #define RT_DEBUGING_COLOR 98 #define RT_DEBUGING_CONTEXT 99 100 /* Inter-Thread communication */ 101 102 #define RT_USING_SEMAPHORE 103 #define RT_USING_MUTEX 104 #define RT_USING_EVENT 105 #define RT_USING_MAILBOX 106 #define RT_USING_MESSAGEQUEUE 107 /* end of Inter-Thread communication */ 108 109 /* Memory Management */ 110 111 #define RT_USING_MEMPOOL 112 #define RT_USING_SMALL_MEM 113 #define RT_USING_SMALL_MEM_AS_HEAP 114 #define RT_USING_MEMTRACE 115 #define RT_USING_HEAP 116 /* end of Memory Management */ 117 #define RT_USING_DEVICE 118 #define RT_USING_DEVICE_OPS 119 #define RT_USING_CONSOLE 120 #define RT_CONSOLEBUF_SIZE 256 121 #define RT_CONSOLE_DEVICE_NAME "uart" 122 #define RT_VER_NUM 0x50201 123 #define RT_USING_STDC_ATOMIC 124 #define RT_BACKTRACE_LEVEL_MAX_NR 32 125 /* end of RT-Thread Kernel */ 126 #define ARCH_CPU_64BIT 127 #define RT_USING_CACHE 128 #define ARCH_MM_MMU 129 #define KERNEL_VADDR_START 0x150000000 130 #define ARCH_RISCV 131 #define ARCH_RISCV_FPU 132 #define ARCH_RISCV_FPU_D 133 #define ARCH_RISCV64 134 #define ARCH_USING_NEW_CTX_SWITCH 135 136 /* RT-Thread Components */ 137 138 #define RT_USING_COMPONENTS_INIT 139 #define RT_USING_USER_MAIN 140 #define RT_MAIN_THREAD_STACK_SIZE 16384 141 #define RT_MAIN_THREAD_PRIORITY 10 142 #define RT_USING_MSH 143 #define RT_USING_FINSH 144 #define FINSH_USING_MSH 145 #define FINSH_THREAD_NAME "tshell" 146 #define FINSH_THREAD_PRIORITY 20 147 #define FINSH_THREAD_STACK_SIZE 8192 148 #define FINSH_USING_HISTORY 149 #define FINSH_HISTORY_LINES 5 150 #define FINSH_USING_SYMTAB 151 #define FINSH_CMD_SIZE 80 152 #define MSH_USING_BUILT_IN_COMMANDS 153 #define FINSH_USING_DESCRIPTION 154 #define FINSH_ARG_MAX 10 155 #define FINSH_USING_OPTION_COMPLETION 156 157 /* DFS: device virtual file system */ 158 159 #define RT_USING_DFS 160 #define DFS_USING_POSIX 161 #define DFS_USING_WORKDIR 162 #define DFS_FD_MAX 32 163 #define RT_USING_DFS_V2 164 #define RT_USING_DFS_ELMFAT 165 166 /* elm-chan's FatFs, Generic FAT Filesystem Module */ 167 168 #define RT_DFS_ELM_CODE_PAGE 437 169 #define RT_DFS_ELM_WORD_ACCESS 170 #define RT_DFS_ELM_USE_LFN_3 171 #define RT_DFS_ELM_USE_LFN 3 172 #define RT_DFS_ELM_LFN_UNICODE_0 173 #define RT_DFS_ELM_LFN_UNICODE 0 174 #define RT_DFS_ELM_MAX_LFN 255 175 #define RT_DFS_ELM_DRIVES 8 176 #define RT_DFS_ELM_MAX_SECTOR_SIZE 512 177 #define RT_DFS_ELM_REENTRANT 178 #define RT_DFS_ELM_MUTEX_TIMEOUT 3000 179 /* end of elm-chan's FatFs, Generic FAT Filesystem Module */ 180 #define RT_USING_DFS_DEVFS 181 #define RT_USING_DFS_ROMFS 182 #define RT_USING_DFS_PTYFS 183 #define RT_USING_DFS_PROCFS 184 #define RT_USING_PAGECACHE 185 186 /* page cache config */ 187 188 #define RT_PAGECACHE_COUNT 4096 189 #define RT_PAGECACHE_ASPACE_COUNT 1024 190 #define RT_PAGECACHE_PRELOAD 4 191 #define RT_PAGECACHE_HASH_NR 1024 192 #define RT_PAGECACHE_GC_WORK_LEVEL 90 193 #define RT_PAGECACHE_GC_STOP_LEVEL 70 194 /* end of page cache config */ 195 /* end of DFS: device virtual file system */ 196 #define RT_USING_FAL 197 #define FAL_USING_DEBUG 198 #define FAL_PART_HAS_TABLE_CFG 199 200 /* Device Drivers */ 201 202 #define RT_USING_DEV_BUS 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_I2C 214 #define RT_USING_I2C_BITOPS 215 #define RT_USING_NULL 216 #define RT_USING_ZERO 217 #define RT_USING_RANDOM 218 #define RT_USING_PWM 219 #define RT_USING_RTC 220 #define RT_USING_WDT 221 #define RT_USING_TOUCH 222 #define RT_USING_PIN 223 #define RT_USING_KTIME 224 #define RT_USING_HWTIMER 225 /* end of Device Drivers */ 226 227 /* C/C++ and POSIX layer */ 228 229 /* ISO-ANSI C layer */ 230 231 /* Timezone and Daylight Saving Time */ 232 233 #define RT_LIBC_USING_LIGHT_TZ_DST 234 #define RT_LIBC_TZ_DEFAULT_HOUR 8 235 #define RT_LIBC_TZ_DEFAULT_MIN 0 236 #define RT_LIBC_TZ_DEFAULT_SEC 0 237 /* end of Timezone and Daylight Saving Time */ 238 /* end of ISO-ANSI C layer */ 239 240 /* POSIX (Portable Operating System Interface) layer */ 241 242 #define RT_USING_POSIX_FS 243 #define RT_USING_POSIX_DEVIO 244 #define RT_USING_POSIX_STDIO 245 #define RT_USING_POSIX_TERMIOS 246 #define RT_USING_POSIX_DELAY 247 #define RT_USING_POSIX_CLOCK 248 #define RT_USING_POSIX_TIMER 249 250 /* Interprocess Communication (IPC) */ 251 252 253 /* Socket is in the 'Network' category */ 254 255 /* end of Interprocess Communication (IPC) */ 256 /* end of POSIX (Portable Operating System Interface) layer */ 257 /* end of C/C++ and POSIX layer */ 258 259 /* Network */ 260 261 #define RT_USING_SAL 262 #define SAL_INTERNET_CHECK 263 264 /* Docking with protocol stacks */ 265 266 #define SAL_USING_LWIP 267 /* end of Docking with protocol stacks */ 268 #define SAL_USING_POSIX 269 #define RT_USING_NETDEV 270 #define NETDEV_USING_IFCONFIG 271 #define NETDEV_USING_PING 272 #define NETDEV_USING_NETSTAT 273 #define NETDEV_USING_AUTO_DEFAULT 274 #define NETDEV_IPV4 1 275 #define NETDEV_IPV6 0 276 #define RT_USING_LWIP 277 #define RT_USING_LWIP212 278 #define RT_USING_LWIP_VER_NUM 0x20102 279 #define RT_LWIP_MEM_ALIGNMENT 4 280 #define RT_LWIP_IGMP 281 #define RT_LWIP_ICMP 282 #define RT_LWIP_DNS 283 #define RT_LWIP_DHCP 284 #define IP_SOF_BROADCAST 1 285 #define IP_SOF_BROADCAST_RECV 1 286 287 /* Static IPv4 Address */ 288 289 #define RT_LWIP_IPADDR "192.168.1.30" 290 #define RT_LWIP_GWADDR "192.168.1.1" 291 #define RT_LWIP_MSKADDR "255.255.255.0" 292 /* end of Static IPv4 Address */ 293 #define RT_LWIP_UDP 294 #define RT_LWIP_TCP 295 #define RT_LWIP_RAW 296 #define RT_MEMP_NUM_NETCONN 8 297 #define RT_LWIP_PBUF_NUM 16 298 #define RT_LWIP_RAW_PCB_NUM 4 299 #define RT_LWIP_UDP_PCB_NUM 4 300 #define RT_LWIP_TCP_PCB_NUM 4 301 #define RT_LWIP_TCP_SEG_NUM 40 302 #define RT_LWIP_TCP_SND_BUF 8196 303 #define RT_LWIP_TCP_WND 8196 304 #define RT_LWIP_TCPTHREAD_PRIORITY 10 305 #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8 306 #define RT_LWIP_TCPTHREAD_STACKSIZE 8192 307 #define RT_LWIP_ETHTHREAD_PRIORITY 12 308 #define RT_LWIP_ETHTHREAD_STACKSIZE 8192 309 #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8 310 #define RT_LWIP_REASSEMBLY_FRAG 311 #define LWIP_NETIF_STATUS_CALLBACK 1 312 #define LWIP_NETIF_LINK_CALLBACK 1 313 #define RT_LWIP_NETIF_NAMESIZE 6 314 #define SO_REUSE 1 315 #define LWIP_SO_RCVTIMEO 1 316 #define LWIP_SO_SNDTIMEO 1 317 #define LWIP_SO_RCVBUF 1 318 #define LWIP_SO_LINGER 0 319 #define LWIP_NETIF_LOOPBACK 0 320 #define RT_LWIP_USING_PING 321 /* end of Network */ 322 323 /* Memory protection */ 324 325 /* end of Memory protection */ 326 327 /* Utilities */ 328 329 #define RT_USING_RESOURCE_ID 330 #define RT_USING_ADT 331 #define RT_USING_ADT_AVL 332 #define RT_USING_ADT_BITMAP 333 #define RT_USING_ADT_HASHMAP 334 #define RT_USING_ADT_REF 335 /* end of Utilities */ 336 337 /* Memory management */ 338 339 #define RT_PAGE_AFFINITY_BLOCK_SIZE 0x1000 340 #define RT_PAGE_MAX_ORDER 11 341 342 /* Debugging */ 343 344 /* end of Debugging */ 345 /* end of Memory management */ 346 #define RT_USING_LWP 347 #define LWP_USING_RUNTIME 348 #define RT_LWP_MAX_NR 30 349 #define LWP_TASK_STACK_SIZE 16384 350 #define RT_CH_MSG_MAX_NR 1024 351 #define LWP_TID_MAX_NR 64 352 #define RT_LWP_SHM_MAX_NR 64 353 #define RT_USING_LDSO 354 #define LWP_USING_TERMINAL 355 #define LWP_PTY_MAX_PARIS_LIMIT 64 356 #define RT_USING_VDSO 357 358 /* Using USB legacy version */ 359 360 /* end of Using USB legacy version */ 361 /* end of RT-Thread Components */ 362 363 /* RT-Thread Utestcases */ 364 365 /* end of RT-Thread Utestcases */ 366 367 /* RT-Thread online packages */ 368 369 /* IoT - internet of things */ 370 371 372 /* Wi-Fi */ 373 374 /* Marvell WiFi */ 375 376 /* end of Marvell WiFi */ 377 378 /* Wiced WiFi */ 379 380 /* end of Wiced WiFi */ 381 382 /* CYW43012 WiFi */ 383 384 /* end of CYW43012 WiFi */ 385 386 /* BL808 WiFi */ 387 388 /* end of BL808 WiFi */ 389 390 /* CYW43439 WiFi */ 391 392 /* end of CYW43439 WiFi */ 393 /* end of Wi-Fi */ 394 395 /* IoT Cloud */ 396 397 /* end of IoT Cloud */ 398 /* end of IoT - internet of things */ 399 400 /* security packages */ 401 402 /* end of security packages */ 403 404 /* language packages */ 405 406 /* JSON: JavaScript Object Notation, a lightweight data-interchange format */ 407 408 /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */ 409 410 /* XML: Extensible Markup Language */ 411 412 /* end of XML: Extensible Markup Language */ 413 /* end of language packages */ 414 415 /* multimedia packages */ 416 417 /* LVGL: powerful and easy-to-use embedded GUI library */ 418 419 /* end of LVGL: powerful and easy-to-use embedded GUI library */ 420 421 /* u8g2: a monochrome graphic library */ 422 423 /* end of u8g2: a monochrome graphic library */ 424 /* end of multimedia packages */ 425 426 /* tools packages */ 427 428 /* end of tools packages */ 429 430 /* system packages */ 431 432 /* enhanced kernel services */ 433 434 /* end of enhanced kernel services */ 435 436 /* acceleration: Assembly language or algorithmic acceleration packages */ 437 438 /* end of acceleration: Assembly language or algorithmic acceleration packages */ 439 440 /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ 441 442 /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ 443 444 /* Micrium: Micrium software products porting for RT-Thread */ 445 446 /* end of Micrium: Micrium software products porting for RT-Thread */ 447 #define FAL_DEBUG_CONFIG 448 /* end of system packages */ 449 450 /* peripheral libraries and drivers */ 451 452 /* HAL & SDK Drivers */ 453 454 /* STM32 HAL & SDK Drivers */ 455 456 /* end of STM32 HAL & SDK Drivers */ 457 458 /* Infineon HAL Packages */ 459 460 /* end of Infineon HAL Packages */ 461 462 /* Kendryte SDK */ 463 464 /* end of Kendryte SDK */ 465 466 /* WCH HAL & SDK Drivers */ 467 468 /* end of WCH HAL & SDK Drivers */ 469 470 /* AT32 HAL & SDK Drivers */ 471 472 /* end of AT32 HAL & SDK Drivers */ 473 474 /* HC32 DDL Drivers */ 475 476 /* end of HC32 DDL Drivers */ 477 478 /* NXP HAL & SDK Drivers */ 479 480 /* end of NXP HAL & SDK Drivers */ 481 /* end of HAL & SDK Drivers */ 482 483 /* sensors drivers */ 484 485 /* end of sensors drivers */ 486 487 /* touch drivers */ 488 489 /* end of touch drivers */ 490 /* end of peripheral libraries and drivers */ 491 492 /* AI packages */ 493 494 /* end of AI packages */ 495 496 /* Signal Processing and Control Algorithm Packages */ 497 498 /* end of Signal Processing and Control Algorithm Packages */ 499 500 /* miscellaneous packages */ 501 502 /* project laboratory */ 503 504 /* end of project laboratory */ 505 506 /* samples: kernel and components samples */ 507 508 /* end of samples: kernel and components samples */ 509 510 /* entertainment: terminal games and other interesting software packages */ 511 512 /* end of entertainment: terminal games and other interesting software packages */ 513 /* end of miscellaneous packages */ 514 515 /* Arduino libraries */ 516 517 518 /* Projects and Demos */ 519 520 /* end of Projects and Demos */ 521 522 /* Sensors */ 523 524 /* end of Sensors */ 525 526 /* Display */ 527 528 /* end of Display */ 529 530 /* Timing */ 531 532 /* end of Timing */ 533 534 /* Data Processing */ 535 536 /* end of Data Processing */ 537 538 /* Data Storage */ 539 540 /* Communication */ 541 542 /* end of Communication */ 543 544 /* Device Control */ 545 546 /* end of Device Control */ 547 548 /* Other */ 549 550 /* end of Other */ 551 552 /* Signal IO */ 553 554 /* end of Signal IO */ 555 556 /* Uncategorized */ 557 558 /* end of Arduino libraries */ 559 /* end of RT-Thread online packages */ 560 #define BOARD_allwinnerd1 561 #define ENABLE_FPU 562 #define __STACKSIZE__ 16384 563 564 /* General Drivers Configuration */ 565 566 #define BSP_USING_M7 567 568 /* General Purpose UARTs */ 569 570 #define BSP_USING_UART0 571 #define UART0_TX_USING_GPIOB8 572 #define UART0_RX_USING_GPIOB9 573 /* end of General Purpose UARTs */ 574 #define BSP_USING_WDT 575 #define BSP_USING_RTC 576 #define BSP_USING_SDMMC 577 #define SD_CARD_CHECK 578 #define BSP_USING_FS 579 580 /* Board extended module Drivers */ 581 582 /* end of Board extended module Drivers */ 583 /* end of General Drivers Configuration */ 584 #define RT_USING_SUNXI_HAL 585 586 /* UART Devices */ 587 588 #define DRIVERS_UART 589 /* end of UART Devices */ 590 591 /* CCMU Devices */ 592 593 #define DRIVERS_CCMU 594 #define DRIVERS_SUNXI_CLK 595 /* end of CCMU Devices */ 596 597 /* DMA Devices */ 598 599 #define DRIVERS_DMA 600 /* end of DMA Devices */ 601 602 /* GPIO Devices */ 603 604 #define DRIVERS_GPIO 605 /* end of GPIO Devices */ 606 607 /* Video support for sunxi */ 608 609 /* end of Video support for sunxi */ 610 611 /* SDMMC Devices */ 612 613 /* end of SDMMC Devices */ 614 615 /* SPI Devices */ 616 617 #define DRIVERS_SPI 618 /* end of SPI Devices */ 619 620 /* TWI Devices */ 621 622 /* end of TWI Devices */ 623 624 /* G2D Devices */ 625 626 #define DRIVERS_G2D 627 /* end of G2D Devices */ 628 #define DRIVERS_USB 629 630 /* USB HOST */ 631 632 /* end of USB HOST */ 633 634 /* USB DEVICE */ 635 636 #define USB_DEVICE 637 #define HAL_TEST_UDC 638 /* end of USB DEVICE */ 639 640 /* CE Devices */ 641 642 #define DRIVERS_CE 643 /* end of CE Devices */ 644 645 /* EFUSE Devices */ 646 647 #define DRIVERS_EFUSE 648 /* end of EFUSE Devices */ 649 650 #endif 651