2011-03-26 11:40 AM
STM32 Under Linux
2011-05-17 05:29 AM
Hi,
You can find on the internet stm32 standard library with makefile, so you have to only add your sources and download arm compiler.
2011-05-17 05:29 AM
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.2011-05-17 05:29 AM
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 :)2011-05-17 05:29 AM
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.2011-05-17 05:29 AM
''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...!