cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 code examples without Firmware library usage

var
Associate II
Posted on January 23, 2009 at 10:33

STM32 code examples without Firmware library usage

4 REPLIES 4
var
Associate II
Posted on May 17, 2011 at 13:00

Are there STM32 code examples without Firmware library usage

available on the web?

The library for many tasks for me looks like ''overkill''.

Thanks

trevor1
Associate II
Posted on May 17, 2011 at 13:00

In many cases the FW library functions are overkill but they can be stripped back once you have something working. I started off using the FW library but use very little of it now.

Also, the linker should only link what is called so I include the whole FW library in every project, more as a help reference, even though very little of it gets linked in.

Regards

Trevor

st3
Associate II
Posted on May 17, 2011 at 13:00

As Trevor says, use the FWLib as your example!

Remember: the source for the FWLib is provided - so, once you've got something working, you can look at what the FWLib's doing, and just pull-out the parts that you actually need... 8-)

relaxe
Associate II
Posted on May 17, 2011 at 13:00

Personnaly, I think the library's huge size is not an issue. If you allow the simplest case of code optimisation from your compiler/linker, it will ''remove'' the unused code, hence keeping only what you need.

Even tho the size may be an issue, I'm pretty sure the large array of STM32 devices, already criticised for having very small RAM for very large ROM, will provided you with a device ''large enough'' to fit any use of the library.

Not using the library would be for 3 reasons:

1) Portability across various vendors: I would tend to just write a layer between my code and the library than can be IFDEFined to switch the definition of various high level functions for various low level libs.

2) Lack of code space: I would just buy a higher ROM sized chip.

3) Speed: Some functions may be not toatally speed optimised for various reasons. I would not personnaly ditch the lib entirely, just handcraft the very few functions needing such a boost, then post the optimised code on this forum so everybody can bow to your magnificience :p

-Relaxe