2016-04-08 08:04 AM
Hello everyone!
Currently I'm switching from an Atmel ATTiny to a STM8 microcontroller and so I'm evaluating different IDEs and compilers. I started with a combination of the ST Visual Development and the COSMIC STM8 Compiler (Cosmic CXSTM8 Special Edition 4.4.4). So far, it worked quite nice. I migrated the ATTiny code step by step to the STM environment. I always used both, the Debug builds and Release builds on my target. But at one point, there seems to be a limit to the Release build:
Running Linker
clnk -l''C:\Program Files (x86)\COSMIC\FSE_Compilers\CXSTM8\Lib'' -o Release\stm8s003.sm8 Release\stm8s003.lkf
#error clnk Release\stm8s003. segment .text size overflow (164)
The command: ''clnk -l''C:\Program Files (x86)\COSMIC\FSE_Compilers\CXSTM8\Lib'' -o Release\stm8s003.sm8 Release\stm8s003.lkf '' has failed, the returned value is: 1
exit code=1.
When I remove code, the number (164) reduces. The Debug build is ok without any problems. Is there any limit to the linker? or does anyone have a hint?
Thanks!
Chris
2016-04-08 09:37 AM
Ok, damn, - it was just the code size.
I switched the optimization to ''minimize code size'' and now it works :)...Also ''split functions into separate sections'' worksBut how can I see how big my code is? Is there a statistic somewhere? - In the programmer window I can just see how big the .s19 files are... and in my case they are always same size.2016-09-08 06:47 AM
the map file created by the linker contains all the information you need about code size and memory usage.
Regards, Luca