Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22307

GCC BareMetal Linker Issue - Cortex M3

$
0
0

I have an issue during the linkage of my project. I use the GCC linker script from the manufacturer.

In there, i define the code section as follows:

MEMORY
{
  // .. deleted other sections
  CODE  (rx ) : ORIGIN = 0x0000B000, LENGTH = 0x00074000   /* 116 page(s) */
  // .. deleted other sections
}

so the code section beginning is located at 0xB000 and has a length of 0x74000. The length is 116 x 4096 bytes =>475136 bytes code size

my binary builds with the following size:

   text    data     bss     dec     hex filename
 432372       0  112048  522420   7f8b4 project.elf

therefore, it should link OK since the used size of 432372 (text + data) is way smaller than the available space of 475136.

it links ok as long as the binary code size is < ~422kBytes, as soon as it gets bigger, the linker tells me CODE section overflow, cannot link.

can someone explain me why not? i cannot see a reason for the link to tell me my code is too big, because it is not!


Viewing all articles
Browse latest Browse all 22307

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>