/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Noob library question (Primer2)

Username:     
Password:     
             

Forum

# 1   2011-04-25 14:01:08 Noob library question (Primer2)

dohzer
New member
From: Melbourne
Registered: 2009-12-08
Posts: 4

Noob library question (Primer2)

Hi all,
I'm very new to the STM32 Primer 2, STMicro devices and 32-bit micros in general.
A week ago I got my first program working (just some messing around with blinking LEDs), but I was using the default software that came with my Primer 2, and I decided to download the latest software (CD_STM32-Primer_20110112.zip). There seem to be some slight differences with the libraries and I'm not sure where to find documentation explaining how to use them.
Is there a document explaining how to use them correctly?

I think the project I was using as a reference '#include'ed the 'stm32f10x_conf.h' file directly, but it looks like this is done through the 'stm32f10x.h' now. Is that correct?

Also, a general programming question... what is the correct method for including the various libraries? Should I 'add' them to the project? Use the #include statements? Should I copy them into my project file or is it better to leave them in the default library folder and let the compiler find them?

Offline

 

# 2   2011-04-26 09:44:25 Noob library question (Primer2)

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Noob library question (Primer2)

With the ST library  since v3, only "stm32f10x.h" has to been included.
The library is provided with help documentation files that explain how to use it.
I think it's better to add all necessary files into your project, with keeping the file organization (CMSIS / ST files).
The configure the "stm32f10x_conf.h" depending on the peripheral you need, and the "stm32f10x.h" for your platform (µC family, system clock, HSE clock...).

Offline

 

Board footer