AnsweredAssumed Answered

Section Boundary Crossing linker error

Question asked by Guillermo Corrales on Mar 6, 2018
Latest reply on Mar 8, 2018 by Guillermo Corrales

Hi all,

 

I'm developing an application (PROJECT) for a STM8S208RB (128k flash) that was using around 100kB of flash. Now I have added a new library (LIBRARY) that has increased memory usage to 120kB of flash.

 

Now, when I delete some code in my application I get the following error:

 

#error clnk PROJECT_release\PROJECT.lkf:152 PROJECT_release\library_api.o: section boundary crossing (.text:095c) f_LIBRARY_SetListCallback


The command: "clnk -l"C:\Program Files (x86)\COSMIC\FSE_Compilers\Lib" -o PROJECT_release\project.sm8 -mPROJECT_release\PROJECT.map PROJECT_release\PROJECT.lkf" has failed, the returned value is: 1
exit code=1.

(I get this error after commenting an if-else related with the library)

(LIBRARY_SetListCallback is a function related with the library, but it doesn't have any relation with the if-else)

 

I'm using the following compiler options:

  • Long Stack (+modsl)
  • Minimize code size (+compact)
  • Enforce Prototyping Functions (-pp)
  • Allow Pointer Narrowing (-pnp)
  • Compiler options (-gnc) and (-nocross) was not used.

 

I'm using the following linker options:

  • Interrupt vector on 0x8000
  • Code/Constants from 0x8080 to 0x27FFF
  • Zero page from 0x0000 to 0x00FF
  • RAM from 0x0100 to 0x13FF

This is my memory sections map:

 

 

--------
Segments
--------

start 00008080 end 0000ba6c length 14828 segment .const
start 0000bd17 end 000258f4 length 105437 segment .text
start 00004000 end 00004000 length 0 segment .eeprom
start 00000000 end 00000000 length 0 segment .bsct
start 00000000 end 0000000a length 10 segment .ubsct
start 0000000a end 0000000a length 0 segment .bit
start 0000000a end 0000000a length 0 segment .share
start 00000100 end 000003a3 length 675 segment .data, initialized
start 0000ba74 end 0000bd17 length 675 segment .data, from
start 000003a3 end 00001380 length 4061 segment .bss
start 00000000 end 000079be length 31166 segment .info.
start 00008000 end 00008080 length 128 segment .const
start 0000ba6c end 0000ba74 length 8 segment .init

 

I looked for this error code in the STM8 forum but I couldn't find a answer that would help me.

 

Has anybody any idea of how to solve this linker error?

 

Thanks all of you in advance,

 

Guillermo,

 

 

 

Outcomes