发帖
3 0 0

[Bug]: menuconfig.py 打开USB 支持后 build.py 报错: No SOURCES given to target: u

fivestarsky
注册会员

5

主题

4

回帖

157

积分

注册会员

积分
157
BW系列 28 3 5 小时前

Answers checklist.

  • I have read the documentation from RealMCU and the issue is not addressed there.
  • I have updated my ameba-rtos branch (master or release/v1.0) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker(closed and existing) for a similar issue and not found a similar issue.

Contact details

No response

Ameba-rtos branch.

master

Ameba-rtos version.

master release/v1.1

Ameba-rtos chip.

amebadplus

External hardware.

无任何外部硬件连接

Compile system used.

Linux

What is the expected behavior?

配置./menuconfig.py > CONFIG USB ---> > [*] Enable USB > Save
./build.py 成功

What is the actual behavior?

配置./menuconfig.py > CONFIG USB ---> > [*] Enable USB > Save
./build.py
提示
CMake Error at /home/hex/DevProject/ameba-rtos/cmake/utility_base.cmake:1484 (add_library):
No SOURCES given to target: usb_device_target_img2_km4
Call Stack (most recent call first):
/home/hex/DevProject/ameba-rtos/cmake/utility.cmake:136 (ameba_target_add)
/home/hex/DevProject/ameba-rtos/component/usb/device/usbd.cmake:124 (ameba_add_internal_library)
/home/hex/DevProject/ameba-rtos/component/usb/device/CMakeLists.txt:4 (include)

CMake Generate step failed. Build files cannot be regenerated correctly.
Error: Fail to build application
Error CMD : cd build && cmake "/home/hex/DevProject/ameba-rtos/amebadplus_gcc_project" -D CMAKE_REFACTOR="TRUE" -G Ninja && ninja

Relevant code.


Steps to reproduce.

  1. ./menuconfig.py
  2. CONFIG USB
  3. [*] Enable USB
  4. Save
  5. ./build.py

Relevant log output

❯ ./build.py
Note: No application specified, choose default project
ccache found
env toolchain path: /home/hex/DevTools/rtk-toolchain
Toolchain Version Matched
Git found: /usr/bin/git
Python3 found: /home/hex/DevProject/ameba-rtos/.venv/bin/python3.12
[INFOR][cmake/common.cmake|ameba_soc_project_check] soc project : amebadplus, soc type: amebadplus|AmebaDplus
env toolchain path: /home/hex/DevTools/rtk-toolchain
Toolchain Version Matched
Git found: /usr/bin/git
Python3 found: /home/hex/DevProject/ameba-rtos/.venv/bin/python3.12
[INFOR][project_km4/CMakeLists.txt] import config: /home/hex/DevProject/ameba-rtos/amebadplus_gcc_project/menuconfig/.config_km4
[INFOR][cmake/common.cmake|ameba_mcu_project_check] mcu project: km4, mcu: km4|KM4, isa: ARM, sdk: asdk, dir: /home/hex/DevProject/ameba-rtos/amebadplus_gcc_project/project_km4
[INFOR][cmake/common.cmake|ameba_mcu_project_check] freertos: /home/hex/DevProject/ameba-rtos/component/os/freertos/freertos_v10.4.3/Source
DAILY_BUILD = 0
env toolchain path: /home/hex/DevTools/rtk-toolchain
Toolchain Version Matched
Git found: /usr/bin/git
Python3 found: /home/hex/DevProject/ameba-rtos/.venv/bin/python3.12
[INFOR][project_km0/CMakeLists.txt] import config: /home/hex/DevProject/ameba-rtos/amebadplus_gcc_project/menuconfig/.config_km0
[INFOR][cmake/common.cmake|ameba_mcu_project_check] mcu project: km0, mcu: km0|KM0, isa: ARM, sdk: asdk, dir: /home/hex/DevProject/ameba-rtos/amebadplus_gcc_project/project_km0
[INFOR][cmake/common.cmake|ameba_mcu_project_check] freertos: /home/hex/DevProject/ameba-rtos/component/os/freertos/freertos_v10.4.3/Source
DAILY_BUILD = 0
[INFOR][cmake/utility.cmake|ameba_add_subdirectory] CONFIG_BT is off, bluetooth will not be built
-- Configuring done (4.1s)
CMake Error at /home/hex/DevProject/ameba-rtos/cmake/utility_base.cmake:1484 (add_library):
  No SOURCES given to target: usb_device_target_img2_km4
Call Stack (most recent call first):
  /home/hex/DevProject/ameba-rtos/cmake/utility.cmake:136 (ameba_target_add)
  /home/hex/DevProject/ameba-rtos/component/usb/device/usbd.cmake:124 (ameba_add_internal_library)
  /home/hex/DevProject/ameba-rtos/component/usb/device/CMakeLists.txt:4 (include)


CMake Generate step failed.  Build files cannot be regenerated correctly.
Error: Fail to build application
Error CMD :  cd build && cmake "/home/hex/DevProject/ameba-rtos/amebadplus_gcc_project" -D CMAKE_REFACTOR="TRUE" -G Ninja && ninja

More information.

No response

──── 0人觉得很赞 ────

使用道具 举报

4 小时前
我使用的是昨天从 https://github.com/Ameba-AIoT/ameba-rtos/ git 下载的 master 和 release/v1.1  两个版本,都不行,昨天https://github.com/Ameba-AIoT/ameba-rtos 把所有branch 都更新了,我下载的是更新后的 master 和 release/v1.1  进行测试
3 小时前
选择 Enable USB 后 将 CDC ACM 也选上,可以编译通过
fivestarsky 发表于 2025-4-24 11:39
选择 Enable USB 后 将 CDC ACM 也选上,可以编译通过

问题解决了是吧
您需要登录后才可以回帖 立即登录
高级模式
返回
统计信息
  • 会员数: 28579 个
  • 话题数: 40683 篇