PX4安装到Ubuntu出现内存溢出的解决办法

编译时出现:

/home/ygl/gcc-arm-none-eabi-5_4-2016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: ../../nuttx_px4fmu-v2_default.elf section `.text' will not fit in region `flash'
/home/ygl/gcc-arm-none-eabi-5_4-2016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: address 0x8103924 of ../../nuttx_px4fmu-v2_default.elf section `__param' is not within region `flash'
/home/ygl/gcc-arm-none-eabi-5_4-2016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: address 0x8103924 of ../../nuttx_px4fmu-v2_default.elf section `__param' is not within region `flash'
/home/ygl/gcc-arm-none-eabi-5_4-2016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: address 0x8103924 of ../../nuttx_px4fmu-v2_default.elf section `__param' is not within region `flash'
/home/ygl/gcc-arm-none-eabi-5_4-2016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: region `flash' overflowed by 18133 bytes
collect2: error: ld returned 1 exit status
platforms/nuttx/CMakeFiles/nuttx_px4fmu-v2_default.elf.dir/build.make:224: recipe for target 'nuttx_px4fmu-v2_default.elf' failed
make[3]: *** [nuttx_px4fmu-v2_default.elf] Error 1
CMakeFiles/Makefile2:7209: recipe for target 'platforms/nuttx/CMakeFiles/nuttx_px4fmu-v2_default.elf.dir/all' failed
make[2]: *** [platforms/nuttx/CMakeFiles/nuttx_px4fmu-v2_default.elf.dir/all] Error 2
Makefile:105: recipe for target 'all' failed
make[1]: *** [all] Error 2
Makefile:176: recipe for target 'px4fmu-v2_default' failed
make: *** [px4fmu-v2_default] Error 2

解决办法:

打开编译后的文件 ./build/nuttx_px4fmu-v2_default/NuttX/nuttx/configs/px4fmu-v2/scripts/ld.script

将flash (rx) : ORIGIN = 0x08004000, LENGTH = 1008K

修改成flash (rx) : ORIGIN = 0x08004000, LENGTH = 1508K

 

参考:百度贴吧pixhawk吧,https://tieba.baidu.com/p/4742461734?red_tag=1798969688&traceid=

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值