PX4固件编译问题region `flash‘ overflowed by 4253 bytes

博客内容讲述了在嵌入式系统中遇到的固件大小超过flash存储限制的问题。编译过程中,由于内存区域使用超出预期,导致ld链接错误。解决方案是调整内存分区设置,增大flash容量到2032KB,重新编译以避免溢出。此问题涉及到嵌入式系统的内存管理与固件优化。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Memory region         Used Size  Region Size  %age Used
           flash:     1036445 B      1008 KB    100.41%
            sram:       25428 B       192 KB     12.93%
          ccsram:          0 GB        64 KB      0.00%
/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: ../../px4_fmu-v2_default.elf section `.text' will not fit in region `flash'
/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: region `flash' overflowed by 4253 bytes
collect2: error: ld returned 1 exit status
platforms/nuttx/CMakeFiles/px4.dir/build.make:268: recipe for target 'px4_fmu-v2_default.elf' failed
make[3]: *** [px4_fmu-v2_default.elf] Error 1
CMakeFiles/Makefile2:11700: 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:219: recipe for target 'px4_fmu-v2_default' failed
make: *** [px4_fmu-v2_default] Error 2

问题原因:固件大小超过flash设定限额。

解决方法:移除不必要模块或者添加flash设定的限额。

在这里插入图片描述

把1008K改成2032K,再次编译即可! 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值