Hi,
I'm getting an error when building the example program blinky that says: ".text is larger than specified size" and ".rodata is larger than specified size".
I'm using version 17.1.0 of the nRF5 SDK, and version 6.32 of SES for ARM (64 bit).
Hi,
I'm getting an error when building the example program blinky that says: ".text is larger than specified size" and ".rodata is larger than specified size".
I'm using version 17.1.0 of the nRF5 SDK, and version 6.32 of SES for ARM (64 bit).
Hi,
Please look at the file "flash_placement.xml" in your project folder.
you shoule see:
Hello I faced the same problem as the op. So I have two questions:
Thanks
A minor clarification...
Look in flash_placement.xml in the ses subdirectory.
You should see:
<ProgramSection alignment="4" load="Yes" name=".text" size="0x4" />
and
<ProgramSection alignment="4" load="Yes" name=".rodata" size="0x4" />
Remove: size="0x4" from both lines resulting in:
<ProgramSection alignment="4" load="Yes" name=".text" />
and
<ProgramSection alignment="4" load="Yes" name=".rodata" />
I have no idea why this works.
A minor clarification...
Look in flash_placement.xml in the ses subdirectory.
You should see:
<ProgramSection alignment="4" load="Yes" name=".text" size="0x4" />
and
<ProgramSection alignment="4" load="Yes" name=".rodata" size="0x4" />
Remove: size="0x4" from both lines resulting in:
<ProgramSection alignment="4" load="Yes" name=".text" />
and
<ProgramSection alignment="4" load="Yes" name=".rodata" />
I have no idea why this works.
Hi,
You remove size="0x4" and it work because.
.text is related to the code size and .rodata is related to the constant data size.
So, when you put size="0x4", that mean you limit your code size to 4 bytes and limit your constant data to 4 bytes also.,
even a simple code like the blinky example. it take about 4Kbytes
So, If you need to set the size of this code, you have to set the size bigger than your code such as size="0x1000" (1024 * 4 = 4096 bytes, 4Kbytes). It will work.
Regards,
I imagine that it might have something to do with packing the data. Could it be that if you align everything on 4-byte boundaries, it uses too much padding? Just a thought.