stm32lib - where do I get it from

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

enly1
Posts: 38
Joined: Wed Oct 09, 2013 10:21 pm

stm32lib - where do I get it from

Post by enly1 »

Hi,

Been trying to get the stm32 firmware libraries included, but don't know where to get the stm32lib files to put into CHIBIOS/ext ...

Can anyone please advise as I've spent most of the night confused.

Thanks

Simon

PS - I want to use the OPAMP on the STM32F3 discovery board ....
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32lib - where do I get it from

Post by Giovanni »

Hi,

The libraries are no more included in ChibiOS because there are too many of them and are very large files now. You can download the libraries from the ST web site then add the files you need to you project.

Note, it is unlikely you need the whole package, just copy the files you need and add them to the Makefile.

Giovanni
beaming
Posts: 11
Joined: Sun Nov 10, 2013 9:27 pm

Re: stm32lib - where do I get it from

Post by beaming »

Let me suggest a little gem which I recently found https://github.com/bjornfor/stm32-test. Which have at least 2 sets of stm32libs for stm32l1xx and stm32f0xx. It also has make friendly settings, as well as unix friendly.

Original stm32 libs have a lot of letter case mixing, which is big no-no at unix. This impeded me a lot, since I was new to all tool chains and my C skills were (and still are) rusty. STM32libs quickly steered me away from them towards something which just works, i.e. ChibiOS :)
enly1
Posts: 38
Joined: Wed Oct 09, 2013 10:21 pm

Re: stm32lib - where do I get it from

Post by enly1 »

Giovanni wrote:Hi,

The libraries are no more included in ChibiOS because there are too many of them and are very large files now. You can download the libraries from the ST web site then add the files you need to you project.

Note, it is unlikely you need the whole package, just copy the files you need and add them to the Makefile.

Giovanni


Thanks - was assuming they were not included, but thought that they may have been a prototype makefile / basic shell set that you just dropped in the STM library files themselves.

So if I get this right, I just need to manually extend my makefile and build environment to include the ones that I want and their dependencies and NOT use the USE_FW make file stuff ( unless I port it into the old structure and add an appropriaet stm32f30x.mk rules ).
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32lib - where do I get it from

Post by Giovanni »

Basically you have to create that small .mk file and enable the option, alternatively you can add the files directly to CSRC.

Giovanni
enly1
Posts: 38
Joined: Wed Oct 09, 2013 10:21 pm

Re: stm32lib - where do I get it from

Post by enly1 »

Cheers, Will have a go later today.

Tried very quickly, but hit issues with GPIO_Typedefs not being picked up - which were I thought in the include path, but just reading the STM Lib how to use help file (all this is new to me :-)

Thanks for the continued help.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32lib - where do I get it from

Post by Giovanni »

GPIO_Typedefs is removed with an #if 0 because it conflicts with the PAL driver, you need to restore it and disable the PAL driver.

In 3.0 the conflict is resolved.

Giovanni
enly1
Posts: 38
Joined: Wed Oct 09, 2013 10:21 pm

Re: stm32lib - where do I get it from

Post by enly1 »

Is version 3 available yet ? - reason I'm asking is that I'm at the point of learning and if things are going to materially change, worth just learning v3.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32lib - where do I get it from

Post by Giovanni »

It is available only doing a checkout from the repository: http://sourceforge.net/p/chibios/svn/HE ... nel_3_dev/

Note that it is far from being finished.

Giovanni
yushanh
Posts: 31
Joined: Mon Jul 29, 2013 6:23 pm

Re: stm32lib - where do I get it from

Post by yushanh »

Hi, if I restored the GPIO_TypeDef in "stm32l1xx.h" and comment the one in pal_lld.h,
will that cause any error while using the Chibi function calls for gpio?

I'm on stable_2.6.x branch.


Thanks,
Shan
Post Reply