2021-01-30 01:54 AM
I have posted already that I am using STM8152R8 nucleo board
I have downloaded cosmic c compiler and it's license file too. I have also downloaded the STM8L library (en.stsw-stm8016) from the ST website. I have included the source files and include files through these libraries files and I have Also uncommented the microcontroller which I am using in STM8l.h file, still, I am getting errors On STM visual Develop that
"select the microcontroller in STM8L.h "
Also "STM8Lconf.h" is not there in library files, this also showing me an error.
Please suggest me any solution.
Thanks and regards
Deoyani
2021-01-30 02:49 AM
Hi DJosh.0,
Can you specify if you have created your own STVD project?
If so, and to be more precise, the library STM8L15x-16x-05x-AL31-L_StdPeriph_Lib (en.stsw-stm8016) contains the following header:
\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x.h
This \inc directory has to be configured in the STVD C Compiler settings (Project -> Settings -> C Compiler and Additionnal include directories
Your project must contain the following file
\YourProject\stm8l15x_conf.h"
You can also use a template project that is included in the library and that is already configured.
Regards
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2021-01-30 04:14 AM
Thank you for answering me
I have configured the \inc directory in the STVD C compiler setting( project->settings->c compiler -> category->preprocessor-> additional include directories)
also, I have included "stm8l15x_conf.h" in my project through the template project.
still, I am getting an error that "Please select first the target STM8L device used in your application (in stm8l15x.h file)".
also, I will try to edit stm8l15x.h file then it shows access denied ->this file is read-only. (access denied is showing in STVD)
.
I have said it before that I have Also uncommented the microcontroller which I am using in stm8l15x.h file (I have edited this in notepad and saved stm8l15x.h file in another folder from this folder I am using it )
following Errors, I am getting now :
#error "Please select first the target STM8L device used in your application (in stm8l15x.h file)"
#error "Please select first the target STM8L device used in your application (in stm8l15x.h file)"
#error cpstm8 ..\..\stm8l15x-16x-05x-al31-l_stdperiph_lib\libraries\stm8l15x.h:2896 can't open stm8l15x_conf.h
#error cpstm8 ..\..\stm8l15x-16x-05x-al31-l_stdperiph_lib\libraries\stm8l15x_stdperiph_driver\src\stm8l15x_wwdg.c:122(14) missing prototype
#error cpstm8 ..\..\stm8l15x-16x-05x-al31-l_stdperiph_lib\libraries\stm8l15x_stdperiph_driver\src\stm8l15x_wwdg.c:140(14) missing prototype
#error cpstm8 ..\..\stm8l15x-16x-05x-al31-l_stdperiph_lib\libraries\stm8l15x_stdperiph_driver\src\stm8l15x_wwdg.c:159(14) missing prototype
#error cpstm8 ..\..\stm8l15x-16x-05x-al31-l_stdperiph_lib\libraries\stm8l15x_stdperiph_driver\src\stm8l15x_wwdg.c:190(14) missing prototype
what should be the solution to this problem.
please give me suggestion
thanks and regards
Deoyani
2021-01-30 04:45 AM
You will have to allow the modification of the entire directory containing the STM8L library and the projects it contains.
As you are under Windows, make a right click on the directory and in the properties, uncheck Read Only and do this for all the sub-folders.
It seems that even if you uncomment the device in the stm8l15x.h file, as your file is read-only, this is not taken into account by the pre-processor.
Regards
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2021-01-30 04:58 AM
in addition, you get compilation errors:
#error cpstm8 ..\..\stm8l15x-16x-05x-al31-l_stdperiph_lib\libraries\stm8l15x_stdperiph_driver\src\stm8l15x_wwdg.c:122(14) missing prototype
#error cpstm8 ..\..\stm8l15x-16x-05x-al31-l_stdperiph_lib\libraries\stm8l15x_stdperiph_driver\src\stm8l15x_wwdg.c:140(14) missing prototype
#error cpstm8 ..\..\stm8l15x-16x-05x-al31-l_stdperiph_lib\libraries\stm8l15x_stdperiph_driver\src\stm8l15x_wwdg.c:159(14) missing prototype
#error cpstm8 ..\..\stm8l15x-16x-05x-al31-l_stdperiph_lib\libraries\stm8l15x_stdperiph_driver\src\stm8l15x_wwdg.c:190(14) missing prototype
and you must also uncomment the following line:
Into stm8l15x_conf.h (which should not also be read only)
#include "stm8l15x_wwwdg.h"
and also all those that your project uses
Hope it will resolve compilation issues
Regards
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2021-01-30 06:14 AM
2021-01-30 06:15 AM
2021-01-30 06:57 AM
#error : "Unsupported Compiler!"
Your project is not build, some project settings are not set properly.
Is it a project made by you ?
Step1: Try to open, build and debug an existing STM8L template workspace into
\stm8l15x-16x-05x-al31-l_stdperiph_lib\Project\Project_template\STVD\Cosmic\STVD_workspace.stw
Step2: Check all tabs settings into template project, and compare with your settings
Step 3: Read STVD User Manuel https://www.st.com/resource/en/user_manual/cd00004556-st-visual-develop-stvd--stmicroelectronics.pdf
Regards
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2021-01-30 08:39 AM
2021-01-30 09:09 AM
No need to set any path here in STVD Options Tab.
Check if Cosmic STM8 FSE is correctly installed in C:\Program Files(x86)\COSMIC in your computer and the path is need in Workspace Project Settings -> General Toolset Info Tab
Best regards
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.