重现步骤
1.想要启用USB的Host主模式,在rtos_k230下改动rtsmart-menuconfig
2.进入RT-Thread Components --->
3.进入Device Drivers --->
4.进入Using USB --->
5.对[*] Using USB host 进行使能启用
6.再次编译make时出现编译错误
期待结果和实际结果
最后部分错误日志:
……
Make librtsp_pusher done.
Make MPP middleware libraries done.
4cf2f76
fatal: 没有发现名称,无法描述任何东西。
fatal: 没有发现名称,无法描述任何东西。
scons: Reading SConscript files ...
b''
b''
Generate ld done.
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/app_canmv/config.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/app_canmv/main.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/app_canmv/mnt.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/board/board.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/board/mpp/mpp_init.o
In file included from components/CherryUSB/core/usbd_core.h:21,
from components/canmv_usb/canmv_usb.h:8,
from app_canmv/main.c:37:
components/CherryUSB/common/usb_def.h:38: warning: "USB_PID_OUT" redefined
38 | #define USB_PID_OUT (0x01) /* Tokens */
|
In file included from /home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_host.h:19,
from /home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/rtdevice.h:56,
from /home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/dfs/include/dfs.h:21,
from /home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/dfs/include/dfs_fs.h:14,
from app_canmv/main.c:18:
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:119: note: this is the location of the previous definition
119 | #define USB_PID_OUT 0x01
|
components/CherryUSB/common/usb_def.h:39: warning: "USB_PID_IN" redefined
39 | #define USB_PID_IN (0x09)
|
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:123: note: this is the location of the previous definition
123 | #define USB_PID_IN 0x09
|
components/CherryUSB/common/usb_def.h:40: warning: "USB_PID_SOF" redefined
40 | #define USB_PID_SOF (0x05)
|
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:122: note: this is the location of the previous definition
122 | #define USB_PID_SOF 0x05
|
components/CherryUSB/common/usb_def.h:41: warning: "USB_PID_SETUP" redefined
41 | #define USB_PID_SETUP (0x0d)
|
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:127: note: this is the location of the previous definition
127 | #define USB_PID_SETUP 0x0D
|
components/CherryUSB/common/usb_def.h:43: warning: "USB_PID_DATA0" redefined
43 | #define USB_PID_DATA0 (0x03) /* Data */
|
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:121: note: this is the location of the previous definition
121 | #define USB_PID_DATA0 0x03
|
components/CherryUSB/common/usb_def.h:44: warning: "USB_PID_DATA1" redefined
44 | #define USB_PID_DATA1 (0x0b)
|
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:125: note: this is the location of the previous definition
125 | #define USB_PID_DATA1 0x0B
|
components/CherryUSB/common/usb_def.h:48: warning: "USB_PID_ACK" redefined
48 | #define USB_PID_ACK (0x02) /* Handshake */
|
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:120: note: this is the location of the previous definition
120 | #define USB_PID_ACK 0x02
|
components/CherryUSB/common/usb_def.h:50: warning: "USB_PID_STALL" redefined
50 | #define USB_PID_STALL (0x0e)
|
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:128: note: this is the location of the previous definition
128 | #define USB_PID_STALL 0x0E
|
components/CherryUSB/common/usb_def.h:53: warning: "USB_PID_PRE" redefined
53 | #define USB_PID_PRE (0x0c) /* Special */
|
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:126: note: this is the location of the previous definition
126 | #define USB_PID_PRE 0x0C
|
components/CherryUSB/common/usb_def.h:105: warning: "USB_FEATURE_ENDPOINT_HALT" redefined
105 | #define USB_FEATURE_ENDPOINT_HALT 0
|
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:79: note: this is the location of the previous definition
79 | #define USB_FEATURE_ENDPOINT_HALT 0x00
|
components/CherryUSB/common/usb_def.h:108: warning: "USB_FEATURE_TEST_MODE" redefined
108 | #define USB_FEATURE_TEST_MODE 2
|
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:81: note: this is the location of the previous definition
81 | #define USB_FEATURE_TEST_MODE 0x02
|
components/CherryUSB/core/usbd_core.h:65:8: error: redefinition of 'struct usb_descriptor'
65 | struct usb_descriptor {
| ^~~~~~~~~~~~~~
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:268:8: note: originally defined here
268 | struct usb_descriptor
| ^~~~~~~~~~~~~~
In file included from components/CherryUSB/class/hub/usbh_hub.h:9,
from components/CherryUSB/core/usbh_core.h:22,
from components/canmv_usb/canmv_usb.h:14:
components/CherryUSB/class/hub/usb_hub.h:50: warning: "HUB_STATUS_OVERCURRENT" redefined
50 | #define HUB_STATUS_OVERCURRENT (1 << 1)
|
/home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/drivers/include/drivers/usb_common.h:202: note: this is the location of the previous definition
202 | #define HUB_STATUS_OVERCURRENT 0x0002
|
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/board/sdk_kernel_init.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/backtrace.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/cache.o
board/board.c: In function 'get_ddr_phy_size':
board/board.c:30:29: warning: passing argument 2 of 'memcpy' makes pointer from integer without a cast [-Wint-conversion]
30 | #define RTT_SYS_BASE (CONFIG_MEM_RTSMART_BASE + CONFIG_RTSMART_OPENSIB_MEMORY_SIZE)
| ^
| |
| long unsigned int
board/board.c:82:26: note: in expansion of macro 'RTT_SYS_BASE'
82 | memcpy(&ddr_tag, RTT_SYS_BASE - sizeof(ddr_tag), sizeof(ddr_tag));
| ^~~~~~~~~~~~
In file included from /home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/dfs/include/dfs.h:17,
from /home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/lwp/lwp.h:24,
from /home/yanxu/rtos_k230/src/rtsmart/rtsmart/kernel/rt-thread/components/lwp/arch/risc-v/rv64/lwp_arch.h:13,
from board/board.c:46:
/home/yanxu/.kendryte/k230_toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/riscv64-unknown-linux-musl/include/string.h:25:33: note: expected 'const void * restrict' but argument is of type 'long unsigned int'
25 | void *memcpy (void *__restrict, const void *__restrict, size_t);
| ^
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/clint.o
AS /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/context_gcc.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/cpuport.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/interrupt.o
AS /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/interrupt_gcc.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/mmu.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/plic.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/riscv_mmu.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/sbi.o
AS /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/startup_gcc.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/symbol_analysis.o
CC /home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/c908/syscall_c.o
scons: *** [/home/yanxu/rtos_k230/output/k230_rtos_01studio_defconfig/rtsmart/app_canmv/main.o] Error 1
scons: building terminated because of errors.
/bin/sh: 9: exit: Illegal number: .parse_config
make[1]: *** [Makefile:49:kernel] 错误 2
make: *** [Makefile:87:rtsmart] 错误 2
求助大佬解答,就只新使能了[*] Using USB host,出现的错误