Skip to content
Mariano Alvira edited this page Jan 9, 2013 · 1 revision

Setting up Eclipse for the Econotag

You will need a working toolchain, OpenOCD, and a verision of GDB targeted for ARM to use Eclipse with the Econotag. The following steps explain how to get these and configure Eclipse to use them.

Getting OpenOCD

Get and build the OpenOCD source

git archive --format=tar --remote=git:// > tagged_version.tar

Unpack the tar-ball and:

./configure --enable-ft2232_libftdi --enable-ep93xx --enable-rlink
sudo make install

For more details see the mc1322x OpenOCD setup guide

Get the toolchain

Use the mc1322x toolchain guide to setup the CodeSourcery chain.

Build GDB for an ARM target

From debian testing you can get the gdb-7.1 source. 7.0 should also work.

apt-get source gdb

Build gdb:

mkdir build
cd build
../gdb-7.1/configure --target=arm-none-eabi --prefix=

Add gdb to your path. You probably already have the CodeSourcert bin in your path so you could do:

cp gdb/gdb ~/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-gdb71

Get Eclipse with the CDT plugin

Follow the driections here:

Use "Standard GDB Hardware Debugging" and set the gdb-command to arm-none-eabi-gdb-71 (or to whatever you've named gdb)

setting gdb-command

Add the proper "Initialisation Commands"

In the Eclipse/CDT debugger settings, add:

monitor soft_reset_halt
set *0x80020010 = 0

setting initialisation commands

monitor soft_reset_halt causes GDB to send the soft_reset_halt command (which performs a software reset, then halts the processor) through the monitor (OpenOCD).

set *0x80020010 = 0 disables interrupts on the mc13224v. Executing a soft_reset_halt does not reset CPU state. If were running code that was using interrupt and you then modified codeto not use that interrupt, then the CPU would still generate the interrupt but no code would be in-place to handle it.