region `ROM' overflowed by xxxx bytes

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
xiaojie
Offline
Last seen:1 year 7 months ago
加入:2017-08-13 06:56
region `ROM' overflowed by xxxx bytes

Hello,

I am working on a customized board using DA14680 with SPI interface.

In my application, I need to write some bitmaps to SPI interface. I included all bitmaps in .h files. But I noticed I can only handle certain amount of bitmap files. If I included more, compiler will show build errors:


Building target: test_v1.elf
Invoking: Cross ARM C Linker
c:/program files (x86)/smartsnippets/smartsnippetsstudio/gcc/4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: test_v1.elf section `.text' will not fit in region `ROM'
c:/program files (x86)/smartsnippets/smartsnippetsstudio/gcc/4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `ROM' overflowed by 8480 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [test_v1.elf] Error 1

The project is modified from peripherals_demo in SDK. Is there anyway I can increase the size of "region `ROM'"? to avoid overflow? It will be helpful if someone can point me any documents describing this issue. Thanks a lot.

XJ

Keywords:
Device:
MT_dialog
Offline
Last seen:1 month 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi xiaojie,

Hi xiaojie,

没有明确的文档ly explains the error (), apparently the bitmaps that you have inserted in the code are too large for the flash limit to fit it (the flash space is considered as a ROM section). Check how much is the CODE_SIZE definition that the project has, by default is 128K, if you increase that you will be able to have extra room for the fw to compile.

Thanks MT_dialog

xiaojie
Offline
Last seen:1 year 7 months ago
加入:2017-08-13 06:56
Hello MT_dialog,

Hello MT_dialog,

After I increased CODE_SIZE to 256KB in bsp_defaults.h (#define dg_configQSPI_CODE_SIZE 256*1024), everything can pass.
Thanks for your help..

XJ