2013-10-31 02:13 AM
I am using STM8S 105C^Discovery with a Windows 8 Laptop. I tried to compile some example codes using Cosmic C Compiler with an Evaluation Key, but I got some errors.
Here is the message I got=========================================================----------- Project pwm - STM8 Cosmic - Configuration Debug -------------Compiling fwlib\project\stm8s_it.c...cxstm8 +mods0 +debug -pxp -no -pp -l -dSTM8S105 -ifwlib\project -ifwlib\library\inc -i''C:\Program Files\COSMIC\CXSTM8_EVAL\Hstm8'' -clDebug\ -coDebug\ fwlib\project\stm8s_it.cfwlib\project\stm8s_it.c:Compiling stm8_interrupt_vector.c...cxstm8 +mods0 +debug -pxp -no -pp -l -dSTM8S105 -ifwlib\project -ifwlib\library\inc -i''C:\Program Files\COSMIC\CXSTM8_EVAL\Hstm8'' -clDebug\ -coDebug\ stm8_interrupt_vector.cstm8_interrupt_vector.c:Running Linkerclnk -m Debug\pwm.map -l''C:\Program Files\COSMIC\CXSTM8_EVAL\Lib'' -o Debug\pwm.sm8 Debug\pwm.lkf #error clnk Debug\pwm.lkf:71 Debug\stm8_interrupt_vector.o: symbol f_NonHandledInterrupt multiply defined (Debug\stm8s_it.o) The command: ''clnk -m Debug\pwm.map -l''C:\Program Files\COSMIC\CXSTM8_EVAL\Lib'' -o Debug\pwm.sm8 Debug\pwm.lkf '' has failed, the returned value is: 1exit code=1.pwm.elf - 3 error(s), 0 warning(s)==============================================
I would appreciate if some one can advice me on how to solve this problem2017-05-31 01:18 PM
Maybe you don't include some files like as stm8sxxx_it.c,
stm8sxxx_it.h, stm8lxxx_conf.h
I had the same problem, but when I add this files in my project, the problem is gone.
2017-06-01 04:38 AM
Hi,
The message says that you have NonHandledInterrupt defined in two files:
stm8_interrupt_vector.c and stm8s_it.c
Just remove one of them.
Maksim.