GCC Development Environment
As we mentioned before, we are going to stick with free software tools. So we are going to use free and open source GCC compiler to develop programs for ARM Cortex microcontrollers. As we are going to work from windows environment there are couple serious choices that are pretty similar. One is using CodeSourcery Lite edition orYagarto Gnu ARM toolchain. Both tools work same as they use same GCC compiler and other tools. Both seems to be supported frequently. CodeSourcery claim that they are updating Lite Edition twice a year, while Yagarto is doing this more frequently depending on updates of separate tools. So your choice won’t affect your final rezult.
When installed you can easily check if everything works fine by opening command line tool and writing simple command that check version of ARM GCC compiler:
Both can be used with Eclipse IDE and require makefile. The only difference – is a path to tools when compiling. Download any or both of these and install to your machine. Next step is to prepare Eclipse IDE Here you find a great step-by-step instructions how to set up this environment (you can skip debugger settings for now).
When program is compiled we need somehow to upload it to microcontroller Flash or RAM memory. For this there is a great ST-Link Utility developed by STMicroelectronics. Its documentation ca be found here. As STM32-Discovery is already equipped with ST-Link hardware we only need to plug USB cable and start working. Once installed, in settings select SWD protocol to start talking to STM32-Discovery board:
After confirmation you should see a connection information:
These are all tools that will give you a start in writing programs for STM32 microcontrollers and loading them to chip.