Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
mo动态模块_Module
应用模块编译出问题
发布于 2017-05-22 10:19:44 浏览:2699
订阅该版
[tocm] 想在正点原子的阿波罗开发板上使用应用模块,参考最新的realboard板子, 模块程序目录D: t-thread_dev t-threadexamplesmoduleasicapp BSP目录下用scons --target=ua -s生成了rtua.py rtconfig.py 如下: ```import os cwd = os.path.split(os.path.realpath(__file__))[0] # RT-Thread root directory RTT_ROOT = 'D:/rt-thread_dev/rt-thread' BSP_ROOT = 'D:/rt-thread_dev/rt-thread/bsp/stm32f767-apollo' # toolchains EXEC_PATH = 'C:/Program Files (x86)/GNU Tools ARM Embedded/5.4 2016q3' if os.getenv('RTT_ROOT'): RTT_ROOT = os.getenv('RTT_ROOT') if os.getenv('BSP_ROOT'): BSP_ROOT = os.getenv('BSP_ROOT') if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') PLATFORM = 'gcc' PREFIX = 'arm-none-eabi-' CC = PREFIX + 'gcc' CXX = PREFIX + 'g++' AS = PREFIX + 'gcc' AR = PREFIX + 'ar' LINK = PREFIX + 'gcc' TARGET_EXT = 'mo' SIZE = PREFIX + 'size' OBJDUMP = PREFIX + 'objdump' OBJCPY = PREFIX + 'objcopy' DEVICE = ' -mcpu=cortex-m7' CFLAGS = DEVICE + ' -mthumb -mlong-calls -O0 -fPIC -fno-exceptions' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' LFLAGS = DEVICE + ' -mthumb -Wl,-z,max-page-size=0x4 -shared -fPIC -e main -nostdlib' CPATH = '' LPATH = '' ``` SConstruct如下: ```import os import sys import rtconfig sconstruct = File('SConstruct') fn = sconstruct.rfile() name = fn.name building_dir = os.path.dirname(fn.abspath) program_dir = '../bin' from rtconfig import RTT_ROOT from rtconfig import BSP_ROOT sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools'), BSP_ROOT] from building import * from rtua import GetCPPPATH from rtua import GetCPPDEFINES Export('RTT_ROOT') Export('BSP_ROOT') # add target option AddOption('--app', dest='app', nargs=1, type='string', action='store', metavar='DIR', help='installation prefix') # add target option AddOption('--type', dest='type', nargs=1, type='string', action='store', metavar='DIR', help='installation prefix') if GetOption('type') == 'ext': linkflags = rtconfig.LFLAGS + ' -e 0' else: linkflags = rtconfig.LFLAGS + ' -e main' CPPPATH = GetCPPPATH(BSP_ROOT, RTT_ROOT) env = Environment(tools = ['mingw'], AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS, CXX = rtconfig.CXX, AR = rtconfig.AR, ARFLAGS = '-rc', LINK = rtconfig.LINK, LINKFLAGS = linkflags, CPPPATH = CPPPATH) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) PrepareModuleBuilding(env, RTT_ROOT, BSP_ROOT) app = GetOption('app') if app: objs = SConscript(os.path.join(app, 'D:/rt-thread_dev/rt-thread/examples/module/basicapp/SConscript')) TARGET = os.path.join(app , app + '.' + rtconfig.TARGET_EXT) # build program target = env.Program(TARGET, objs) env.Command("$TARGET", target, action = Copy(program_dir, TARGET)) ``` D: t-thread_dev t-threadexamplesmoduleasicapp下运行 scons --app=basicapp报错 ```scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... arm-none-eabi-gcc -o basicapp.o -c -mcpu=cortex-m7 -mthumb -mlong-calls -O0 -fPIC -fno-exceptions -ID: t-thread_dev t-threadspstm32f767-apollo -ID: t-thread_dev t-threadspstm32f767-apolloapplications -ID: t-thread_dev t-threadspstm32f767-apollodrivers -ID: t-thread_dev t-threadcomponentsdfsfilesystemsdevfs -ID: t-thread_dev t-threadcomponentsdfsfilesystemselmfat -ID: t-thread_dev t-threadcomponentsdfsinclude -ID: t-thread_dev t-threadcomponentsdriversinclude -ID: t-thread_dev t-threadcomponentsdriversspi -ID: t-thread_dev t-threadcomponentsexternalluaapplications -ID: t-thread_dev t-threadcomponentsexternalluaexlibs -ID: t-thread_dev t-threadcomponentsexternallualua -ID: t-thread_dev t-threadcomponentsexternallua est -ID: t-thread_dev t-threadcomponentsfinsh -ID: t-thread_dev t-threadcomponentslibc ewlib -ID: t-thread_dev t-threadcomponentslibcpthreads -ID: t-thread_dev t-threadinclude -ID: t-thread_dev t-threadlibcpuarmcommon -ID: t-thread_dev t-threadlibcpuarmcortex-m7 basicapp.c Error in calling: arm-none-eabi-gcc -o "basicapp.o" -c -mcpu=cortex-m7 -mthumb -mlong-calls -O0 -fPIC -fno-exceptions -ID: t-thread_dev t-threadspstm32f767-apollo -ID: t-thread_dev t-threadspstm32f767-apolloapplications -ID: t-thread_dev t-threadspstm32f767-apollodrivers -ID: t-thread_dev t-threadcomponentsdfsfilesystemsdevfs -ID: t-thread_dev t-threadcomponentsdfsfilesystemselmfat -ID: t-thread_dev t-threadcomponentsdfsinclude -ID: t-thread_dev t-threadcomponentsdriversinclude -ID: t-thread_dev t-threadcomponentsdriversspi -ID: t-thread_dev t-threadcomponentsexternalluaapplications -ID: t-thread_dev t-threadcomponentsexternalluaexlibs -ID: t-thread_dev t-threadcomponentsexternallualua -ID: t-thread_dev t-threadcomponentsexternallua est -ID: t-thread_dev t-threadcomponentsfinsh -ID: t-thread_dev t-threadcomponentslibc ewlib -ID: t-thread_dev t-threadcomponentslibcpthreads -ID: t-thread_dev t-threadinclude -ID: t-thread_dev t-threadlibcpuarmcommon -ID: t-thread_dev t-threadlibcpuarmcortex-m7 "basicapp.c" Exception: [Error 2] : No such file or directory scons: building terminated because of errors. 但是命令行运行单独这个命令可以生成basicapp.o arm-none-eabi-gcc -o basicapp.o -c -mcpu=cortex-m7 -mthumb -mlong-calls -O0 -fPIC -fno-exceptions -ID: t-thread_dev t-threadspstm32f767-apollo -ID: t-thread_dev t-threadspstm32f767-apolloapplications -ID: t-thread_dev t-threadspstm32f767-apollodrivers -ID: t-thread_dev t-threadcomponentsdfsfilesystemsdevfs -ID: t-thread_dev t-threadcomponentsdfsfilesystemselmfat -ID: t-thread_dev t-threadcomponentsdfsinclude -ID: t-thread_dev t-threadcomponentsdriversinclude -ID: t-thread_dev t-threadcomponentsdriversspi -ID: t-thread_dev t-threadcomponentsexternalluaapplications -ID: t-thread_dev t-threadcomponentsexternalluaexlibs -ID: t-thread_dev t-threadcomponentsexternallualua -ID: t-thread_dev t-threadcomponentsexternallua est -ID: t-thread_dev t-threadcomponentsfinsh -ID: t-thread_dev t-threadcomponentslibc ewlib -ID: t-thread_dev t-threadcomponentslibcpthreads -ID: t-thread_dev t-threadinclude -ID: t-thread_dev t-threadlibcpuarmcommon -ID: t-thread_dev t-threadlibcpuarmcortex-m7 basicapp.c ``` 发现tools下的building.py等有变化,不知道是不是有影响。
查看更多
3
个回答
默认排序
按发布时间排序
bernard
2017-05-22
这家伙很懒,什么也没写!
scons用的arm-none-eabi-gcc都不是命令行路径里配置的,需要在配置文件里制定,所以依然还是gcc未找到
jeffwei
2017-05-22
这家伙很懒,什么也没写!
在rtconfig.py配置了GCC路径的,缺少/bin ``` # toolchains EXEC_PATH = 'C:/Program Files (x86)/GNU Tools ARM Embedded/5.4 2016q3' EXEC_PATH = 'C:/Program Files (x86)/GNU Tools ARM Embedded/5.4 2016q3/bin' ```
撰写答案
登录
注册新账号
关注者
0
被浏览
2.7k
关于作者
jeffwei
这家伙很懒,什么也没写!
提问
17
回答
122
被采纳
0
关注TA
发私信
相关问题
1
貌似stm32f10x的应用模块在1.2.x版本不能正常编译
2
应用模块打开之后unload之后还在内存中
3
关于module.c的_load_shared_object的疑问
4
应用模块的rt_module_unload函数的bug
5
rtt 如何实现动态加载app
6
使用zmodem传输文件,应用模块文件传输完成,访问失败
7
RTT下应用模块编译具体方法
8
RTT应用模块编译出错
9
RTT应用模块编译问题
10
求问动态模块是什么意思呢
推荐文章
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
开源共生 商业共赢 | RT-Thread 2024开发者大会议程正式发布!
2
【24嵌入式设计大赛】基于RT-Thread星火一号的智慧家居系统
3
RT-Thread EtherKit开源以太网硬件正式发布
4
如何在master上的BSP中添加配置yml文件
5
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
热门标签
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
WIZnet_W5500
UART
ota在线升级
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
rt_mq_消息队列_msg_queue
keil_MDK
ulog
MicroPython
C++_cpp
本月问答贡献
a1012112796
20
个答案
3
次被采纳
张世争
11
个答案
3
次被采纳
踩姑娘的小蘑菇
7
个答案
3
次被采纳
rv666
9
个答案
2
次被采纳
用户名由3_15位
13
个答案
1
次被采纳
本月文章贡献
程序员阿伟
9
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
RTT_逍遥
1
篇文章
6
次点赞
大龄码农
1
篇文章
5
次点赞
ThinkCode
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部