2016-09-06 12:02 PM
Hello, everyone!
I have a problem with my eval board. I carried out all step as said user manual: 1) download a STVD and STVP form : http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm8-software-development-tools/stm8-programmers/stvd-stm8.html 2) downloadCosmic tools for the STM8 family
from: http://www.cosmic-software.com/download.php&sharpstm8 3) download standard pheripheral Library form st site. 4) Create a workspace as shown in this video: https://www.youtube.com/watch?v=SlwlFo_xAe0 Now when i tried to build empty main.c everything is ok. When I tried to use some function from SPL, there's an linker error: Running Linker clnk -l''C:\Program Files (x86)\COSMIC\CXSTM8_EVAL\Lib'' -o Debug\template.sm8 -l''..\..\..\..\..\..\program files (x86)\cosmic\cxstm8_eval\lib'' -mDebug\template.map Debug\template.lkf &sharperror clnk Debug\template.lkf:1 symbol _GPIO_Init not defined (Debug\main.o ) The command: ''clnk -l''C:\Program Files (x86)\COSMIC\CXSTM8_EVAL\Lib'' -o Debug\template.sm8 -l''..\..\..\..\..\..\program files (x86)\cosmic\cxstm8_eval\lib'' -mDebug\template.map Debug\template.lkf '' has failed, the returned value is: 1 exit code=1. when the code look's: &sharpinclude ''stm8l15x.h'' void main(void) { //GPIO_DeInit(GPIOE); GPIO_Init(GPIOA, GPIO_Pin_7, GPIO_Mode_Out_PP_Low_Fast); while (1); { } } I know that is problem with configuration of environment, but I can't find any sloution to solve that problem. Can anybody help me? P.S Sorry for my English, I'm begginer. #stm8l-cosmic2016-09-06 11:58 PM
Hello,
You need to also add the relevant .c files to your project from the SPL. In this case the one that contains the _GPIO_Init() function. Hope that helps. Ian2017-10-06 06:59 PM
hi there....
well GPIO_Init is function in gpio standard peripheral library, Ian Legg was correct, my suggestion is try to include stm8s_gpio.h