cancel
Showing results for 
Search instead for 
Did you mean: 

How to overcome overlap error in stm8

saran raj
Associate III
Posted on December 05, 2017 at 14:40

I created one segment and using #pragma i store some values in that location.

If my code size cross that memory area means, overlap error occurs.

How can i overcome with this error?

3 REPLIES 3
luca239955_stm1_st
Senior II
Posted on December 06, 2017 at 19:37

putting values at a fixed address and code all around that is feasible but not easy.

If possible it's better to put your special segment (the one defined with the pragma) at the end of the memory.

Posted on December 07, 2017 at 10:53

Any Other options other than creating a segment at end of the memory?

If want to put values at fixed address at start or middle of the flash memory location means, what can i do?

Posted on December 07, 2017 at 12:46

no, there are no other options: the only way to put fixed values at fixed memory addresses is to create segments with the pragma and then place them in the linker file.

But, if you put your fixed values at the end of the code memory it will be easier to manage the overlap problems (because if there is an overlap, it means that you are out of memory anyway).

By the way, why the need for absolute addresses ? Maybe of you tell us what you are trying to achieve we can provide better suggestions.

Regards,

Luca