arm-none-eabi/bin/ld: build/com.zubax.gnss.elf section `.text' will not fit in region `flash'

来源:互联网 发布:js顶部滑动菜单栏 编辑:程序博客网 时间:2024/06/05 07:15

出现如下错误:

/arm-none-eabi/bin/ld: build/com.zubax.gnss.elf section `.text' will not fit in region `flash'/arm-none-eabi/bin/ld: region `flash' overflowed by 5869 bytes

bootloader编译,.text已经超过预设大小。修改方案有两个:

精简代码
修改MEMORY预设值

ChibiOS
以ChibiOS为例,修改ld.ld文件和Makefile文件

# vi ld.ldMEMORY{MEMORY{    flash : org = 0x08000000, len = 32512/*增大此值*/   /* 32K for the bootloader minus 256 for the signature */    ram   : org = 0x20000100, len = 65280   /* First 256 bytes are reserved for bootloader/app communication */}}
# vi MakefileAPPLICATION_OFFSET = 32512  //与ld.ld中修改值对应,代码中会用到
阅读全文
1 0
原创粉丝点击