From aa35be734e80385d15aeedf7db16a0e875d1da85 Mon Sep 17 00:00:00 2001 From: Shell Date: Sat, 6 Jul 2024 15:05:07 +0800 Subject: [PATCH 1/3] [bsp/allwinner] feat: porting to RT_USING_DEVICE_OPS This patch ports the codebase to use the RT_USING_DEVICE_OPS structure, which is required by v5.1.0 Smart kernel, improves modularity and makes it easier to manage device operations by consolidating them into a single structure, enhancing maintainability and future scalability. Changes: - Added RT_USING_DEVICE_OPS conditionals to partition.c and drv_sdmmc.c. - Defined rt_device_ops structures for partition and sdmmc drivers. - Updated device initialization to use the ops structure if defined. - Replaced direct function calls with rt_dev_control, rt_dev_read, and rt_dev_write macros where applicable. - Removed redundant us_delay function from os.c. Signed-off-by: Shell --- bsp/allwinner/d1s/.config | 496 +++++++++--------- bsp/allwinner/d1s/ports/partition/partition.c | 16 + bsp/allwinner/d1s/rtconfig.h | 145 +++-- .../libraries/drivers/sdmmc/drv_sdmmc.c | 30 +- .../libraries/drivers/sdmmc/drv_sdmmc.h | 14 + bsp/allwinner/libraries/libos/src/os.c | 12 - .../sunxi-hal/hal/source/sdmmc/blkpart.c | 35 +- 7 files changed, 416 insertions(+), 332 deletions(-) diff --git a/bsp/allwinner/d1s/.config b/bsp/allwinner/d1s/.config index 8beb51059e8..aaf02ec7a95 100644 --- a/bsp/allwinner/d1s/.config +++ b/bsp/allwinner/d1s/.config @@ -1,7 +1,3 @@ -# -# Automatically generated file; DO NOT EDIT. -# RT-Thread Project Configuration -# # # RT-Thread Kernel @@ -19,7 +15,6 @@ CONFIG_RT_THREAD_PRIORITY_32=y # CONFIG_RT_THREAD_PRIORITY_256 is not set CONFIG_RT_THREAD_PRIORITY_MAX=32 CONFIG_RT_TICK_PER_SECOND=100 -# CONFIG_RT_USING_OVERFLOW_CHECK is not set CONFIG_RT_USING_HOOK=y CONFIG_RT_HOOK_USING_FUNC_PTR=y # CONFIG_RT_USING_HOOKLIST is not set @@ -29,20 +24,30 @@ CONFIG_IDLE_THREAD_STACK_SIZE=16384 CONFIG_RT_USING_TIMER_SOFT=y CONFIG_RT_TIMER_THREAD_PRIO=4 CONFIG_RT_TIMER_THREAD_STACK_SIZE=16384 +# CONFIG_RT_USING_TIMER_ALL_SOFT is not set +CONFIG_RT_USING_CPU_USAGE_TRACER=y # # kservice optimization # -CONFIG_RT_KSERVICE_USING_STDLIB=y -# CONFIG_RT_KSERVICE_USING_STDLIB_MEMORY is not set -# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set # CONFIG_RT_USING_TINY_FFS is not set -CONFIG_RT_KPRINTF_USING_LONGLONG=y +# end of kservice optimization + +# +# klibc optimization +# +# CONFIG_RT_KLIBC_USING_STDLIB is not set +# CONFIG_RT_KLIBC_USING_TINY_SIZE is not set +CONFIG_RT_KLIBC_USING_PRINTF_LONGLONG=y +# end of klibc optimization + CONFIG_RT_USING_DEBUG=y +CONFIG_RT_DEBUGING_ASSERT=y CONFIG_RT_DEBUGING_COLOR=y CONFIG_RT_DEBUGING_CONTEXT=y # CONFIG_RT_DEBUGING_AUTO_INIT is not set # CONFIG_RT_DEBUGING_PAGE_LEAK is not set +# CONFIG_RT_USING_OVERFLOW_CHECK is not set # # Inter-Thread communication @@ -54,6 +59,7 @@ CONFIG_RT_USING_MAILBOX=y CONFIG_RT_USING_MESSAGEQUEUE=y # CONFIG_RT_USING_MESSAGEQUEUE_PRIORITY is not set # CONFIG_RT_USING_SIGNALS is not set +# end of Inter-Thread communication # # Memory Management @@ -71,23 +77,23 @@ CONFIG_RT_USING_SMALL_MEM_AS_HEAP=y CONFIG_RT_USING_MEMTRACE=y # CONFIG_RT_USING_HEAP_ISR is not set CONFIG_RT_USING_HEAP=y +# end of Memory Management + CONFIG_RT_USING_DEVICE=y -# CONFIG_RT_USING_DEVICE_OPS is not set +CONFIG_RT_USING_DEVICE_OPS=y # CONFIG_RT_USING_INTERRUPT_INFO is not set # CONFIG_RT_USING_THREADSAFE_PRINTF is not set -# CONFIG_RT_USING_SCHED_THREAD_CTX is not set +CONFIG_RT_USING_SCHED_THREAD_CTX=y CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=256 CONFIG_RT_CONSOLE_DEVICE_NAME="uart0" -CONFIG_RT_VER_NUM=0x50100 +CONFIG_RT_VER_NUM=0x50200 CONFIG_RT_USING_STDC_ATOMIC=y CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32 +# end of RT-Thread Kernel + CONFIG_ARCH_CPU_64BIT=y CONFIG_RT_USING_CACHE=y -# CONFIG_RT_USING_HW_ATOMIC is not set -# CONFIG_ARCH_ARM_BOOTWITH_FLUSH_CACHE is not set -# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set -# CONFIG_RT_USING_CPU_FFS is not set CONFIG_ARCH_MM_MMU=y CONFIG_KERNEL_VADDR_START=0x40000000 CONFIG_ARCH_RISCV=y @@ -150,10 +156,13 @@ CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=512 CONFIG_RT_DFS_ELM_REENTRANT=y CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT=3000 # CONFIG_RT_DFS_ELM_USE_EXFAT is not set +# end of elm-chan's FatFs, Generic FAT Filesystem Module + CONFIG_RT_USING_DFS_DEVFS=y # CONFIG_RT_USING_DFS_ROMFS is not set +CONFIG_RT_USING_DFS_PTYFS=y # CONFIG_RT_USING_DFS_CROMFS is not set -# CONFIG_RT_USING_DFS_TMPFS is not set +CONFIG_RT_USING_DFS_TMPFS=y # CONFIG_RT_USING_DFS_MQUEUE is not set CONFIG_RT_USING_PAGECACHE=y @@ -166,6 +175,9 @@ CONFIG_RT_PAGECACHE_PRELOAD=4 CONFIG_RT_PAGECACHE_HASH_NR=1024 CONFIG_RT_PAGECACHE_GC_WORK_LEVEL=90 CONFIG_RT_PAGECACHE_GC_STOP_LEVEL=70 +# end of page cache config +# end of DFS: device virtual file system + CONFIG_RT_USING_FAL=y CONFIG_FAL_DEBUG_CONFIG=y CONFIG_FAL_DEBUG=1 @@ -176,6 +188,7 @@ CONFIG_FAL_PART_HAS_TABLE_CFG=y # Device Drivers # # CONFIG_RT_USING_DM is not set +CONFIG_RT_USING_DEV_BUS=y CONFIG_RT_USING_DEVICE_IPC=y CONFIG_RT_UNAMED_PIPE_NUMBER=64 CONFIG_RT_USING_SYSTEM_WORKQUEUE=y @@ -185,8 +198,6 @@ CONFIG_RT_USING_SERIAL=y # CONFIG_RT_USING_SERIAL_V1 is not set CONFIG_RT_USING_SERIAL_V2=y # CONFIG_RT_SERIAL_USING_DMA is not set -CONFIG_RT_USING_TTY=y -# CONFIG_RT_TTY_DEBUG is not set # CONFIG_RT_USING_CAN is not set # CONFIG_RT_USING_CPUTIME is not set # CONFIG_RT_USING_I2C is not set @@ -197,6 +208,8 @@ CONFIG_RT_USING_NULL=y CONFIG_RT_USING_ZERO=y CONFIG_RT_USING_RANDOM=y # CONFIG_RT_USING_PWM is not set +# CONFIG_RT_USING_PULSE_ENCODER is not set +# CONFIG_RT_USING_INPUT_CAPTURE is not set # CONFIG_RT_USING_MTD_NOR is not set # CONFIG_RT_USING_MTD_NAND is not set # CONFIG_RT_USING_PM is not set @@ -211,21 +224,13 @@ CONFIG_RT_USING_WDT=y # CONFIG_RT_USING_TOUCH is not set # CONFIG_RT_USING_LCD is not set # CONFIG_RT_USING_HWCRYPTO is not set -# CONFIG_RT_USING_PULSE_ENCODER is not set -# CONFIG_RT_USING_INPUT_CAPTURE is not set -CONFIG_RT_USING_DEV_BUS=y # CONFIG_RT_USING_WIFI is not set # CONFIG_RT_USING_VIRTIO is not set CONFIG_RT_USING_PIN=y CONFIG_RT_USING_KTIME=y # CONFIG_RT_USING_HWTIMER is not set - -# -# Using USB -# -# CONFIG_RT_USING_USB is not set -# CONFIG_RT_USING_USB_HOST is not set -# CONFIG_RT_USING_USB_DEVICE is not set +# CONFIG_RT_USING_CHERRYUSB is not set +# end of Device Drivers # # C/C++ and POSIX layer @@ -243,6 +248,8 @@ CONFIG_RT_LIBC_USING_LIGHT_TZ_DST=y CONFIG_RT_LIBC_TZ_DEFAULT_HOUR=8 CONFIG_RT_LIBC_TZ_DEFAULT_MIN=0 CONFIG_RT_LIBC_TZ_DEFAULT_SEC=0 +# end of Timezone and Daylight Saving Time +# end of ISO-ANSI C layer # # POSIX (Portable Operating System Interface) layer @@ -277,7 +284,11 @@ CONFIG_RT_USING_POSIX_PIPE_SIZE=512 # # Socket is in the 'Network' category # +# end of Interprocess Communication (IPC) +# end of POSIX (Portable Operating System Interface) layer + # CONFIG_RT_USING_CPLUSPLUS is not set +# end of C/C++ and POSIX layer # # Network @@ -286,12 +297,14 @@ CONFIG_RT_USING_POSIX_PIPE_SIZE=512 # CONFIG_RT_USING_NETDEV is not set # CONFIG_RT_USING_LWIP is not set # CONFIG_RT_USING_AT is not set +# end of Network # # Memory protection # # CONFIG_RT_USING_MEM_PROTECTION is not set # CONFIG_RT_USING_HW_STACK_GUARD is not set +# end of Memory protection # # Utilities @@ -307,6 +320,8 @@ CONFIG_RT_USING_ADT_BITMAP=y CONFIG_RT_USING_ADT_HASHMAP=y CONFIG_RT_USING_ADT_REF=y # CONFIG_RT_USING_RT_LINK is not set +# end of Utilities + # CONFIG_RT_USING_VBUS is not set CONFIG_RT_USING_LWP=y # CONFIG_LWP_DEBUG is not set @@ -316,20 +331,33 @@ CONFIG_RT_CH_MSG_MAX_NR=1024 CONFIG_LWP_CONSOLE_INPUT_BUFFER_SIZE=1024 CONFIG_LWP_TID_MAX_NR=64 CONFIG_RT_LWP_SHM_MAX_NR=64 -# CONFIG_LWP_UNIX98_PTY is not set CONFIG_RT_USING_LDSO=y # CONFIG_ELF_DEBUG_ENABLE is not set # CONFIG_ELF_LOAD_RANDOMIZE is not set +CONFIG_LWP_USING_TERMINAL=y +CONFIG_LWP_PTY_MAX_PARIS_LIMIT=64 # # Memory management # # CONFIG_RT_USING_MEMBLOCK is not set +# end of Memory management + +# +# Using USB legacy version +# +# CONFIG_RT_USING_USB_HOST is not set +# CONFIG_RT_USING_USB_DEVICE is not set +# end of Using USB legacy version + +# CONFIG_RT_USING_FDT is not set +# end of RT-Thread Components # # RT-Thread Utestcases # # CONFIG_RT_USING_UTESTCASES is not set +# end of RT-Thread Utestcases # # RT-Thread online packages @@ -338,7 +366,6 @@ CONFIG_RT_USING_LDSO=y # # IoT - internet of things # -# CONFIG_PKG_USING_LWIP is not set # CONFIG_PKG_USING_LORAWAN_DRIVER is not set # CONFIG_PKG_USING_PAHOMQTT is not set # CONFIG_PKG_USING_UMQTT is not set @@ -349,6 +376,7 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_KAWAII_MQTT is not set # CONFIG_PKG_USING_BC28_MQTT is not set # CONFIG_PKG_USING_WEBTERMINAL is not set +# CONFIG_PKG_USING_LIBMODBUS is not set # CONFIG_PKG_USING_FREEMODBUS is not set # CONFIG_PKG_USING_NANOPB is not set @@ -360,27 +388,17 @@ CONFIG_RT_USING_LDSO=y # Marvell WiFi # # CONFIG_PKG_USING_WLANMARVELL is not set +# end of Marvell WiFi # # Wiced WiFi # # CONFIG_PKG_USING_WLAN_WICED is not set -# CONFIG_PKG_USING_RW007 is not set - -# -# CYW43012 WiFi -# -# CONFIG_PKG_USING_WLAN_CYW43012 is not set +# end of Wiced WiFi -# -# BL808 WiFi -# -# CONFIG_PKG_USING_WLAN_BL808 is not set +# CONFIG_PKG_USING_RW007 is not set +# end of Wi-Fi -# -# CYW43439 WiFi -# -# CONFIG_PKG_USING_WLAN_CYW43439 is not set # CONFIG_PKG_USING_COAP is not set # CONFIG_PKG_USING_NOPOLL is not set # CONFIG_PKG_USING_NETUTILS is not set @@ -402,7 +420,10 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_JIOT-C-SDK is not set # CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set # CONFIG_PKG_USING_JOYLINK is not set +# CONFIG_PKG_USING_EZ_IOT_OS is not set # CONFIG_PKG_USING_IOTSHARP_SDK is not set +# end of IoT Cloud + # CONFIG_PKG_USING_NIMBLE is not set # CONFIG_PKG_USING_LLSYNC_SDK_ADAPTER is not set # CONFIG_PKG_USING_OTA_DOWNLOADER is not set @@ -422,8 +443,6 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_NMEALIB is not set # CONFIG_PKG_USING_PDULIB is not set # CONFIG_PKG_USING_BTSTACK is not set -# CONFIG_PKG_USING_BT_CYW43012 is not set -# CONFIG_PKG_USING_CYW43XX is not set # CONFIG_PKG_USING_LORAWAN_ED_STACK is not set # CONFIG_PKG_USING_WAYZ_IOTKIT is not set # CONFIG_PKG_USING_MAVLINK is not set @@ -432,8 +451,6 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_AGILE_FTP is not set # CONFIG_PKG_USING_EMBEDDEDPROTO is not set # CONFIG_PKG_USING_RT_LINK_HW is not set -# CONFIG_PKG_USING_RYANMQTT is not set -# CONFIG_PKG_USING_RYANW5500 is not set # CONFIG_PKG_USING_LORA_PKT_FWD is not set # CONFIG_PKG_USING_LORA_GW_DRIVER_LIB is not set # CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set @@ -441,10 +458,7 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_SMALL_MODBUS is not set # CONFIG_PKG_USING_NET_SERVER is not set # CONFIG_PKG_USING_ZFTP is not set -# CONFIG_PKG_USING_WOL is not set -# CONFIG_PKG_USING_ZEPHYR_POLLING is not set -# CONFIG_PKG_USING_MATTER_ADAPTATION_LAYER is not set -# CONFIG_PKG_USING_LHC_MODBUS is not set +# end of IoT - internet of things # # security packages @@ -455,6 +469,7 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_TINYCRYPT is not set # CONFIG_PKG_USING_TFM is not set # CONFIG_PKG_USING_YD_CRYPTO is not set +# end of security packages # # language packages @@ -470,18 +485,22 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_JSMN is not set # CONFIG_PKG_USING_AGILE_JSMN is not set # CONFIG_PKG_USING_PARSON is not set +# end of JSON: JavaScript Object Notation, a lightweight data-interchange format # # XML: Extensible Markup Language # # CONFIG_PKG_USING_SIMPLE_XML is not set # CONFIG_PKG_USING_EZXML is not set +# end of XML: Extensible Markup Language + # CONFIG_PKG_USING_LUATOS_SOC is not set # CONFIG_PKG_USING_LUA is not set # CONFIG_PKG_USING_JERRYSCRIPT is not set # CONFIG_PKG_USING_MICROPYTHON is not set # CONFIG_PKG_USING_PIKASCRIPT is not set # CONFIG_PKG_USING_RTT_RUST is not set +# end of language packages # # multimedia packages @@ -491,14 +510,18 @@ CONFIG_RT_USING_LDSO=y # LVGL: powerful and easy-to-use embedded GUI library # # CONFIG_PKG_USING_LVGL is not set +# CONFIG_PKG_USING_LITTLEVGL2RTT is not set # CONFIG_PKG_USING_LV_MUSIC_DEMO is not set # CONFIG_PKG_USING_GUI_GUIDER_DEMO is not set +# end of LVGL: powerful and easy-to-use embedded GUI library # # u8g2: a monochrome graphic library # # CONFIG_PKG_USING_U8G2_OFFICIAL is not set # CONFIG_PKG_USING_U8G2 is not set +# end of u8g2: a monochrome graphic library + # CONFIG_PKG_USING_OPENMV is not set # CONFIG_PKG_USING_MUPDF is not set # CONFIG_PKG_USING_STEMWIN is not set @@ -512,12 +535,20 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_MP3PLAYER is not set # CONFIG_PKG_USING_TINYJPEG is not set # CONFIG_PKG_USING_UGUI is not set + +# +# PainterEngine: A cross-platform graphics application framework written in C language +# +# CONFIG_PKG_USING_PAINTERENGINE is not set +# CONFIG_PKG_USING_PAINTERENGINE_AUX is not set +# end of PainterEngine: A cross-platform graphics application framework written in C language + # CONFIG_PKG_USING_MCURSES is not set # CONFIG_PKG_USING_TERMBOX is not set # CONFIG_PKG_USING_VT100 is not set # CONFIG_PKG_USING_QRCODE is not set # CONFIG_PKG_USING_GUIENGINE is not set -# CONFIG_PKG_USING_3GPP_AMRNB is not set +# end of multimedia packages # # tools packages @@ -527,9 +558,9 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_EASYLOGGER is not set # CONFIG_PKG_USING_SYSTEMVIEW is not set # CONFIG_PKG_USING_SEGGER_RTT is not set -# CONFIG_PKG_USING_RTT_AUTO_EXE_CMD is not set # CONFIG_PKG_USING_RDB is not set # CONFIG_PKG_USING_ULOG_EASYFLASH is not set +# CONFIG_PKG_USING_ULOG_FILE is not set # CONFIG_PKG_USING_LOGMGR is not set # CONFIG_PKG_USING_ADBD is not set # CONFIG_PKG_USING_COREMARK is not set @@ -563,9 +594,10 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_CBOX is not set # CONFIG_PKG_USING_SNOWFLAKE is not set # CONFIG_PKG_USING_HASH_MATCH is not set +# CONFIG_PKG_USING_FIRE_PID_CURVE is not set # CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set # CONFIG_PKG_USING_VOFA_PLUS is not set -# CONFIG_PKG_USING_ZDEBUG is not set +# end of tools packages # # system packages @@ -577,6 +609,7 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_RT_MEMCPY_CM is not set # CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set # CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set +# end of enhanced kernel services # # acceleration: Assembly language or algorithmic acceleration packages @@ -584,16 +617,15 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_QFPLIB_M0_FULL is not set # CONFIG_PKG_USING_QFPLIB_M0_TINY is not set # CONFIG_PKG_USING_QFPLIB_M3 is not set +# end of acceleration: Assembly language or algorithmic acceleration packages # # CMSIS: ARM Cortex-M Microcontroller Software Interface Standard # # CONFIG_PKG_USING_CMSIS_5 is not set -# CONFIG_PKG_USING_CMSIS_CORE is not set -# CONFIG_PKG_USING_CMSIS_DSP is not set -# CONFIG_PKG_USING_CMSIS_NN is not set # CONFIG_PKG_USING_CMSIS_RTOS1 is not set # CONFIG_PKG_USING_CMSIS_RTOS2 is not set +# end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard # # Micrium: Micrium software products porting for RT-Thread @@ -604,15 +636,13 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_UC_CLK is not set # CONFIG_PKG_USING_UC_COMMON is not set # CONFIG_PKG_USING_UC_MODBUS is not set +# end of Micrium: Micrium software products porting for RT-Thread + # CONFIG_PKG_USING_FREERTOS_WRAPPER is not set -# CONFIG_PKG_USING_LITEOS_SDK is not set -# CONFIG_PKG_USING_TZ_DATABASE is not set # CONFIG_PKG_USING_CAIRO is not set # CONFIG_PKG_USING_PIXMAN is not set # CONFIG_PKG_USING_PARTITION is not set # CONFIG_PKG_USING_PERF_COUNTER is not set -# CONFIG_PKG_USING_FILEX is not set -# CONFIG_PKG_USING_LEVELX is not set # CONFIG_PKG_USING_FLASHDB is not set # CONFIG_PKG_USING_SQLITE is not set # CONFIG_PKG_USING_RTI is not set @@ -632,7 +662,6 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_QBOOT is not set # CONFIG_PKG_USING_PPOOL is not set # CONFIG_PKG_USING_OPENAMP is not set -# CONFIG_PKG_USING_RPMSG_LITE is not set # CONFIG_PKG_USING_LPM is not set # CONFIG_PKG_USING_TLSF is not set # CONFIG_PKG_USING_EVENT_RECORDER is not set @@ -644,125 +673,20 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_TFDB is not set # CONFIG_PKG_USING_QPC is not set # CONFIG_PKG_USING_AGILE_UPGRADE is not set -# CONFIG_PKG_USING_FLASH_BLOB is not set -# CONFIG_PKG_USING_MLIBC is not set -# CONFIG_PKG_USING_TASK_MSG_BUS is not set -# CONFIG_PKG_USING_SFDB is not set -# CONFIG_PKG_USING_RTP is not set -# CONFIG_PKG_USING_REB is not set -# CONFIG_PKG_USING_R_RHEALSTONE is not set +# end of system packages # # peripheral libraries and drivers # - -# -# HAL & SDK Drivers -# - -# -# STM32 HAL & SDK Drivers -# -# CONFIG_PKG_USING_STM32L4XX_HAL_DRIVER is not set -# CONFIG_PKG_USING_STM32WB55_SDK is not set -# CONFIG_PKG_USING_STM32_SDIO is not set -# CONFIG_PKG_USING_BLUETRUM_SDK is not set -# CONFIG_PKG_USING_EMBARC_BSP is not set -# CONFIG_PKG_USING_ESP_IDF is not set - -# -# Kendryte SDK -# -# CONFIG_PKG_USING_K210_SDK is not set -# CONFIG_PKG_USING_KENDRYTE_SDK is not set -# CONFIG_PKG_USING_NRF5X_SDK is not set -# CONFIG_PKG_USING_NRFX is not set -# CONFIG_PKG_USING_NUCLEI_SDK is not set -# CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set - -# -# sensors drivers -# -# CONFIG_PKG_USING_LSM6DSM is not set -# CONFIG_PKG_USING_LSM6DSL is not set -# CONFIG_PKG_USING_LPS22HB is not set -# CONFIG_PKG_USING_HTS221 is not set -# CONFIG_PKG_USING_LSM303AGR is not set -# CONFIG_PKG_USING_BME280 is not set -# CONFIG_PKG_USING_BME680 is not set -# CONFIG_PKG_USING_BMA400 is not set -# CONFIG_PKG_USING_BMI160_BMX160 is not set -# CONFIG_PKG_USING_SPL0601 is not set -# CONFIG_PKG_USING_MS5805 is not set -# CONFIG_PKG_USING_DA270 is not set -# CONFIG_PKG_USING_DF220 is not set -# CONFIG_PKG_USING_HSHCAL001 is not set -# CONFIG_PKG_USING_BH1750 is not set -# CONFIG_PKG_USING_MPU6XXX is not set -# CONFIG_PKG_USING_AHT10 is not set -# CONFIG_PKG_USING_AP3216C is not set -# CONFIG_PKG_USING_TSL4531 is not set -# CONFIG_PKG_USING_DS18B20 is not set -# CONFIG_PKG_USING_DHT11 is not set -# CONFIG_PKG_USING_DHTXX is not set -# CONFIG_PKG_USING_GY271 is not set -# CONFIG_PKG_USING_GP2Y10 is not set -# CONFIG_PKG_USING_SGP30 is not set -# CONFIG_PKG_USING_HDC1000 is not set -# CONFIG_PKG_USING_BMP180 is not set -# CONFIG_PKG_USING_BMP280 is not set -# CONFIG_PKG_USING_SHTC1 is not set -# CONFIG_PKG_USING_BMI088 is not set -# CONFIG_PKG_USING_HMC5883 is not set -# CONFIG_PKG_USING_MAX6675 is not set -# CONFIG_PKG_USING_TMP1075 is not set -# CONFIG_PKG_USING_SR04 is not set -# CONFIG_PKG_USING_CCS811 is not set -# CONFIG_PKG_USING_PMSXX is not set -# CONFIG_PKG_USING_RT3020 is not set -# CONFIG_PKG_USING_MLX90632 is not set -# CONFIG_PKG_USING_MLX90393 is not set -# CONFIG_PKG_USING_MLX90392 is not set -# CONFIG_PKG_USING_MLX90397 is not set -# CONFIG_PKG_USING_MS5611 is not set -# CONFIG_PKG_USING_MAX31865 is not set -# CONFIG_PKG_USING_VL53L0X is not set -# CONFIG_PKG_USING_INA260 is not set -# CONFIG_PKG_USING_MAX30102 is not set -# CONFIG_PKG_USING_INA226 is not set -# CONFIG_PKG_USING_LIS2DH12 is not set -# CONFIG_PKG_USING_HS300X is not set -# CONFIG_PKG_USING_ZMOD4410 is not set -# CONFIG_PKG_USING_ISL29035 is not set -# CONFIG_PKG_USING_MMC3680KJ is not set -# CONFIG_PKG_USING_QMP6989 is not set -# CONFIG_PKG_USING_BALANCE is not set +# CONFIG_PKG_USING_SENSORS_DRIVERS is not set +# CONFIG_PKG_USING_REALTEK_AMEBA is not set # CONFIG_PKG_USING_SHT2X is not set # CONFIG_PKG_USING_SHT3X is not set -# CONFIG_PKG_USING_SHT4X is not set -# CONFIG_PKG_USING_AD7746 is not set # CONFIG_PKG_USING_ADT74XX is not set -# CONFIG_PKG_USING_MAX17048 is not set # CONFIG_PKG_USING_AS7341 is not set -# CONFIG_PKG_USING_CW2015 is not set +# CONFIG_PKG_USING_STM32_SDIO is not set +# CONFIG_PKG_USING_ESP_IDF is not set # CONFIG_PKG_USING_ICM20608 is not set -# CONFIG_PKG_USING_PAJ7620 is not set -# CONFIG_PKG_USING_STHS34PF80 is not set - -# -# touch drivers -# -# CONFIG_PKG_USING_GT9147 is not set -# CONFIG_PKG_USING_GT1151 is not set -# CONFIG_PKG_USING_GT917S is not set -# CONFIG_PKG_USING_GT911 is not set -# CONFIG_PKG_USING_FT6206 is not set -# CONFIG_PKG_USING_FT5426 is not set -# CONFIG_PKG_USING_FT6236 is not set -# CONFIG_PKG_USING_XPT2046_TOUCH is not set -# CONFIG_PKG_USING_CST816X is not set -# CONFIG_PKG_USING_CST812T is not set -# CONFIG_PKG_USING_REALTEK_AMEBA is not set # CONFIG_PKG_USING_BUTTON is not set # CONFIG_PKG_USING_PCF8574 is not set # CONFIG_PKG_USING_SX12XX is not set @@ -770,29 +694,45 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_LEDBLINK is not set # CONFIG_PKG_USING_LITTLED is not set # CONFIG_PKG_USING_LKDGUI is not set +# CONFIG_PKG_USING_NRF5X_SDK is not set +# CONFIG_PKG_USING_NRFX is not set +# CONFIG_PKG_USING_WM_LIBRARIES is not set + +# +# Kendryte SDK +# +# CONFIG_PKG_USING_K210_SDK is not set +# CONFIG_PKG_USING_KENDRYTE_SDK is not set +# end of Kendryte SDK + # CONFIG_PKG_USING_INFRARED is not set # CONFIG_PKG_USING_MULTI_INFRARED is not set # CONFIG_PKG_USING_AGILE_BUTTON is not set # CONFIG_PKG_USING_AGILE_LED is not set # CONFIG_PKG_USING_AT24CXX is not set # CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set +# CONFIG_PKG_USING_AD7746 is not set # CONFIG_PKG_USING_PCA9685 is not set -# CONFIG_PKG_USING_ILI9341 is not set # CONFIG_PKG_USING_I2C_TOOLS is not set # CONFIG_PKG_USING_NRF24L01 is not set +# CONFIG_PKG_USING_TOUCH_DRIVERS is not set +# CONFIG_PKG_USING_MAX17048 is not set # CONFIG_PKG_USING_RPLIDAR is not set # CONFIG_PKG_USING_AS608 is not set # CONFIG_PKG_USING_RC522 is not set # CONFIG_PKG_USING_WS2812B is not set +# CONFIG_PKG_USING_EMBARC_BSP is not set # CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set # CONFIG_PKG_USING_MULTI_RTIMER is not set # CONFIG_PKG_USING_MAX7219 is not set # CONFIG_PKG_USING_BEEP is not set # CONFIG_PKG_USING_EASYBLINK is not set # CONFIG_PKG_USING_PMS_SERIES is not set +# CONFIG_PKG_USING_NUCLEI_SDK is not set # CONFIG_PKG_USING_CAN_YMODEM is not set # CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set # CONFIG_PKG_USING_QLED is not set +# CONFIG_PKG_USING_PAJ7620 is not set # CONFIG_PKG_USING_AGILE_CONSOLE is not set # CONFIG_PKG_USING_LD3320 is not set # CONFIG_PKG_USING_WK2124 is not set @@ -806,6 +746,7 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_VIRTUAL_SENSOR is not set # CONFIG_PKG_USING_VDEVICE is not set # CONFIG_PKG_USING_SGM706 is not set +# CONFIG_PKG_USING_STM32WB55_SDK is not set # CONFIG_PKG_USING_RDA58XX is not set # CONFIG_PKG_USING_LIBNFC is not set # CONFIG_PKG_USING_MFOC is not set @@ -815,25 +756,18 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_ROSSERIAL is not set # CONFIG_PKG_USING_MICRO_ROS is not set # CONFIG_PKG_USING_MCP23008 is not set +# CONFIG_PKG_USING_BLUETRUM_SDK is not set # CONFIG_PKG_USING_MISAKA_AT24CXX is not set # CONFIG_PKG_USING_MISAKA_RGB_BLING is not set # CONFIG_PKG_USING_LORA_MODEM_DRIVER is not set +# CONFIG_PKG_USING_BL_MCU_SDK is not set # CONFIG_PKG_USING_SOFT_SERIAL is not set # CONFIG_PKG_USING_MB85RS16 is not set +# CONFIG_PKG_USING_CW2015 is not set # CONFIG_PKG_USING_RFM300 is not set # CONFIG_PKG_USING_IO_INPUT_FILTER is not set -# CONFIG_PKG_USING_LRF_NV7LIDAR is not set -# CONFIG_PKG_USING_AIP650 is not set -# CONFIG_PKG_USING_FINGERPRINT is not set -# CONFIG_PKG_USING_BT_ECB02C is not set -# CONFIG_PKG_USING_UAT is not set -# CONFIG_PKG_USING_ST7789 is not set -# CONFIG_PKG_USING_VS1003 is not set -# CONFIG_PKG_USING_X9555 is not set -# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set -# CONFIG_PKG_USING_BT_MX01 is not set -# CONFIG_PKG_USING_RGPOWER is not set -# CONFIG_PKG_USING_SPI_TOOLS is not set +# CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set +# end of peripheral libraries and drivers # # AI packages @@ -847,16 +781,7 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_ULAPACK is not set # CONFIG_PKG_USING_QUEST is not set # CONFIG_PKG_USING_NAXOS is not set -# CONFIG_PKG_USING_R_TINYMAIX is not set - -# -# Signal Processing and Control Algorithm Packages -# -# CONFIG_PKG_USING_FIRE_PID_CURVE is not set -# CONFIG_PKG_USING_QPID is not set -# CONFIG_PKG_USING_UKAL is not set -# CONFIG_PKG_USING_DIGITALCTRL is not set -# CONFIG_PKG_USING_KISSFFT is not set +# end of AI packages # # miscellaneous packages @@ -865,6 +790,7 @@ CONFIG_RT_USING_LDSO=y # # project laboratory # +# end of project laboratory # # samples: kernel and components samples @@ -873,6 +799,7 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set # CONFIG_PKG_USING_NETWORK_SAMPLES is not set # CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set +# end of samples: kernel and components samples # # entertainment: terminal games and other interesting software packages @@ -887,14 +814,14 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_TETRIS is not set # CONFIG_PKG_USING_DONUT is not set # CONFIG_PKG_USING_COWSAY is not set -# CONFIG_PKG_USING_MORSE is not set +# end of entertainment: terminal games and other interesting software packages + # CONFIG_PKG_USING_LIBCSV is not set # CONFIG_PKG_USING_OPTPARSE is not set # CONFIG_PKG_USING_FASTLZ is not set # CONFIG_PKG_USING_MINILZO is not set # CONFIG_PKG_USING_QUICKLZ is not set # CONFIG_PKG_USING_LZMA is not set -# CONFIG_PKG_USING_RALARAM is not set # CONFIG_PKG_USING_MULTIBUTTON is not set # CONFIG_PKG_USING_FLEXIBLE_BUTTON is not set # CONFIG_PKG_USING_CANFESTIVAL is not set @@ -904,12 +831,14 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_DSTR is not set # CONFIG_PKG_USING_TINYFRAME is not set # CONFIG_PKG_USING_KENDRYTE_DEMO is not set +# CONFIG_PKG_USING_DIGITALCTRL is not set # CONFIG_PKG_USING_UPACKER is not set # CONFIG_PKG_USING_UPARAM is not set # CONFIG_PKG_USING_HELLO is not set # CONFIG_PKG_USING_VI is not set # CONFIG_PKG_USING_KI is not set # CONFIG_PKG_USING_ARMv7M_DWT is not set +# CONFIG_PKG_USING_UKAL is not set # CONFIG_PKG_USING_CRCLIB is not set # CONFIG_PKG_USING_LWGPS is not set # CONFIG_PKG_USING_STATE_MACHINE is not set @@ -920,7 +849,7 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_SLCAN2RTT is not set # CONFIG_PKG_USING_SOEM is not set # CONFIG_PKG_USING_QPARAM is not set -# CONFIG_PKG_USING_CorevMCU_CLI is not set +# end of miscellaneous packages # # Arduino libraries @@ -928,29 +857,26 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_RTDUINO is not set # -# Projects and Demos +# Projects # -# CONFIG_PKG_USING_ARDUINO_MSGQ_C_CPP_DEMO is not set -# CONFIG_PKG_USING_ARDUINO_SKETCH_LOADER_DEMO is not set # CONFIG_PKG_USING_ARDUINO_ULTRASOUND_RADAR is not set -# CONFIG_PKG_USING_ARDUINO_NINEINONE_SENSOR_SHIELD is not set # CONFIG_PKG_USING_ARDUINO_SENSOR_KIT is not set # CONFIG_PKG_USING_ARDUINO_MATLAB_SUPPORT is not set +# end of Projects # # Sensors # -# CONFIG_PKG_USING_ARDUINO_SENSOR_DEVICE_DRIVERS is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SENSOR is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SENSORLAB is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_BMP280 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADXL375 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL53L0X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL53L1X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL6180X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX31855 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_LIS3DHTR is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_DHT is not set +# CONFIG_PKG_USING_ARDUINO_CAPACITIVESENSOR is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SENSOR is not set +# CONFIG_PKG_USING_ADAFRUIT_MAX31855 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX31865 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX31856 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX6675 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MLX90614 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LSM9DS1 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AHTX0 is not set @@ -992,7 +918,7 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LIS3MDL is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MLX90640 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MMA8451 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MSA301 is not set +# CONFIG_PKG_USING_ADAFRUIT_MSA301 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPL115A2 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BNO08X is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BNO08X_RVC is not set @@ -1042,65 +968,26 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VEML6070 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VEML6075 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VEML7700 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_LIS3DHTR is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_DHT is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_ADXL335 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_ADXL345 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_BME280 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_BMP280 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_H3LIS331DL is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_MMA7660 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_TSL2561 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_PAJ7620 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_VL53L0X is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_ITG3200 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_SHT31 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_HP20X is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_DRV2605L is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_BBM150 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_HMC5883L is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_LSM303DLH is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_TCS3414CS is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_MP503 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_BMP085 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_HIGHTEMP is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_VEML6070 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_SI1145 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_SHT35 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_AT42QT1070 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_LSM6DS3 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_HDC1000 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_HM3301 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_MCP9600 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_LTC2941 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_LDC1612 is not set -# CONFIG_PKG_USING_ARDUINO_CAPACITIVESENSOR is not set +# end of Sensors # # Display # -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_GFX_LIBRARY is not set # CONFIG_PKG_USING_ARDUINO_U8G2 is not set -# CONFIG_PKG_USING_ARDUINO_TFT_ESPI is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ST7735 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SSD1306 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ILI9341 is not set -# CONFIG_PKG_USING_SEEED_TM1637 is not set +# end of Display # # Timing # -# CONFIG_PKG_USING_ARDUINO_RTCLIB is not set # CONFIG_PKG_USING_ARDUINO_MSTIMER2 is not set -# CONFIG_PKG_USING_ARDUINO_TICKER is not set -# CONFIG_PKG_USING_ARDUINO_TASKSCHEDULER is not set +# end of Timing # # Data Processing # # CONFIG_PKG_USING_ARDUINO_KALMANFILTER is not set # CONFIG_PKG_USING_ARDUINO_ARDUINOJSON is not set -# CONFIG_PKG_USING_ARDUINO_TENSORFLOW_LITE_MICRO is not set +# end of Data Processing # # Data Storage @@ -1111,23 +998,18 @@ CONFIG_RT_USING_LDSO=y # # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PN532 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI4713 is not set +# end of Communication # # Device Control # # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCF8574 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCA9685 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TPA2016 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DRV2605 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DS1841 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DS3502 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_PCF85063TP is not set +# end of Device Control # # Other # -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MFRC630 is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI5351 is not set # # Signal IO @@ -1140,10 +1022,78 @@ CONFIG_RT_USING_LDSO=y # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP3008 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MCP4725 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BD3491FS is not set +# end of Signal IO # # Uncategorized # +# end of Arduino libraries +# end of RT-Thread online packages + +# +# Privated Packages of RealThread +# +# CONFIG_PKG_USING_CODEC is not set +# CONFIG_PKG_USING_PLAYER is not set +# CONFIG_PKG_USING_MPLAYER is not set +# CONFIG_PKG_USING_PERSIMMON_SRC is not set +# CONFIG_PKG_USING_JS_PERSIMMON is not set +# CONFIG_PKG_USING_JERRYSCRIPT_WIN32 is not set + +# +# Network Utilities +# +# end of Network Utilities + +# CONFIG_PKG_USING_WICED is not set +# CONFIG_PKG_USING_CLOUDSDK is not set +# CONFIG_PKG_USING_POWER_MANAGER is not set +# CONFIG_PKG_USING_RT_OTA is not set +# CONFIG_PKG_USING_RTINSIGHT is not set +# CONFIG_PKG_USING_SMARTCONFIG is not set +# CONFIG_PKG_USING_RTX is not set +# CONFIG_RT_USING_TESTCASE is not set +# CONFIG_PKG_USING_NGHTTP2 is not set +# CONFIG_PKG_USING_AVS is not set +# CONFIG_PKG_USING_ALI_LINKKIT is not set +# CONFIG_PKG_USING_STS is not set +# CONFIG_PKG_USING_DLMS is not set +# CONFIG_PKG_USING_AUDIO_FRAMEWORK is not set +# CONFIG_PKG_USING_ZBAR is not set +# CONFIG_PKG_USING_MCF is not set +# CONFIG_PKG_USING_URPC is not set +# CONFIG_PKG_USING_DCM is not set +# CONFIG_PKG_USING_EMQ is not set +# CONFIG_PKG_USING_CFGM is not set +# CONFIG_PKG_USING_RT_CMSIS_DAP is not set +# CONFIG_PKG_USING_SMODULE is not set +# CONFIG_PKG_USING_SNFD is not set +# CONFIG_PKG_USING_UDBD is not set +# CONFIG_PKG_USING_BENCHMARK is not set +# CONFIG_PKG_USING_UBJSON is not set +# CONFIG_PKG_USING_DATATYPE is not set +# CONFIG_PKG_USING_FASTFS is not set +# CONFIG_PKG_USING_RIL is not set +# CONFIG_PKG_USING_WATCH_DCM_SVC is not set +# CONFIG_PKG_USING_WATCH_APP_FWK is not set +# CONFIG_PKG_USING_GUI_TEST is not set +# CONFIG_PKG_USING_PMEM is not set +# CONFIG_PKG_USING_LWRDP is not set +# CONFIG_PKG_USING_MASAN is not set +# CONFIG_PKG_USING_BSDIFF_LIB is not set +# CONFIG_PKG_USING_PRC_DIFF is not set + +# +# RT-Thread Smart +# +# CONFIG_PKG_USING_UKERNEL is not set +# end of RT-Thread Smart + +# CONFIG_PKG_USING_TRACE_AGENT is not set +# CONFIG_PKG_USING_DLOG is not set +# CONFIG_PKG_USING_EXT4 is not set +# end of Privated Packages of RealThread + CONFIG_BOARD_allwinnerd1s=y # CONFIG_ENABLE_FPU is not set # CONFIG_RT_USING_USERSPACE_32BIT_LIMIT is not set @@ -1167,6 +1117,8 @@ CONFIG_UART0_RX_USING_GPIOE3=y # CONFIG_BSP_USING_UART3 is not set # CONFIG_BSP_USING_UART4 is not set # CONFIG_BSP_USING_UART5 is not set +# end of General Purpose UARTs + # CONFIG_BSP_USING_WDT is not set # CONFIG_BSP_USING_RTC is not set # CONFIG_BSP_USING_I2C is not set @@ -1182,12 +1134,16 @@ CONFIG_BSP_USING_FS=y # Board extended module Drivers # # CONFIG_BSP_USING_RW007 is not set +# end of Board extended module Drivers +# end of General Drivers Configuration + CONFIG_RT_USING_SUNXI_HAL=y # # UART Devices # # CONFIG_DRIVERS_UART is not set +# end of UART Devices # # CCMU Devices @@ -1196,18 +1152,21 @@ CONFIG_DRIVERS_CCMU=y # CONFIG_DRIVERS_SUNXI_CLK is not set CONFIG_DRIVERS_SUNXI_CCU=y # CONFIG_HAL_TEST_CCU is not set +# end of CCMU Devices # # DMA Devices # CONFIG_DRIVERS_DMA=y # CONFIG_HAL_TEST_DMA is not set +# end of DMA Devices # # GPIO Devices # CONFIG_DRIVERS_GPIO=y # CONFIG_HAL_TEST_GPIO is not set +# end of GPIO Devices # # Video support for sunxi @@ -1259,12 +1218,14 @@ CONFIG_LCD_SUPPORT_INET_DSI_PANEL=y # CONFIG_LCD_SUPPORT_RT13QV005D is not set # CONFIG_LCD_SUPPORT_ST7789V_CPU is not set # CONFIG_LCD_SUPPORT_VVX07H005A10 is not set +# end of LCD panels select # # Display engine feature select # # CONFIG_DISP2_SUNXI_SUPPORT_SMBL is not set CONFIG_DISP2_SUNXI_SUPPORT_ENAHNCE=y +# end of Display engine feature select # # Soc and board select @@ -1280,12 +1241,16 @@ CONFIG_DISP2_SUNXI_SUPPORT_ENAHNCE=y # CONFIG_TFT_RGB is not set # CONFIG_HE0801A068_MIPI is not set # CONFIG_DEFAULT_LVDS is not set +# end of Board Select # # Soc Select # # CONFIG_ARCH_SUN8IW19 is not set # CONFIG_ARCH_SUN20IW1 is not set +# end of Soc Select +# end of Soc and board select +# end of Video support for sunxi # # SDMMC Devices @@ -1300,24 +1265,29 @@ CONFIG_SDIO_IRQ_SUPPORT=y # CONFIG_SD_TEST is not set CONFIG_SDC_DMA_BUF_SIZE=64 CONFIG_DRIVERS_SDC_CDPIN_PRESENT_VAL=0 +# end of SDMMC Devices # # SPI Devices # CONFIG_DRIVERS_SPI=y # CONFIG_HAL_TEST_SPI is not set +# end of SPI Devices # # TWI Devices # CONFIG_DRIVERS_TWI=y # CONFIG_HAL_TEST_TWI is not set +# end of TWI Devices # # G2D Devices # CONFIG_DRIVERS_G2D=y # CONFIG_HAL_TEST_G2D is not set +# end of G2D Devices + # CONFIG_DRIVERS_USB is not set # @@ -1325,9 +1295,11 @@ CONFIG_DRIVERS_G2D=y # CONFIG_DRIVERS_CE=y # CONFIG_HAL_TEST_CE is not set +# end of CE Devices # # EFUSE Devices # CONFIG_DRIVERS_EFUSE=y # CONFIG_HAL_TEST_EFUSE is not set +# end of EFUSE Devices diff --git a/bsp/allwinner/d1s/ports/partition/partition.c b/bsp/allwinner/d1s/ports/partition/partition.c index 9b9ceb2c378..1c30d29e5f1 100644 --- a/bsp/allwinner/d1s/ports/partition/partition.c +++ b/bsp/allwinner/d1s/ports/partition/partition.c @@ -115,6 +115,18 @@ static rt_ssize_t partition_write(rt_device_t dev, return 0; } +#ifdef RT_USING_DEVICE_OPS +const static struct rt_device_ops _partition_ops = +{ + .init = partition_init, + .open = partition_open, + .close = partition_close, + .read = partition_read, + .write = partition_write, + .control = partition_control, +}; +#endif /* RT_USING_DEVICE_OPS */ + int rt_partition_init(const char* flash_device, const struct rt_partition* parts, rt_size_t num) { struct rt_device *device; @@ -148,12 +160,16 @@ int rt_partition_init(const char* flash_device, const struct rt_partition* parts /* register device */ part_dev->parent.type = RT_Device_Class_Block; +#ifndef RT_USING_DEVICE_OPS part_dev->parent.init = partition_init; part_dev->parent.open = partition_open; part_dev->parent.close = partition_close; part_dev->parent.read = partition_read; part_dev->parent.write = partition_write; part_dev->parent.control = partition_control; +#else + part_dev->parent.ops = &_partition_ops; +#endif /* RT_USING_DEVICE_OPS */ /* no private */ part_dev->parent.user_data = RT_NULL; diff --git a/bsp/allwinner/d1s/rtconfig.h b/bsp/allwinner/d1s/rtconfig.h index 032644d48f6..e1009af4c43 100644 --- a/bsp/allwinner/d1s/rtconfig.h +++ b/bsp/allwinner/d1s/rtconfig.h @@ -1,9 +1,6 @@ #ifndef RT_CONFIG_H__ #define RT_CONFIG_H__ -/* Automatically generated file; DO NOT EDIT. */ -/* RT-Thread Project Configuration */ - /* RT-Thread Kernel */ #define RT_NAME_MAX 20 @@ -21,12 +18,18 @@ #define RT_USING_TIMER_SOFT #define RT_TIMER_THREAD_PRIO 4 #define RT_TIMER_THREAD_STACK_SIZE 16384 +#define RT_USING_CPU_USAGE_TRACER /* kservice optimization */ -#define RT_KSERVICE_USING_STDLIB -#define RT_KPRINTF_USING_LONGLONG +/* end of kservice optimization */ + +/* klibc optimization */ + +#define RT_KLIBC_USING_PRINTF_LONGLONG +/* end of klibc optimization */ #define RT_USING_DEBUG +#define RT_DEBUGING_ASSERT #define RT_DEBUGING_COLOR #define RT_DEBUGING_CONTEXT @@ -37,6 +40,7 @@ #define RT_USING_EVENT #define RT_USING_MAILBOX #define RT_USING_MESSAGEQUEUE +/* end of Inter-Thread communication */ /* Memory Management */ @@ -46,13 +50,17 @@ #define RT_USING_SMALL_MEM_AS_HEAP #define RT_USING_MEMTRACE #define RT_USING_HEAP +/* end of Memory Management */ #define RT_USING_DEVICE +#define RT_USING_DEVICE_OPS +#define RT_USING_SCHED_THREAD_CTX #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 256 #define RT_CONSOLE_DEVICE_NAME "uart0" -#define RT_VER_NUM 0x50100 +#define RT_VER_NUM 0x50200 #define RT_USING_STDC_ATOMIC #define RT_BACKTRACE_LEVEL_MAX_NR 32 +/* end of RT-Thread Kernel */ #define ARCH_CPU_64BIT #define RT_USING_CACHE #define ARCH_MM_MMU @@ -103,7 +111,10 @@ #define RT_DFS_ELM_MAX_SECTOR_SIZE 512 #define RT_DFS_ELM_REENTRANT #define RT_DFS_ELM_MUTEX_TIMEOUT 3000 +/* end of elm-chan's FatFs, Generic FAT Filesystem Module */ #define RT_USING_DFS_DEVFS +#define RT_USING_DFS_PTYFS +#define RT_USING_DFS_TMPFS #define RT_USING_PAGECACHE /* page cache config */ @@ -114,6 +125,8 @@ #define RT_PAGECACHE_HASH_NR 1024 #define RT_PAGECACHE_GC_WORK_LEVEL 90 #define RT_PAGECACHE_GC_STOP_LEVEL 70 +/* end of page cache config */ +/* end of DFS: device virtual file system */ #define RT_USING_FAL #define FAL_DEBUG_CONFIG #define FAL_DEBUG 1 @@ -121,6 +134,7 @@ /* Device Drivers */ +#define RT_USING_DEV_BUS #define RT_USING_DEVICE_IPC #define RT_UNAMED_PIPE_NUMBER 64 #define RT_USING_SYSTEM_WORKQUEUE @@ -128,18 +142,14 @@ #define RT_SYSTEM_WORKQUEUE_PRIORITY 23 #define RT_USING_SERIAL #define RT_USING_SERIAL_V2 -#define RT_USING_TTY #define RT_USING_NULL #define RT_USING_ZERO #define RT_USING_RANDOM #define RT_USING_RTC #define RT_USING_WDT -#define RT_USING_DEV_BUS #define RT_USING_PIN #define RT_USING_KTIME - -/* Using USB */ - +/* end of Device Drivers */ /* C/C++ and POSIX layer */ @@ -151,6 +161,8 @@ #define RT_LIBC_TZ_DEFAULT_HOUR 8 #define RT_LIBC_TZ_DEFAULT_MIN 0 #define RT_LIBC_TZ_DEFAULT_SEC 0 +/* end of Timezone and Daylight Saving Time */ +/* end of ISO-ANSI C layer */ /* POSIX (Portable Operating System Interface) layer */ @@ -171,12 +183,17 @@ /* Socket is in the 'Network' category */ +/* end of Interprocess Communication (IPC) */ +/* end of POSIX (Portable Operating System Interface) layer */ +/* end of C/C++ and POSIX layer */ /* Network */ +/* end of Network */ /* Memory protection */ +/* end of Memory protection */ /* Utilities */ @@ -186,6 +203,7 @@ #define RT_USING_ADT_BITMAP #define RT_USING_ADT_HASHMAP #define RT_USING_ADT_REF +/* end of Utilities */ #define RT_USING_LWP #define RT_LWP_MAX_NR 30 #define LWP_TASK_STACK_SIZE 16384 @@ -194,12 +212,21 @@ #define LWP_TID_MAX_NR 64 #define RT_LWP_SHM_MAX_NR 64 #define RT_USING_LDSO +#define LWP_USING_TERMINAL +#define LWP_PTY_MAX_PARIS_LIMIT 64 /* Memory management */ +/* end of Memory management */ + +/* Using USB legacy version */ + +/* end of Using USB legacy version */ +/* end of RT-Thread Components */ /* RT-Thread Utestcases */ +/* end of RT-Thread Utestcases */ /* RT-Thread online packages */ @@ -210,124 +237,153 @@ /* Marvell WiFi */ +/* end of Marvell WiFi */ /* Wiced WiFi */ - -/* CYW43012 WiFi */ - - -/* BL808 WiFi */ - - -/* CYW43439 WiFi */ - +/* end of Wiced WiFi */ +/* end of Wi-Fi */ /* IoT Cloud */ +/* end of IoT Cloud */ +/* end of IoT - internet of things */ /* security packages */ +/* end of security packages */ /* language packages */ /* JSON: JavaScript Object Notation, a lightweight data-interchange format */ +/* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */ /* XML: Extensible Markup Language */ +/* end of XML: Extensible Markup Language */ +/* end of language packages */ /* multimedia packages */ /* LVGL: powerful and easy-to-use embedded GUI library */ +/* end of LVGL: powerful and easy-to-use embedded GUI library */ /* u8g2: a monochrome graphic library */ +/* end of u8g2: a monochrome graphic library */ + +/* PainterEngine: A cross-platform graphics application framework written in C language */ + +/* end of PainterEngine: A cross-platform graphics application framework written in C language */ +/* end of multimedia packages */ /* tools packages */ +/* end of tools packages */ /* system packages */ /* enhanced kernel services */ +/* end of enhanced kernel services */ /* acceleration: Assembly language or algorithmic acceleration packages */ +/* end of acceleration: Assembly language or algorithmic acceleration packages */ /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ +/* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ /* Micrium: Micrium software products porting for RT-Thread */ +/* end of Micrium: Micrium software products porting for RT-Thread */ +/* end of system packages */ /* peripheral libraries and drivers */ -/* HAL & SDK Drivers */ - -/* STM32 HAL & SDK Drivers */ - /* Kendryte SDK */ - -/* sensors drivers */ - - -/* touch drivers */ - +/* end of Kendryte SDK */ +/* end of peripheral libraries and drivers */ /* AI packages */ - -/* Signal Processing and Control Algorithm Packages */ - +/* end of AI packages */ /* miscellaneous packages */ /* project laboratory */ +/* end of project laboratory */ + /* samples: kernel and components samples */ +/* end of samples: kernel and components samples */ /* entertainment: terminal games and other interesting software packages */ +/* end of entertainment: terminal games and other interesting software packages */ +/* end of miscellaneous packages */ /* Arduino libraries */ -/* Projects and Demos */ +/* Projects */ +/* end of Projects */ /* Sensors */ +/* end of Sensors */ /* Display */ +/* end of Display */ /* Timing */ +/* end of Timing */ /* Data Processing */ +/* end of Data Processing */ /* Data Storage */ /* Communication */ +/* end of Communication */ /* Device Control */ +/* end of Device Control */ /* Other */ - /* Signal IO */ +/* end of Signal IO */ /* Uncategorized */ +/* end of Arduino libraries */ +/* end of RT-Thread online packages */ + +/* Privated Packages of RealThread */ + + +/* Network Utilities */ + +/* end of Network Utilities */ + +/* RT-Thread Smart */ + +/* end of RT-Thread Smart */ +/* end of Privated Packages of RealThread */ #define BOARD_allwinnerd1s #define __STACKSIZE__ 16384 @@ -340,29 +396,36 @@ #define BSP_USING_UART0 #define UART0_TX_USING_GPIOE2 #define UART0_RX_USING_GPIOE3 +/* end of General Purpose UARTs */ #define BSP_USING_SDMMC #define SD_CARD_CHECK #define BSP_USING_FS /* Board extended module Drivers */ +/* end of Board extended module Drivers */ +/* end of General Drivers Configuration */ #define RT_USING_SUNXI_HAL /* UART Devices */ +/* end of UART Devices */ /* CCMU Devices */ #define DRIVERS_CCMU #define DRIVERS_SUNXI_CCU +/* end of CCMU Devices */ /* DMA Devices */ #define DRIVERS_DMA +/* end of DMA Devices */ /* GPIO Devices */ #define DRIVERS_GPIO +/* end of GPIO Devices */ /* Video support for sunxi */ @@ -375,18 +438,24 @@ #define LCD_SUPPORT_WILLIAMLCD #define LCD_SUPPORT_LQ101R1SX03 #define LCD_SUPPORT_INET_DSI_PANEL +/* end of LCD panels select */ /* Display engine feature select */ #define DISP2_SUNXI_SUPPORT_ENAHNCE +/* end of Display engine feature select */ /* Soc and board select */ /* Board Select */ +/* end of Board Select */ /* Soc Select */ +/* end of Soc Select */ +/* end of Soc and board select */ +/* end of Video support for sunxi */ /* SDMMC Devices */ @@ -398,25 +467,31 @@ #define SDIO_IRQ_SUPPORT #define SDC_DMA_BUF_SIZE 64 #define DRIVERS_SDC_CDPIN_PRESENT_VAL 0 +/* end of SDMMC Devices */ /* SPI Devices */ #define DRIVERS_SPI +/* end of SPI Devices */ /* TWI Devices */ #define DRIVERS_TWI +/* end of TWI Devices */ /* G2D Devices */ #define DRIVERS_G2D +/* end of G2D Devices */ /* CE Devices */ #define DRIVERS_CE +/* end of CE Devices */ /* EFUSE Devices */ #define DRIVERS_EFUSE +/* end of EFUSE Devices */ #endif diff --git a/bsp/allwinner/libraries/drivers/sdmmc/drv_sdmmc.c b/bsp/allwinner/libraries/drivers/sdmmc/drv_sdmmc.c index 4b64354f834..fb4efde1b5c 100644 --- a/bsp/allwinner/libraries/drivers/sdmmc/drv_sdmmc.c +++ b/bsp/allwinner/libraries/drivers/sdmmc/drv_sdmmc.c @@ -8,6 +8,9 @@ * 2021-10-29 JasonHu first version */ +#define DBG_TAG "drv-sdmmc" +#include + #include #include #include @@ -36,10 +39,6 @@ #include /* statfs() */ #include "partition.h" -#define DBG_LEVEL DBG_LOG -#define DBG_SECTION_NAME "drv-sdmmc" -#include - #ifdef CONFIG_SUPPORT_SDMMC_CACHE #include "sdmmc_cache.h" #endif @@ -73,7 +72,7 @@ static int _register_blk_part_device(rt_device_t dev, const char *dev_name) /* NOTICE: get block geometry fisrt time here, then you can read/write sdmmc. */ struct dev_sdmmc *dev_sdmmc = (struct dev_sdmmc *)dev->user_data; - if (dev->control(dev, RT_DEVICE_CTRL_BLK_GETGEOME, &dev_sdmmc->geometry) != RT_EOK) + if (rt_dev_control(dev, RT_DEVICE_CTRL_BLK_GETGEOME, &dev_sdmmc->geometry) != RT_EOK) { LOG_E("device get geometry failed!"); return -RT_EIO; @@ -95,7 +94,7 @@ static int _register_blk_part_device(rt_device_t dev, const char *dev_name) return -RT_ENOMEM; } - if (dev->read(dev, 0, mbr_buf, 1) != 1) + if (rt_dev_read(dev, 0, mbr_buf, 1) != 1) { LOG_E("device read mbr 1-sector failure\n"); ret = -RT_ERROR; @@ -429,6 +428,18 @@ static rt_err_t sdmmc_control(rt_device_t dev, int cmd, void *args) return ret; } +#ifdef RT_USING_DEVICE_OPS +const static struct rt_device_ops _sdmmc_ops = +{ + .init = sdmmc_init, + .open = sdmmc_open, + .close = sdmmc_close, + .read = sdmmc_read, + .write = sdmmc_write, + .control = sdmmc_control +}; +#endif /* RT_USING_DEVICE_OPS */ + static int init_sdmmc_device(rt_device_t device, void *usr_data, char *dev_name) { int ret = -1; @@ -438,12 +449,17 @@ static int init_sdmmc_device(rt_device_t device, void *usr_data, char *dev_name) { return ret; } + +#ifndef RT_USING_DEVICE_OPS device->init = sdmmc_init; device->open = sdmmc_open; device->close = sdmmc_close; device->read = sdmmc_read; device->write = sdmmc_write; device->control = sdmmc_control; +#else + device->ops = &_sdmmc_ops; +#endif /* RT_USING_DEVICE_OPS */ device->user_data = usr_data; ret = rt_device_register(device, dev_name, RT_DEVICE_FLAG_RDWR); @@ -463,7 +479,7 @@ static int init_sdmmc_device(rt_device_t device, void *usr_data, char *dev_name) /* NOTICE: get block geometry fisrt time here, then you can read/write sdmmc. */ struct dev_sdmmc *dev_sdmmc = (struct dev_sdmmc *)device->user_data; - if (device->control(device, RT_DEVICE_CTRL_BLK_GETGEOME, &dev_sdmmc->geometry) != RT_EOK) + if (rt_dev_control(device, RT_DEVICE_CTRL_BLK_GETGEOME, &dev_sdmmc->geometry) != RT_EOK) { LOG_E("device get geometry failed!"); ret = -ENOSYS; diff --git a/bsp/allwinner/libraries/drivers/sdmmc/drv_sdmmc.h b/bsp/allwinner/libraries/drivers/sdmmc/drv_sdmmc.h index 47fd8112a4c..bd90196a4b7 100644 --- a/bsp/allwinner/libraries/drivers/sdmmc/drv_sdmmc.h +++ b/bsp/allwinner/libraries/drivers/sdmmc/drv_sdmmc.h @@ -27,4 +27,18 @@ struct dev_sdmmc void sd_mmc1_init(void); void sd_mmc1_deinit(void); +#ifdef RT_USING_DEVICE_OPS +#define rt_dev_has_control(dev) (dev)->ops->control +#define rt_dev_control(dev, cmd, args) (dev)->ops->control(dev, cmd, args) +#define rt_dev_read(dev, pos, buffer, size) (dev)->ops->read(dev, pos, buffer, size) +#define rt_dev_write(dev, pos, buffer, size) (dev)->ops->write(dev, pos, buffer, size) + +#else +#define rt_dev_has_control(dev) (dev)->control +#define rt_dev_control(dev, cmd, args) (dev)->control(dev, cmd, args) +#define rt_dev_read(dev, pos, buffer, size) (dev)->read(dev, pos, buffer, size) +#define rt_dev_write(dev, pos, buffer, size) (dev)->write(dev, pos, buffer, size) + +#endif + #endif diff --git a/bsp/allwinner/libraries/libos/src/os.c b/bsp/allwinner/libraries/libos/src/os.c index 29cc451eef0..9e00413c460 100644 --- a/bsp/allwinner/libraries/libos/src/os.c +++ b/bsp/allwinner/libraries/libos/src/os.c @@ -66,18 +66,6 @@ rt_weak int msleep(unsigned int msecs) return 0; } -void rt_hw_us_delay(rt_uint32_t us) -{ - uint64_t start, target; - uint64_t frequency; - - frequency = arch_timer_get_cntfrq(); - start = arch_counter_get_cntpct(); - target = frequency / 1000000ULL * us; - - while (arch_counter_get_cntpct() - start <= target) ; -} - rt_weak int usleep(unsigned int usecs) { int tickDiv = 1000 * (1000 / CONFIG_HZ); diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/source/sdmmc/blkpart.c b/bsp/allwinner/libraries/sunxi-hal/hal/source/sdmmc/blkpart.c index 16778a5f365..a497ee2dcc1 100644 --- a/bsp/allwinner/libraries/sunxi-hal/hal/source/sdmmc/blkpart.c +++ b/bsp/allwinner/libraries/sunxi-hal/hal/source/sdmmc/blkpart.c @@ -9,6 +9,9 @@ #include #include #include + +#include + #define MIN(a, b) ((a) > (b) ? (b) : (a)) #define ALIGN_DOWN(x, a) __ALIGN_KERNEL((x) - ((a) - 1), (a)) #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) @@ -247,7 +250,7 @@ rt_size_t part_read(rt_device_t dev, rt_off_t offset, void *data, rt_size_t size offset, blk->blk_bytes); pr_debug("step1: read page data from addr 0x%x\n", addr); - ret = spinor_dev->read(spinor_dev, addr / blk->page_bytes, page_buf, blk->page_bytes / blk->page_bytes); + ret = rt_dev_read(spinor_dev, addr / blk->page_bytes, page_buf, blk->page_bytes / blk->page_bytes); ret *= blk->page_bytes; if (ret != blk->blk_bytes) { @@ -272,7 +275,7 @@ rt_size_t part_read(rt_device_t dev, rt_off_t offset, void *data, rt_size_t size { uint32_t len = (size/blk->page_bytes)*blk->page_bytes; - ret = spinor_dev->read(spinor_dev, offset / blk->blk_bytes, (char *)data, len / blk->blk_bytes); + ret = rt_dev_read(spinor_dev, offset / blk->blk_bytes, (char *)data, len / blk->blk_bytes); ret *= blk->page_bytes; if (ret != len) { @@ -294,7 +297,7 @@ rt_size_t part_read(rt_device_t dev, rt_off_t offset, void *data, rt_size_t size pr_debug("last size %u not align %u, read them\n", size, blk->blk_bytes); pr_debug("step1: read page data from addr 0x%x\n", offset); - ret = spinor_dev->read(spinor_dev, offset / blk->blk_bytes, page_buf, blk->page_bytes / blk->page_bytes); + ret = rt_dev_read(spinor_dev, offset / blk->blk_bytes, page_buf, blk->page_bytes / blk->page_bytes); ret *= blk->page_bytes; if (ret != blk->page_bytes) { @@ -325,7 +328,7 @@ rt_size_t part_read(rt_device_t dev, rt_off_t offset, void *data, rt_size_t size int do_write_without_erase(rt_device_t dev, struct blkpart *blk, uint32_t addr, uint32_t size, char *buf) { - return dev->write(dev, addr, buf, size); + return rt_dev_write(dev, addr, buf, size); } static int do_erase_write_blk(rt_device_t dev, struct blkpart *blk, uint32_t addr, uint32_t size, char *buf) { @@ -355,7 +358,7 @@ static int do_erase_write_blk(rt_device_t dev, struct blkpart *blk, uint32_t add memset(&erase_sector, 0, sizeof(blk_dev_erase_t)); erase_sector.addr = align_addr; erase_sector.len = blk->blk_bytes; - ret = dev->control(dev, BLOCK_DEVICE_CMD_ERASE_SECTOR, &erase_sector); + ret = rt_dev_control(dev, BLOCK_DEVICE_CMD_ERASE_SECTOR, &erase_sector); if (ret) { free(read_buf); @@ -365,7 +368,7 @@ static int do_erase_write_blk(rt_device_t dev, struct blkpart *blk, uint32_t add memcpy(read_buf + (addr - align_addr), buf, blk->page_bytes); - ret = dev->write(dev, align_addr, read_buf, blk->blk_bytes); + ret = rt_dev_write(dev, align_addr, read_buf, blk->blk_bytes); free(read_buf); if (ret == blk->blk_bytes) { @@ -382,13 +385,13 @@ static int do_erase_write_blk(rt_device_t dev, struct blkpart *blk, uint32_t add memset(&erase_sector, 0, sizeof(blk_dev_erase_t)); erase_sector.addr = addr; erase_sector.len = size; - ret = dev->control(dev, BLOCK_DEVICE_CMD_ERASE_SECTOR, &erase_sector); + ret = rt_dev_control(dev, BLOCK_DEVICE_CMD_ERASE_SECTOR, &erase_sector); if (ret) { return -EIO; } - ret = dev->write(dev, addr, buf, size); + ret = rt_dev_write(dev, addr, buf, size); if (ret == size) { return size; @@ -466,7 +469,7 @@ rt_size_t _part_write(rt_device_t dev, rt_off_t offset, const void *data, rt_siz pr_debug("offset %u not align %u, fix them before align write\n", offset, blk->blk_bytes); pr_debug("step1: read page data from addr 0x%x\n", addr); - ret = spinor_dev->read(spinor_dev, addr / blk->blk_bytes, blk_buf, blk->blk_bytes / blk->blk_bytes); + ret = rt_dev_read(spinor_dev, addr / blk->blk_bytes, blk_buf, blk->blk_bytes / blk->blk_bytes); ret *= blk->blk_bytes; if (ret != blk->blk_bytes) { @@ -513,7 +516,7 @@ rt_size_t _part_write(rt_device_t dev, rt_off_t offset, const void *data, rt_siz pr_debug("step1: read page data from addr 0x%x\n", offset); memset(blk_buf, 0x00, sizeof(blk->blk_bytes)); - ret = spinor_dev->read(spinor_dev, offset / blk->blk_bytes, blk_buf, blk->blk_bytes); + ret = rt_dev_read(spinor_dev, offset / blk->blk_bytes, blk_buf, blk->blk_bytes); if (ret != blk->blk_bytes) { goto err; @@ -582,15 +585,15 @@ rt_err_t part_control(rt_device_t dev, int cmd, void *args) erase_sector->len = MIN(part->bytes - erase_sector->addr, erase_sector->len); erase_sector->addr = erase_sector->addr + part->off; - if (spinor_dev && spinor_dev->control) + if (spinor_dev && rt_dev_has_control(spinor_dev)) { - ret = spinor_dev->control(spinor_dev, BLOCK_DEVICE_CMD_ERASE_SECTOR, erase_sector); + ret = rt_dev_control(spinor_dev, BLOCK_DEVICE_CMD_ERASE_SECTOR, erase_sector); } break; case DEVICE_PART_CMD_GET_BLOCK_SIZE: - if (spinor_dev && spinor_dev->control) + if (spinor_dev && rt_dev_has_control(spinor_dev)) { - ret = spinor_dev->control(spinor_dev, BLOCK_DEVICE_CMD_GET_BLOCK_SIZE, args); + ret = rt_dev_control(spinor_dev, BLOCK_DEVICE_CMD_GET_BLOCK_SIZE, args); } else { @@ -604,9 +607,9 @@ rt_err_t part_control(rt_device_t dev, int cmd, void *args) case RT_DEVICE_CTRL_BLK_GETGEOME: geometry = (struct rt_device_blk_geometry *)args; memset(geometry, 0, sizeof(struct rt_device_blk_geometry)); - if (spinor_dev && spinor_dev->control) + if (spinor_dev && rt_dev_has_control(spinor_dev)) { - ret = spinor_dev->control(spinor_dev, RT_DEVICE_CTRL_BLK_GETGEOME, args); + ret = rt_dev_control(spinor_dev, RT_DEVICE_CTRL_BLK_GETGEOME, args); if (!ret) { geometry->sector_count = part->bytes / geometry->bytes_per_sector; From c7e1982215acb516e4c86b17999b512f23e2557f Mon Sep 17 00:00:00 2001 From: Shell Date: Mon, 8 Jul 2024 11:05:03 +0800 Subject: [PATCH 2/3] feat: update configuration --- bsp/allwinner/d1s/.config | 15 +++++++++------ bsp/allwinner/d1s/applications/mnt.c | 2 +- bsp/allwinner/d1s/rtconfig.h | 9 +++++---- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/bsp/allwinner/d1s/.config b/bsp/allwinner/d1s/.config index aaf02ec7a95..c2a2054637b 100644 --- a/bsp/allwinner/d1s/.config +++ b/bsp/allwinner/d1s/.config @@ -65,12 +65,15 @@ CONFIG_RT_USING_MESSAGEQUEUE=y # Memory Management # CONFIG_RT_PAGE_MAX_ORDER=11 -CONFIG_RT_USING_MEMPOOL=y -CONFIG_RT_USING_SMALL_MEM=y +# CONFIG_RT_USING_MEMPOOL is not set +# CONFIG_RT_USING_SMALL_MEM is not set # CONFIG_RT_USING_SLAB is not set -# CONFIG_RT_USING_MEMHEAP is not set -CONFIG_RT_USING_SMALL_MEM_AS_HEAP=y -# CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set +CONFIG_RT_USING_MEMHEAP=y +CONFIG_RT_MEMHEAP_FAST_MODE=y +# CONFIG_RT_MEMHEAP_BEST_MODE is not set +# CONFIG_RT_USING_SMALL_MEM_AS_HEAP is not set +CONFIG_RT_USING_MEMHEAP_AS_HEAP=y +CONFIG_RT_USING_MEMHEAP_AUTO_BINDING=y # CONFIG_RT_USING_SLAB_AS_HEAP is not set # CONFIG_RT_USING_USERHEAP is not set # CONFIG_RT_USING_NOHEAP is not set @@ -192,7 +195,7 @@ CONFIG_RT_USING_DEV_BUS=y CONFIG_RT_USING_DEVICE_IPC=y CONFIG_RT_UNAMED_PIPE_NUMBER=64 CONFIG_RT_USING_SYSTEM_WORKQUEUE=y -CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=4096 +CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=16384 CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23 CONFIG_RT_USING_SERIAL=y # CONFIG_RT_USING_SERIAL_V1 is not set diff --git a/bsp/allwinner/d1s/applications/mnt.c b/bsp/allwinner/d1s/applications/mnt.c index da9b95ec260..57b1a72b49b 100644 --- a/bsp/allwinner/d1s/applications/mnt.c +++ b/bsp/allwinner/d1s/applications/mnt.c @@ -116,7 +116,7 @@ int mnt_init(void) rt_pin_mode(SD_CHECK_PIN, PIN_MODE_INPUT_PULLUP); - thread = rt_thread_create("sd", sd_check_thread_entry, NULL, 4096, 21, 10); + thread = rt_thread_create("sd", sd_check_thread_entry, NULL, RT_SYSTEM_WORKQUEUE_STACKSIZE, 21, 10); if (thread == NULL) { return -1; diff --git a/bsp/allwinner/d1s/rtconfig.h b/bsp/allwinner/d1s/rtconfig.h index e1009af4c43..8c0fd9b38ea 100644 --- a/bsp/allwinner/d1s/rtconfig.h +++ b/bsp/allwinner/d1s/rtconfig.h @@ -45,9 +45,10 @@ /* Memory Management */ #define RT_PAGE_MAX_ORDER 11 -#define RT_USING_MEMPOOL -#define RT_USING_SMALL_MEM -#define RT_USING_SMALL_MEM_AS_HEAP +#define RT_USING_MEMHEAP +#define RT_MEMHEAP_FAST_MODE +#define RT_USING_MEMHEAP_AS_HEAP +#define RT_USING_MEMHEAP_AUTO_BINDING #define RT_USING_MEMTRACE #define RT_USING_HEAP /* end of Memory Management */ @@ -138,7 +139,7 @@ #define RT_USING_DEVICE_IPC #define RT_UNAMED_PIPE_NUMBER 64 #define RT_USING_SYSTEM_WORKQUEUE -#define RT_SYSTEM_WORKQUEUE_STACKSIZE 4096 +#define RT_SYSTEM_WORKQUEUE_STACKSIZE 16384 #define RT_SYSTEM_WORKQUEUE_PRIORITY 23 #define RT_USING_SERIAL #define RT_USING_SERIAL_V2 From 4e55cda4f62d597539819ce9ff291b34b1b68408 Mon Sep 17 00:00:00 2001 From: Shell Date: Mon, 8 Jul 2024 11:09:42 +0800 Subject: [PATCH 3/3] feat: fixup compiler warning --- bsp/allwinner/d1s/applications/mnt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsp/allwinner/d1s/applications/mnt.c b/bsp/allwinner/d1s/applications/mnt.c index 57b1a72b49b..3811b000114 100644 --- a/bsp/allwinner/d1s/applications/mnt.c +++ b/bsp/allwinner/d1s/applications/mnt.c @@ -24,7 +24,7 @@ #define SD_CHECK_PIN GET_PIN(GPIO_PORT_G, GPIO_PIN_3) -int sd_check_thread_entry(void *p) +void sd_check_thread_entry(void *p) { rt_uint8_t old_sd_check = 0; @@ -38,7 +38,7 @@ int sd_check_thread_entry(void *p) else { rt_kprintf("Mount \"sd0p0\" on \"/\" fail\n"); - return -1; + return ; } /* 挂载sd1分区 */ @@ -105,7 +105,7 @@ int sd_check_thread_entry(void *p) rt_thread_delay(RT_TICK_PER_SECOND); } } - return 0; + return ; } int mnt_init(void)