Skip to main content
Visitor II
December 5, 2017
Question

How to overcome overlap error in stm8

  • December 5, 2017
  • 1 reply
  • 1144 views
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?

    This topic has been closed for replies.

    1 reply

    Visitor II
    December 6, 2017
    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.

    saran rajAuthor
    Visitor II
    December 7, 2017
    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?

    Visitor II
    December 7, 2017
    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