2017-04-06 07:20 AM
Hi.
I change memory model and libraries for code larger than 64K.
The error receive after linking:
#error clnk Debug\canli.lkf:1 symbol __stext not defined (Debug\stm8l_stl_startup.o ) The command: 'clnk -l'C:\Program Files (x86)\COSMIC\FSE_Compilers\CXSTM8\Lib' -o Debug\canli.sm8 -mDebug\canli.map Debug\canli.lkf ' has failed, the returned value is: 1The code is #define GotoCompilerStartUp() _asm('xdef __stext\n jp __stext\n'); /* _stext() */
When i change
memory model and libraries for code larger than 64K, Should i update assambly code in different way?
Best regards.
irfan
2017-04-07 01:42 AM
Hello,
change __stext with f__stext .
Regards,
Luca
2017-04-11 01:18 AM
,
,
You mean is, ,
♯ define GotoCompilerStartUp() _asm('xdef f__stext\n jp f__stext\n'), ,
if yes, ,the error is keeep going.
♯ error clnk Debug\canli.lkf:1 symbol f__stext not defined (Debug\stm8l_stl_startup.o )
i am new for cosmic so Can you describe detailly?
Regards,
irfan
2017-04-11 02:21 AM
Hello,
the symbol __stext (or f__stext when you use long memory models in order to use memory above address 0xFFFF) is defined in the startup (crts.s the source is available in the subdirectory /hstm8 of the compiler) file and is the entry point after a reset. Simple applications know nothing about this symbol, but complex application sometimes need to execute a sw reset and therefore jump to it.
If you replace __stext with f__stext in all your application (and also 'jp __stext' with 'jpf f__stext', I forgot in my previous message) all should work ok. Maybe you did not recompile that file? Or you have more than one occurrence of the __stext symbol?
Regards,
Luca
2017-04-11 03:39 AM
Thank you.
i add
crts.s file manually and all compile ok.
But Should i had to add
crts.s to my project?.
Why Setting like below is not add crts.s to in my project automatically?
2017-04-11 05:24 AM
When i run the software, software has problem such as RAM, stack and etc.
Should i add
crts.s file to in my project manually or not?
2017-04-11 10:40 AM
Hello,
use crtsi instead of crts, it also does variables initialization in the data section and that might be the problem you see.
You surely need to have one 'crts' (C Run Time Startup) file in your application (usually crtsi) to perform all the initializations needed by the C langiage environment: you can add it manually to your projet or use the precompiled version and just link it, depending on your preferences and on the way used by default by your IDE.
Regards,
Luca