This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Newbie needs help on which libs to use with a stm32f103c6 microcontroller

Hi all, how are you?, Im very new with ARM microcontrollers and I've been doing a lite lecture of about 4 books to know how to configure this devices to start programming it, first I did a reading an how to use mbed but I think that I need to do some porting or a bootloader to make it work in my microcontroller.

Then I've decided to look for examples on how access GPIO ports and I know that first I need to configure clock to the port that I will use, I've found the example of keil with the library stm32_Init, this library uses the file stm32f10x_lib.h and has an excellent config wizard made for it but I think is deprecated or somthing like that, in adittion, the header stm32f10x_lib.h is not found by keil v5.30 nor the installation folder and obviously not in the project folder.

After that I've read about CMSIS and that it was created to portability and uniformity of code between developers so I taught I can use this but the form of using it is confusing to me...or I don't understand anything about CMSIS, I don't know yet.

My code is right now:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
#include <stdint.h>
#include <ARMCM3.h>
//#include "STM32_Init.h"
//#include <stm32f10x_lib.h> // STM32F10x Library Definitions
SystemInit();
int main()
{
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

CMSIS uses a function called SystemInit() whose meaning as I saw is bassically configure the system clock but even when I've included CMSIS support in my project when I use that function  and It gives me the following errors and warnings when I pass the cursor over the exclamation symbol in the same line:

Fullscreen
1
2
3
4
5
Error: Conflicting types for 'SistemInit'
warning: type specifier is missing, default to 'int'
warning: this function declaration is not a prototype.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

and when I compile the file it gives me the following error:

Fullscreen
1
2
C:/Users/valery/AppData/Local/Arm/Packs/ARM/CMSIS/5.7.0/Device/ARM/ARMCM3/Include/system_ARMCM3.h(48): note: previous declaration is here
extern void SystemInit (void);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I see this like the project isn't seeing the CMSIS library or something like that.

Like you see I'm a little bit confused here so I need help on how and what to do here.

0