This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Scatter loading trouble

I have found this in the user manual of the linker:

L6788E: Scatter-loading of execution region <er1name> will cause the contents of execution region <er2name> to be corrupted at run-time.

This occurs when scatter-loading takes place and an execution region is put in a position where is overwrites partially or wholly another execution region; be it itself or another one.

Eg.

This will work:

LOAD_ROM 0x0000 0x4000

{
   EXEC1 0x0000 0x4000
   {
       * (+RO)
   }

   EXEC2 0x4000 0x4000
   {
      * (+RW,+ZI)
   }
}

This will generate the error:

LOAD_ROM 0x0000 0x4000

{
   EXEC1 0x4000 0x4000
   {
      * (+RW,+ZI)
   }

   EXEC2 0x0000 0x4000
   {
      * (+RO)
   }
}

Error: L6788E: Scatter-loading of execution region EXEC2 will cause the contents of execution region EXEC2 to be corrupted at run-time.

I have read the relevant chapters, but I don't understand WHY the second example generates an error. can somebody give me a hint?

0