Segment is too longer for segment definatin

I am working with the touch LCD Display interfaced with Atmega128A. But I got the error shown here.


It would be great guidance about the same

Obvíously either you allocate 0x4a more bytes of static data than the memory configuration allows, or your linker command script does not reflect the amount of available memory correctly. Given that the 128 doesn’t have a whole lot of memory on board, I suspect the former. In that case, there is nothing you can do but cut out every byte of static memory until you get below the critical threshold (everyday work for the embedded coder).

It’s been ages since I worked with IAR, so I don’t know how a linker command script is maintained there. You might want to post a query like that on the Partner subforum rather than kernel.

1 Like