Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
Cmake
SCons
scons--dist
scons --dist 生成的 CMake 工程没有把 RT系统文件复制进来,而是用相对路径引用了外部文件,导致工程没法移动路径
发布于 2023-04-29 16:43:59 浏览:594
订阅该版
刚接触 RT-Thread,准备用在 GD32 上,开发环境为 Ubuntu + GCC,用 CMake 组织工程。 配置的 bsp 是 **gd32303e-eval**,然后使用命令 `scons --dist --target=cmake` 创建工程文件夹。按照说明,创建出来的这个文件夹是独立的,可以任意拷贝。但是实际上不可以移动文件夹路径,因为 RT-Thread 的系统文件都没有复制进来。这样子就很难受了?,想请大家帮忙看看是什么原因。 生成的工程里 CMakeLists 是这么写的: ``` INCLUDE_DIRECTORIES( applications ../../../../components/libc/compilers/newlib ../../../../components/libc/compilers/common/include ../../../../components/libc/cplusplus ../../../../libcpu/arm/common ../../../../libcpu/arm/cortex-m4 ../../../../components/drivers/include ../../../../components/drivers/spi ../../../../components/drivers/sensor drivers ../../../../components/finsh . ../../../../include Libraries/CMSIS/GD/GD32F30x/Include Libraries/CMSIS Libraries/GD32F30x_standard_peripheral/Include packages/easyblink-v2.0.1 ../../../../components/libc/posix/ipc ../../../../components/libc/posix/io/poll ../../../../components/libc/posix/io/stdio ../../../../components/utilities/utest ../../../../examples/utest/testcases/mm ../../../../examples/utest/testcases/kernel ../../../../examples/utest/testcases/utest ../../../../components/utilities/ulog ) SET(PROJECT_SOURCES applications/main.c ../../../../components/libc/compilers/common/cctype.c ../../../../components/libc/compilers/common/cstdio.c ../../../../components/libc/compilers/common/cstdlib.c ../../../../components/libc/compilers/common/cstring.c ../../../../components/libc/compilers/common/ctime.c ../../../../components/libc/compilers/common/cwchar.c ../../../../components/libc/compilers/newlib/syscalls.c ../../../../components/libc/cplusplus/cxx_crt.cpp ../../../../components/libc/cplusplus/cxx_Mutex.cpp ../../../../components/libc/cplusplus/cxx_Semaphore.cpp ../../../../components/libc/cplusplus/cxx_Thread.cpp ../../../../components/libc/cplusplus/cxx_crt_init.c ../../../../libcpu/arm/common/div0.c ../../../../libcpu/arm/common/showmem.c ../../../../libcpu/arm/cortex-m4/context_gcc.S ../../../../libcpu/arm/cortex-m4/cpuport.c ../../../../components/drivers/i2c/i2c_core.c ../../../../components/drivers/i2c/i2c_dev.c ../../../../components/drivers/ipc/completion.c ../../../../components/drivers/ipc/dataqueue.c ../../../../components/drivers/ipc/pipe.c ../../../../components/drivers/ipc/ringblk_buf.c ../../../../components/drivers/ipc/ringbuffer.c ../../../../components/drivers/ipc/waitqueue.c ../../../../components/drivers/ipc/workqueue.c ../../../../components/drivers/misc/adc.c ../../../../components/drivers/misc/pin.c ../../../../components/drivers/misc/rt_drv_pwm.c ../../../../components/drivers/sensor/sensor.c ../../../../components/drivers/sensor/sensor_cmd.c ../../../../components/drivers/serial/serial.c ../../../../components/drivers/spi/spi_core.c ../../../../components/drivers/spi/spi_dev.c ../../../../components/drivers/watchdog/watchdog.c drivers/drv_gpio.c drivers/drv_spi.c drivers/drv_usart.c drivers/board.c drivers/drv_i2c.c ../../../../components/finsh/msh_parse.c ../../../../components/finsh/cmd.c ../../../../components/finsh/msh.c ../../../../components/finsh/shell.c ../../../../src/clock.c ../../../../src/components.c ../../../../src/device.c ../../../../src/idle.c ../../../../src/ipc.c ../../../../src/irq.c ../../../../src/kservice.c ../../../../src/mem.c ../../../../src/mempool.c ../../../../src/object.c ../../../../src/scheduler_up.c ../../../../src/thread.c ../../../../src/timer.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_exti.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_timer.c Libraries/CMSIS/GD/GD32F30x/Source/GCC/startup_gd32f30x_hd.S Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_exmc.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_dma.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_can.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_pmu.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_fwdgt.c Libraries/CMSIS/GD/GD32F30x/Source/system_gd32f30x.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_fmc.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_bkp.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_dac.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_sdio.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_spi.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_dbg.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_rcu.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_usart.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_wwdgt.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_misc.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_i2c.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_enet.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_ctc.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_adc.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_crc.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_rtc.c Libraries/GD32F30x_standard_peripheral/Source/gd32f30x_gpio.c packages/easyblink-v2.0.1/easyblink.c packages/rt_vsnprintf_full-latest/rt_vsnprintf.c ../../../../components/utilities/utest/utest.c ../../../../examples/utest/testcases/kernel/mem_tc.c ../../../../examples/utest/testcases/utest/pass_tc.c ../../../../components/utilities/ulog/backend/console_be.c ../../../../components/utilities/ulog/ulog.c ) ``` 头文件目录和源码文件里,RT-Thread 的系统文件都用了相对路径 `../../../../` 来引用了文件夹外部的文件,这样子工程还是不能移动呀。 手动复制文件进来,改 CMakeLists 当然是可以的,但是如果重新配置之后再 `scons --dist --target=cmake` 又要手动修改了。 请大家帮忙看看这个问题,谢谢?
查看更多
yangjie
认证专家
2023-05-04
hello
估计和版本有关系吧,新的版本没有这个问题了。 要不你先 scons --dist 再在dist文件夹下的工程里面执行 scons --target=cmake
1
个回答
默认排序
按发布时间排序
撰写答案
登录
注册新账号
关注者
0
被浏览
594
关于作者
Puyu9499
这家伙很懒,什么也没写!
提问
1
回答
1
被采纳
1
关注TA
发私信
相关问题
1
scons不支持python3吗?
2
编译又出现问题
3
BSP目录下做好一个项目后,怎么把发给别人的包裁剪的小...
4
为什么重新scons --target=mdk 后,以前在MDK工程里保存的C文
5
Scons 添加Group,SConscript已经执行,源码却没有添加进工程
6
scons如何指定输出目录?
7
新人求助。
8
想用env 工具自己构建编译环境想用vscode 进行一些简单程序
9
关于scons脚本问题
10
使用scons --target=makefile的问题
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
简单两步配置RTT源码阅读环境 vsc+clangd
2
恩智浦[FRDM-MCXN947]初探 之 ADC与DAC
3
LVGL使用字库IC芯片显示中文
4
基于STM32H750和Rt-Thread的CANFD通信实现的记录(一)
5
freemodbus主机在freertos的适配,参考rtthread例程
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
UART
WIZnet_W5500
ota在线升级
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
编译报错
Debug
SFUD
msh
rt_mq_消息队列_msg_queue
keil_MDK
ulog
MicroPython
C++_cpp
本月问答贡献
出出啊
1517
个答案
342
次被采纳
小小李sunny
1443
个答案
289
次被采纳
张世争
805
个答案
174
次被采纳
crystal266
547
个答案
161
次被采纳
whj467467222
1222
个答案
148
次被采纳
本月文章贡献
出出啊
1
篇文章
4
次点赞
小小李sunny
1
篇文章
1
次点赞
张世争
1
篇文章
1
次点赞
crystal266
2
篇文章
2
次点赞
whj467467222
2
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部