4

阿木币

0

精华

4 小时

在线时间

老司机

Rank: 2

发表于 2019-4-12 23:11:48 5151 浏览 9 回复

源码编译100%时出现的问题,应该是内存溢出

上述问题按照网上经验没有得到解决,结果和原来一样

出现的问题

出现的问题

网上的解决方法

网上的解决方法

扫一扫浏览分享
回复

使用道具 举报

28

阿木币

0

精华

9 小时

在线时间

应届白菜

Rank: 1

发表于 2019-4-13 09:41:49
1:你的编译器版本检查一下,现在最新的PX4用的是2017版本的arm-none-gcc 了。
2: 另外为了让代码更高效的编译,官网现在推荐使用ninja 进行编译,看您的编译界面,您的环境需要再更新一下
回复 点赞

使用道具 举报

4

阿木币

0

精华

4 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2019-4-13 23:23:37
AmovlabAbner 发表于 2019-4-13 09:41
1:你的编译器版本检查一下,现在最新的PX4用的是2017版本的arm-none-gcc 了。
2: 另外为了让代码更高效的 ...

不好意思,可能我的问题不是内存溢出,我的gcc版本是最新的,主要的错误是failed to merge target specific data of file,翻译过来是合并文件的目标特定数据失败。

                               
登录/注册后可看大图
回复 点赞

使用道具 举报

4

阿木币

0

精华

4 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2019-4-13 23:24:31
ace7012 发表于 2019-4-13 23:23
不好意思,可能我的问题不是内存溢出,我的gcc版本是最新的,主要的错误是failed to merge target specif ...

/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: ../../px4_fmu-v2_default.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-sf_scalbn.o) does not
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-sf_scalbn.o)
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: ../../px4_fmu-v2_default.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_copysign.o) does not
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_copysign.o)
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: ../../px4_fmu-v2_default.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-sf_copysign.o) does not
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-sf_copysign.o)
collect2: error: ld returned 1 exit status
platforms/nuttx/CMakeFiles/px4.dir/build.make:239: recipe for target 'px4_fmu-v2_default.elf' failed
make[3]: *** [px4_fmu-v2_default.elf] Error 1
CMakeFiles/Makefile2:8087: recipe for target 'platforms/nuttx/CMakeFiles/px4.dir/all' failed
make[2]: *** [platforms/nuttx/CMakeFiles/px4.dir/all] Error 2
Makefile:105: recipe for target 'all' failed
make[1]: *** [all] Error 2
Makefile:190: recipe for target 'px4_fmu-v2_default' failed
make: *** [px4_fmu-v2_default] Error 2


这是最后几行错误
回复 点赞

使用道具 举报

131

阿木币

0

精华

273 小时

在线时间

管理员

Rank: 9Rank: 9Rank: 9

发表于 2019-4-15 11:59:40
ace7012 发表于 2019-4-13 23:24
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: ../../px4_fmu-v2_default.el ...

应该是环境的问题
我不为己,谁人为我,但我只为己,那我又是谁?
回复 点赞

使用道具 举报

131

阿木币

0

精华

273 小时

在线时间

管理员

Rank: 9Rank: 9Rank: 9

发表于 2019-4-15 12:00:09
AmovlabAbner 发表于 2019-4-13 09:41
1:你的编译器版本检查一下,现在最新的PX4用的是2017版本的arm-none-gcc 了。
2: 另外为了让代码更高效的 ...

我们应该出一个,编译问题的视频
我不为己,谁人为我,但我只为己,那我又是谁?
回复 点赞

使用道具 举报

12

阿木币

0

精华

15 小时

在线时间

应届白菜

Rank: 1

发表于 2019-4-15 19:02:03
ace7012 发表于 2019-4-13 23:24
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: ../../px4_fmu-v2_default.el ...

看着像是编译环境问题,你可以看一下arm-none-eabi的版本,另外也可以试着在Firmware的文件目录下输入
git submodule update --init --recursive
回复 点赞

使用道具 举报

4

阿木币

0

精华

4 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2019-4-17 11:20:38
本帖最后由 ace7012 于 2019-4-17 11:26 编辑

问题已解决,是上面大家说的环境问题,以下是解决过程:
删除旧版本arm-none-eabi-gcc,删除旧版本并安装新版本过程见聊天图中网址

                               
登录/注册后可看大图

安装好以后如果之前已经用过make px4fmu-v2_default可能会出现如下问题C:\Users\华硕\Desktop\重装交叉编译环境后的问题.jpg

解决方法:删除firmware下px4fmu-v2的build文件夹重新make px4fmu-v2_default,成功:

                               
登录/注册后可看大图

回复 点赞

使用道具 举报

4

阿木币

0

精华

4 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2019-4-17 11:21:12
本帖最后由 ace7012 于 2019-4-17 11:30 编辑


                               
登录/注册后可看大图
怎么上传不了图片
回复 点赞

使用道具 举报

47

阿木币

1

精华

2331 小时

在线时间

管理员

Rank: 9Rank: 9Rank: 9

发表于 2019-4-17 12:47:15
ace7012 发表于 2019-4-17 11:21
怎么上传不了图片

你回复的时候点击高级模式啊 ,右上角。
回复 点赞

使用道具 举报

返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表