cancel
Showing results for 
Search instead for 
Did you mean: 

Switch from KEIL to Eclipse + GCC

afinko
Associate II
Posted on October 19, 2010 at 16:39

Switch from KEIL to Eclipse + GCC

5 REPLIES 5
cschumann
Associate II
Posted on May 17, 2011 at 14:11

Hi Afi,

Download ''Eclipse IDE for C/C++ Developers von

http://www.eclipse.org/downloads/

  1. Unpack it and start it.
  2. Click Help → Install new Software
  3. Add…

    http://download.eclipse.org/tools/cdt/releases/galileo

    ( Eclipse C/C++ GDB Hardware Debugging, Eclipse C/C++ Memory View Enhancements)
  4. Uncheck ''Group items by category'' (Otherwise you will see not all options)
  5. Install GNU ARM C/C++ Development Support
  6. Restart eclipse
  7. Install a GCC cross compiler, i.e the one from CodeSourcery http://www.codesourcery.com/gnu_toolchains/arm/download.html
  8. If you use the Amontec JTAG adapter, install OpenOCD (at least 0.4.0)
To set up a new project using the ST firmware library:
  1. Create a new App: File→New C Project ARM Cross Target Application
  2. Under C/C++ Build → Settings, „All configurations“ select
    1. Behaviour → Use parallel Build (4, or optimal)
    2. C Preprocessor → Defined Symbols: DEBUG
    3. C Compiler → Directories:

      ../fwlib, ../fwlib/inc (Or wherever the fwlib is)
      

    4. Miscellaneous → Lang. Standard GNU 99
    5. Linker → General → Script File

      ../fwlib/stm32f10x_hd.ld (or where your linker script is located)
      

For debugging:
  1. Click Run → Debug Configurations..
  2. Double click GDB Hardware Debugging
  3. Name: OpenOCD
  4. Main: project / application
  5. Debugger → GDB Command →

    C:\codesourcery\bin\arm-none-eabi-gdb.exe (or where the gdb is located)

  6. Port-Number 3333
  7. Common → Display in favorites menu
  8. If you encounter difficulties resetting the target, add the command ''

    monitor reset init'' in the startup action of the debugger.
    

xacc
Associate II
Posted on May 17, 2011 at 14:11

Personally, I prefer the Zylin plugin. The builtin support seems just poor IMO.

Also I use Helios.

afinko
Associate II
Posted on May 17, 2011 at 14:11

Hi Carste,

thanks for intensive manual.

I will try these steps in few days.

However, now I need to chose a wright JTAG emulator, because ulink is not supported by OpenOCD.

Any suggestions?

The Amontec JTAGkey2 costs 115 euro:

http://www.amontec.com/jtagkey2.shtml

Is there any other JTAG emulator with lower cost?

Thanks in advance.

Afi
xacc
Associate II
Posted on May 17, 2011 at 14:11

This is 50 euro. JLink EDU

http://www.segger.com/cms/j-link-edu.html

If it suits you.

disirio2
Senior
Posted on May 17, 2011 at 14:11

Hello, I wrote a small guide here:

http://chibios.sourceforge.net/dokuwiki/doku.php?id=chibios:guides:eclipse1

The project also contains startup files, linker scripts and demos for the STM32.

Giovanni