Using codesourcery Toolchain, Eclipse & Segger J-Link DebuggerAs can also be inferred from the title, we need three basic components:
Eclipse CDT is a C/C++ development IDE based on Eclipse (which defaults to Java development).
Codesourcery Lite is gcc-based ARM toolchain which provides all the basic ingredients (compiler, assembler, archiver, linker, libraries, newlib, binutils, etc.) in console based executables. The best thing about Codesourcery is that they also offer commercial solutions which result in quarterly updates to the Lite tool-chain also. This way you always stay inline with the latest gcc developments.
Segger J-Link is a very good JTAG/SWD debugger for ARM targets. If you are not for the commercial development, you can purchase an EDU version which costs around 70 Euro (incl. postage) and is worth every penny.
Installation
- Download and install Eclipse CDT on your computer. In most cases, installation is merely creating a shortcut to eclipse.exe in the downloaded and uncompressed eclipse folder.
- Install all necessary components in Eclipse CDT required for embedded development and debugging as shown in the following image. These can be installed from “Help->Install New Software”. Especially important are “GDB Hardware Debugging” and “Eclipse Debugger for C/C++”.
- Download and install Codesourcery. Let it change your PATH so that Eclipse can find the proper tools it needs during compilation.
- Test the Codesourcery install by opening a command prompt and typing the following:
C:\>arm-none-eabi-gcc --version
You should see a response similar to given above. If windows complains about unknown or unrecognized command, then Codesourcery has not been properly installed or the PATH information is not updated. Please follow Codesourcery Getting Started Guide for further information to solve this problem.
arm-none-eabi-gcc (Sourcery G++ Lite 2010q1-188) 4.4.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - Now download and import (hint: import existing projects into workspace) the following two projects in an Eclipse workspace from here:
- libSTM32F103
- Blinky_STM32F103
- After import, the workspace should look similar to the following:
I have not checked in here for some time because I thought it was getting boring, but the last several posts are good quality so I guess I will add you back to my everyday bloglist. You deserve it my friend 🙂
Nice information……..it helped me lot …….thank you