cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Under Linux

josescxavier
Associate II
Posted on March 26, 2011 at 19:40

STM32 Under Linux

5 REPLIES 5
zexx86
Associate II
Posted on May 17, 2011 at 14:29

Hi,

You can find on the internet stm32 standard library with makefile, so you have to only add your sources and download arm compiler.

Posted on May 17, 2011 at 14:29

It's probably an uphill battle as there isn't the same commercial drive.

As for a GCC/GNU compiler, the STM32 code can be built with CodeSourcery arm-2007q3-53-arm-none-eabi

Lanchon, and Martin Thomas have done work in this area, so examples, makefiles and linker scripts can be found on the net.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
domen23
Associate II
Posted on May 17, 2011 at 14:29

I'm using Sourcery G++ Lite 2010q1-188 here. I had problems with a later free version.

Also keep in mind the support for debugger/flasher. I don't think ST-Link works in Linux, so you'll either have to upload firmware through UART (ISP) or with a openocd compatible JTAG dongle (there are a bunch in 50eur range).

Other than that, I'm happily developing on stm32 under Linux since 2008 :)

donald2
Associate II
Posted on May 17, 2011 at 14:29

I typically use Ubuntu, and it was only a matter of downloading a few packages to get a working GCC compile environment.

Working with the STLink was a different level of effort altogether.  I ended up looking at the protocol and writing my own 'stlink-download' program, which I've put up on Google Code.

The only tricky part of using stlink-download is that it does only what you tell it to do.  For instance, you must explicitly erase the Flash before downloading a new program.

Andrew Neil
Evangelist III
Posted on May 17, 2011 at 14:29

''The only tricky part of using stlink-download is that it does only what you tell it to do.''

 

I would say that's exactly how it should be!

 

 

Far too many things try to be ''helpful'' (sic) by trying to anticipate what they think you want - but this just ends up getting in the way and making them inflexible!

''For instance, you must explicitly erase the Flash before downloading a new program.''

 

 

A perfect example: it might think that it would be ''helpful'' (sic) to automatically erase the Flash before downloading - but that would then prevent you from doing anything that required, say, part of the flash to be left intact...!