I have created a new project and am trying to compile some basic GPIO code. The compiler output is generating this message:
"test.c(14): error: #5: cannot open source input file "stm32f10x_lib.h": No such file or directory"
I have the target device set to STM32F105VB and the Debug to use the "ST-Link Debugger" specifically the "ST-LINK/V2". I made sure there is an extra line at the end of the .c file.
#include <stm32f10x_lib.h> // STM32F10x Library Definitions is the first non-comment line in the code.
What am I doing wrong?
Searched the Web noticed that the code probably is part of the STM32F10X Standard Peripheral Library. Saw that file on the GITHUB Website. Not sure if the latest STM Standard peripheral code would use that file or not.
github.com/.../src
I got the code from the Keil library here:
http://www.keil.com/download/docs/350.asp
I have to assume it's the latest version of the GPIO library.
Are you using a board offered by a manufacturer or keil? I would say that the project that is in the zip file is too old and incomplete to be any good now. However, You may find much better examples if you have a board that Keil supports or the manufacturer may supply samples.
Even if you can't find the board in Keil examples. You may be able to use a different board example with some minor changes.
If you want to use that code you have try finding the STM32F10z Standard peripheral files at the st microelectronics website.
Or try the code at Github.
I guess you are using the MCBSTM32C board. Should have figured that out right away.
If you have this directiry ( Under the Keil directory )
C:\Keil_v5\ARM\Boards\Keil\MCBSTM32C
You will see some examples there.
If you don't you can I think you may have to download and run the Cortex M legacy executable file.
www2.keil.com/.../
Also, There are more examples at
C:\Keil_v5\ARM\Examples
And I believe you can get these examples to also run on your board because they target the same chip or a close cousin to you chip.