...

Eclipse Frequently Asked Questions

How do I install Eclipse and the GNU tools?
What is Eclipse and why is Macraigor giving it away for free?
Where can I find Eclipse and CDT documentation?
List of Example Eclipse Projects included in hwsupport download
What other Macraigor Tools can be run from inside Eclipse?
Do I have to install and run Eclipse to use the GNU Tools?
How do I modify one of your example Eclipse Projects and save it under a New Project Name?
What is the GNU Toolkit and why is Macraigor giving it away for free?
Did Macraigor Systems make changes to the GDB source?
What is OcdRemote and how do I use it?
How do I configure my mpDemon to interface directly to Eclipse/GDB (without using OcdRemote)?
What is Cygwin and why do I have to install it on my Windows XP/NT/2000 system before I can install the GNU Tool kit
How Do I Install mcgr_hwsupport RPM package on my Linux 32 or 64 System and verify the installation was successful?
How to I install mcgr DEB on Ubuntu
Where can I find the source for the standard C and C++ libraries?
How can I increase the amount of time Eclipse waits for my gdbinit (and download) to complete before timing out and giving the "Target is not responding (timed out)" error message?

What is the Eclipse and and why is Macraigor giving it away for free? 

"Eclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the life cycle. A large and vibrant ecosystem of major technology vendors, innovative start-ups, universities, research institutions and individuals extend, complement and support the Eclipse platform". See http://www.eclipse.org for more information.

"CDT is Eclipse's C/C++ Development Tooling project. It is an industrial strength C/C++ IDE that also serves as a platform for others to provide value added tooling for C/C++ developers." See http://wiki.eclipse.org/index.php/CDT for more information.

The Macraigor Eclipse environment consists of:

  • Eclipse + CDT (open source:  http://www.eclipse.org )
  • Cygwin ( www.redhat.com)
  • GNU gnutoolkit : gcc,gdb,gdbtui,ln,gas,... (open source: www.gnu.org)
  • Macraigor OcdRemote, Drivers and Libraries.
  • Example Eclipse projects, tested on manufacturer's eval boards using the version of  the software tools we make availble on our web site's Eclipse page.
  • Other Macraigor Utilities (OcdCommander, Scan Chain Analyzer, UsbDemon Finder) that can be run from inside the Eclipse environment.

We make this environment freely available for use by the customers of our JTAG devices.

The embedded target is controlled from the Eclipse IDE using the following tool chain:

Eclipse <-> GDB <-> OcdRemote <-> Drivers <-> Macraigor JTAG Device <-> Target CPU

GO TO TOP

Where can I find Eclipse and CDT Documentation?

Eclipse web site tutorials page: http://www.eclipse.org/community/training.php
CDT web site tutorials page: http://wiki.eclipse.org/index.php/CDT

GO TO TOP

List of Example Eclipse/GDB Projects included in hwsupport download

The hwsupport download installs example Eclipse/Gdb Projects in the "c:\Program Files\Macraigor Systems\Eclipse Demos\<cpu type>\<target board> directories. There are small example program: source, README, Makefile, ldscript, and gdbinit files that can be built with the supplied tools and downloaded into a specific target board. The examples include a small C program that manipulates some variables and a small assembly source file called crt0.S that contains the actual start code for the target and performs the necessary initialization before the C program "main" function can be called. There are no I/O calls because that would depend on the I/O available in the particular target.

Here is a list of the target boards we provide examples for:
ARM
MIPS
POWER PC
Xscale
i386
ARM
CM920T
Alchemy
AU1100-1550
AMCC
405EP Taihhu
ADI
IXP23xx

ARM
CM940E-S
Alchemy
PB1000

EmbededPlanet
EP80219

ARM
CM1136FJ-S
Alchemy
PB1100
AMCC
405GPR Sycamore
Intel
DBPAX27x

Atmel
AT91M55800A
Alchemy
PB1500
AMCC
440EP Bamboo
Intel
IQ80310

Atmel
AT91M63200
MIPS
Atlas 4Kc
AMCC
440EP Yosemite
Intel
IQ80315

Atmel
AT91R9200T
MIPS
Malta 4Ke
AMCC
440EPx Sequoia
Intel
IQ80321

Atmel
AT91x40
MIPS
Malta 5Kc
AMCC
440BP Ebony
Intel
IQ80331

Cirrus
EDB7209
Toshiba
TX4927EVB
AMCC
440GX Ocotea
Intel
IQ81342

Cogent
CSB337

AMCC
440GX Tiashan
Intel
IQ81348

Cogent
CSB535/536fs

Embedded Planet
EP405
Intel
IXDP425

Conexant
CS82110

Embedded Planet
EP440C
Intel
IXDP426

Conexant
CS86202

Embedded Planet
EPE8248e
Intel
IXDP1100

Embedded Planet
EP8971




Freescale
iMX1/21/31ADS

Freescale
Lite MPC5200B


Freescale
MAC7100EVB

Freescale
MPC5x5ETAS


NetSilicon
NSDB7520

Freescale
MPC8xxADS


NetSilicon
NSDB9750

Freescale
MPC5554Demo


NetSilicon
NSEVAL9360

Freescale
MPC8266ADS


OKI
ML675K

Freescale
MPC8372ADS


Sharp
EVB79520

Freescale
MPC8280PQ2FADS


Sharp
LH7A4xx

Freescale
MPC8541ADS


STMicro
STR710EVAL

Freesclae
MPC8560ADS


TI
OMAP1510





GO TO TOP

What other Macraigor Tools can be run from inside Eclipse?

In our examples we have created launch configurations that let the user run the following Macraigor software tools from Eclipse's External Tools menu:

  • UsbDemon Finder - Finds all of the Macraigor USB devices currently connected to the host. Lets the user flash each device's LED (so you can map USB address to device if you have multiple Macraigor JTAG devices connected to your host) and program license codes for additional Macraigor software tools (Flash Programmer, JSCAN, Jtag Commander, ...) into a Macraigor USB JTAG device.
  • Scan Chain Analyzer - Determines : 1) Is the Jtag Scan chain working? 2) What devices are on the JTAG scan chain. 3) What order are they in 4) How fast can I run the JTAG clock on my board. This utility allows you to quickly determine if your JTAG connection is working and if not helps you diagnose the problem.
  • OCD Commander - Assembly language level debugger with built in assembler/disassember, s19/elf/hex image loader, and macro file parser.  Many of our customers use it for board bring up and to interactively determine the memory/register writes needed to initialize a board prior to loading their image into target RAM. This information is then added to their Eclipse project's gdbinit file so that the target board is automatically initalized as gdb starts up.

Any command that can be run from the DOS/Cygwin/Linux command shell can be run from the Eclipse External tools menu. Selecting the Project -> External Tools -> External Tools... menu and clicking on the "Program" list item will let you add/edit external tool launch configurations.

GO TO TOP

Do I have to install and run Eclipse to use the GNU tools?

No. The GNU tools can be run stand alone without Eclipse. See our GNU Tools web page for more information.

GO TO TOP

How do I modify one of your example Eclipse Projects and save it under a New Project Name?

You currently have an example Macraigor Eclipse project named aaa in c:\example\aaa.
You want to clone this project so you can then modify it. 

Your new project is going to be called bbb and is going to exist in c:\examples\bbb 

To clone an existing Eclipse project and create a new one, do the following :

1) make a copy aaa and all of it's sub directories so you now have c:\examples\copy of aaa

2) rename the new project directory to c:\example\bbb 

3) in the file c:\example\bbb\.project (note: .project has a period as it's first character) using a text editor (WordPad for example) :

CHANGE :
<name>aaa</name>
TO
<name>bbb</name>

4) gdb launch file :
Rename your gdb launch file to the name of your new project ie
old c:\example\bbb\aaa.launch -> new c:example\bbb\bbb.launch

Using a text editor go into c:\example\bbb\bbb.launch :
a) CHANGE:
<stringAttribute key=".gdbinit"value="C:\example\aaa\gdbinit"/>
TO:
<stringAttribute key=".gdbinit"value="C:\example\bbb\gdbinit"/>

b) CHANGE:
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="aaa"/>
TO:
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="bbb"/>

c) CHANGE:
<listEntry value="/aaa"/>
TO:
<listEntry value="/bbb"/>

5) ocdremote launch file:
Rename your gdb launch file to the name of your new project i.e.
c:\example\bbb\aaa_ocdremote.launch -> c"\example\bbb\bbb_ocdremote.launch 

Using a text editor go into c:\example\bbb\bbb_ocdremote.launch :

CHANGE :
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/aaa}"/>
TO
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/bbb}"/>


You should now be able to :
start Eclipse, 
Select File -> Import
Select existing projects into workspace, click NEXT
<Select Root Directory> and Browse to c:\examples\bbb
bbb will appear in the projects list, click the FINISH button to open the bbb project

Finally: copy your load image’s source files to c:\examples\bbb, delete the demo source files, and modify the make file to build your load image. If you change the load image’s output file name (from test.elf to yourname.elf) you will need to go back intoc:\example\bbb\bbb.launch

CHANGE 
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="test.elf"/>
TO 
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="yourname.elf"/>

What is the GNU toolkit and why are you giving it away for free?

The GNU toolkit consists of the following software utilities:

  • GCC - an ANSI C compiler 
  • G++ - an ANSI tracking C++ compiler
  • GDB - source and assembly language command line debugger
  • GDBTUI - gdb with a simple windowed interface showing source and breakpoints
  • GAS - GNU assembler
  • LD - GNU linker

Macraigor Systems provides a separate executable, "OcdRemote." This stand-alone utility converts GDB commands to JTAG/BDM signals. 

IE: 

<GDB>--tcp/ip--<OCDRemote>--USB/Raven?mpDemon--JTAG--<Target CPU>

You will need to start OcdRemote as an External Tool (from the Eclipse external tools menu) before starting GDB. See any of the example README files included in the hwsupport download for more information on how to setup and invoke an OcdRemote as an external tool.

The GNU tools are shareware whose source is provided to all interested parties free of charge by the Free Software Foundation (www.gnu.org). In their words: "The Free Software Foundation (FSF) is dedicated to eliminating restrictions on copying, redistribution, understanding, and modification of computer programs. We do this by promoting the development and use of free software in all areas of computing ...". 

GO TO TOP

What is OcdRemote and how do I use it?

Prior to running GDB in Eclipse, you must first start OcdRemote. This stand alone utility converts GDB commands to JTAG/BDM signals.

For example: 

Eclipse--GDB--tcp/ip--OCDRemote--USB2Demon--JTAG--<Target CPU>

Our Eclipse examples create an External Tools launch configuration to start OcdRemote prior invoking the debugger. The Eclipse example Project's README files' section 2C contains detailed instructions on how to set up an OcdRemote external tools launch from Eclipse.

NOTE: If you have an mpDemon version 3.0.0.1 or later and an ethernet connection between your PC and mpDemon, you can skip launching OcdRemote and use the mpDemon's built in OcdRemote GDB interface. See How do I configure mpDemon to interface directly to Eclipse/GDB (without using OcdRemote)?

GO TO TOP

How do I configure mpDemon to interface directly to Eclipse/GDB (without using OcdRemote)?

mpDemon version 3.0.x.x can now communicate directly with one or more GDB sessions via ethernet to it's internal OcdRemote GDB interface. Initially, prior to starting the Eclipse session(s) on your host, you must first configure the mpDemon's OcdRemote for your target board. OcdRemote converts GDB commands to JTAG/BDM signals that control your target board's CPU(s). IE :

[GDB(s)]--<GDB commands>--[mpDemon/OcdRemote]--<JTAG/BDM signals>--[Target]

To configure OcdRemote you must tell it :
    1) The JTAG/BDM Clock Rate - this is the rate at which the mpDemon clocks the
        JTAG/BDM lines on the target.
    2) The JTAG scan chain configuration - what devices are on the target's JTAG/BDM
        scan chain and if there are multiple devices on the scan chain  (two or more CPUs/TAP
        controllers/FPGAs/ect) what order the devices are in.

Using this information the mpDemon creates a GDB monitor TCP/IP port for each active
CPU on the target board's JTAG/BDM scan chain.

Your gdb session's gdbinit file should have the line :
        remote target <mpDemon's ethernet address>:<cpu's GDB monitor tcp/ip port>

This tells GDB to send it's monitor commands to the <GBB monitor tcp/ip port> on the mpDemon. These commands will be routed by the mpDemon to a single target CPU. Multiple GDB sessions can be run simulataneously each controlling a different CPU on the target board.

For example to debug two PPC8248 CPUs on a target system connected to an mpDemon at ethernet address 192.168.1.55 configured so that :

    CPU 1 used port 8888 and
    CPU 2 used port 8889 

you would start two GDB sessions :

The first session would control CPU 1, it's gdbinit file would contain the line
    remote target 192.168.1.55:8888

The second session would control CPU 2 it's gdbinit file would contain the line
    remote target 192.168.1.55:8889

The current scan chain configuration and the port(s) GDB session(s) will use to access
a given CPU are displayed on both the

mpDemon's web page:

mpDemon's Serial Port display:

This configuration information only has to be entered once for a given target system.
It is stored in the mpDemon's flash and will remain active until it is changed by the user.

Modifying mpDemon's ODCRemote  JTAG/BDM Clock Rate:

    The JTAG speed parameter can have a value from 1 (the fastest: ~15 mhz) to 8
    (the slowest: ~8 Khz).

    On the Web page :

        1) Click on the OCDREMOTE Configuration hot text  
        2) Select the new JTAG/BDM speed from the "JTAG Speed" dropdown list
        3) Click the Submit Button to store the new value into flash
        4) Click the Reboot Button to restart the mpDemon, the new value will now take effect

    On the Serial Port Display

        1) enter "0<cr>"  to go to the OCDREMOTE menu
        2) enter the new JTAG/BDM clock rate (1 - 8)
        3) enter "n<cr>" after "Do you want to change the JTAG chain?"
        4) enter "r<cr>" to restart the mpDemon, the new value will now take effect.
        
        
Modifying mpDemon's OCDRemote  JTAG Scan Chain Configuration:

    On the Web page :

        1) Click on the OCDREMOTE Configuration hot text  
        2) To :    
            Change the type of CPU already in the list:
                Select the new CPU type from the "CPU Type" dropdown list for that
                position it the scan chain. If the device you wish to add is not a
                CPU (i.e. a TAP controller, FPGA, ect) select the "UNKNOWN" device type and
                enter the length in bits of the device's JTAG Instruction register in the
                JTAG Parameters IR column, and the length in bits of the device when it is
                placed in bypass mode (this is typically: 1) in the JTAG Parameters Bypass
                length column.  
            Add a new CPU to the list :
                Click the Add CPU button, a new CPU of "UNKNOWN" type will be added to the
                bottom of the list. Change the type of CPU to the one you need as above.
            Delete a CPU from the list :
                Next to the CPU you want to remove from the scan chain list, click the
                Delete button. That entry will be removed from the list. The port numbers
                will change to relect the new list order                 
        3) Click the Submit Button to store the new scan chain configuration into flash
        4) Click the Reboot Button to restart the mpDemon, the new values will now take effect

    On the Serial Port Display

        1) enter "0<cr>"  to go to the OCDREMOTE menu
        2) enter "<cr>" to retain the current JTAG/BDM clock rate
        3) enter "y<cr>" after "Do you want to change the JTAG chain?"
        4) at the "Number of Devices in Scan Chain" prompt enter the
            number of devices (CPUs and other devices) in the JTAG/BDM
            scan chain. If you enter "<cr>" the current value shown in
            brackets [] will be retained.
        5) At each "Device [<scan chain index>]" prompt enter enter the name of
            the CPU/device at this location in the scan chain.If the device you
            wish to add is not a CPU (i.e. a TAP controller, FPGA, ect) enter
            the "UNKNOWN:<ir length in bits>:<bypass length in bits>" device type.
            Where <ir length in bits> = the length in bits of the device's JTAG
            Instruction register and
            <bypass length in bits> = the length in bits of the device when it is
            placed in bypass mode (this is typically: 1).
        6) At each "TCP/IP port number : [<cpu's GDB monitor tcp/ip port>]" prompt
            enter "<cr>" this will let OCDREMOTE assign the port number to the CPU.
        7) After all the CPUs have been entered enter any key to return to the main
            menu
        8) enter "r<cr>" to restart the mpDemon, the new values will now take effect

GO TO TOP

Did Macraigor Systems make changes to the GDB source?

No. Macraigor uses the standard GNU GDB release.

We provide a utility, OcdRemote that looks to GDB like a target based monitor waiting on a TCP/IP port for GDB monitor format commands. Macraigor has added CPU specific commands to OcdRemote that are accessable  via GDB's "monitor" command. In the GDB command window enter "monitor help" for a list of the commands available for your CPU type.  See the answer to "What is OcdRemote and how do I use it" FAQ for more information on how to run OcdRemote.

GO TO TOP

What is Cygwin and why do I have to install it on my Windows XP/NT/2000 system before I can install the GNU toolkit?

The Cygwin tools are ports of the popular GNU development tools and utilities for Windows 98/NT/2000. They function through the use of the Cygwin library which provides the UNIX system calls and environment that these programs require. As a result, it is possible to easily port many significant UNIX programs without the need for extensive changes to the source code. (for more information on Cygwin go to Red Hat’s web page www.redhat.com, then search on the keyword "Cygwin").

The GNU tools expect to be running under a "UNIX-like" environment. Cygwin provides this under Windows through its BASH shell.

GO TO TOP

How Do I Install mcgr_hwsupport RPM package on my Linux 32 or 64 System and verify the installation was successful?

1) Our USB drivers have to be built on your linux system. As a result your system has to have the kernel code installed in either
/usr/src/linux or
/usr/src/linux/kernels/<LinuxVersion> 
(where <LinuxVersion> your linux's version, for example 
/usr/src/kernels/2.6.22.9-61.fc6.i686)

If your Linux system currently does not have it's source code installed you will need to run the package manager to install it. On RedHat systems you would :

1) Bring up the package manager using the :
      Applications -> Add/Remove Software menu

2) Click the search tab in the Package Manager and search for the kernel-devel packages and install them.

The file version.h is created when you first compile the Linux kernel source code. Some distributions provide a compiled kernel without the file version.h. 
Look under either:

/usr/src/linux/include/linux OR
/usr/src/kernels/<LinuxVersion>/include/linux

to see if you have this file. If you do not, follow these steps in order to install the file: 

Become super user: 
$ su 
Change directory to the Linux source directory: 
# cd /usr/src/linux Or
# cd /usr/src/kernels/<LinuxVersion>
Type: 
# make xconfig 
Save the configuration by choosing Save and Exit. 
Type: 
# make dep 


2) Log in as root. You will need to INSTALL and RUN our software as root. cd to the directory which contains your RPM files. By convention on a RedHat Linux 32 system this will be :
/usr/src/redhat/RPMS/i386
on a RedHat Linux 64 system :
/usr/src/redhat/RPMS/x86_64

If you have a previous version of our RPM installed, first un-install (if needed)

# rpm -e mcgr-hwsupport-<OldVersionNumber>

Now install the new package with

# rpm -i mcgr-hwsupport-<NewVersionNumber>.i386.rpm (Linux 32) OR
# rpm -i mcgr-hwsupport-<NewVersionNumber>.x86_64.rpm (Linux 64)

verify installation by 

# rpm -q --all | grep mcgr

which will display the following if the rpm completed successfully : 

mcgr-hwsupport-<NewVersionNumber> 


3) Verify that our Usb driver windrvr6 got built successfully :

# ls /dev/windrvr6 

should display :

/dev/windrvr6

4) Verify that the driver is running:

# /sbin/modprobe --list | grep windrvr6
should display :

/lib/modules/<your OS version>/kernel/drivers/misc/windrvr6.ko _usb.ko

5) The following libraries and their soft links should now exist on your system :

/usr/lib/libMacraigorAPI.so -> /usr/lib/libMacraigorAPI.so.1.0
/usr/lib/libMacraigorAPI.so.1.0
/usr/lib/libMacraigorAsmDasm.so -> /usr/lib/libMacraigorAsmDasm.so.1.0
/usr/lib/libMacraigorAsmDasm.so.1.0
/usr/lib/libMacraigorJtagio.so -> /usr/lib/libMacraigorJtagio.so.1.0
/usr/lib/libMacraigorJtagio.so.1.0
/usr/lib/libmacraigortemplate.so -> /usr/lib/libmacraigortemplate.so.3.0.4.4
/usr/lib/libmacraigortemplate.so.3.0.4.4
(use # ls -la /usr/lib/lib*[Mm]acraigor*.* to get above list)

/usr/lib/libwdapi1031.so -> /usr/local/macraigor/WinDriver/lib/libwdapi1040.so

(# ls -la /usr/libwdapi*.* to display this link)

/usr/local/macraigor/WinDriver/lib/libwdapi1040.so

6) The RPM file should have added a line to your /ect/rc.local file so that 
windrvr6 is started each time your system boots up. 

# fgrep windrvr6 /etc/rc.local

should display :

/usr/local/macraigor/WinDriver/redist/wdreg windrvr6

7) The Macraigor executables are installed in /usr/local/bin

# ls /usr/local/bin 

should display (along with files origionally in /usr/local/bin)

/usr/local/bin/DccTerminal - ARM Debug Communications Terminal
/usr/local/bin/DccTerminal.jar
/usr/local/bin/JTAGScanChainAnalyzer - JTAG scan chain analyzer
/usr/local/bin/JTAGScanChainAnalyzer.jar
/usr/local/bin/OcdCommander - Assembly level debugger
/usr/local/bin/OcdCommander.jar
/usr/local/bin/ocdremote - gdb to JTAG interface program 
/usr/local/bin/UsbDemonFinder - Macraigor Usb Device locator
/usr/local/bin/UsbDemonFinder.jar


8) The Eclipse/gnu tools Demos are installed in /usr/local/macraigor/EclipseDemos. 
The command 

# ls /usr/local/macraigor/EclipseDemos/*/*

will display them. Each demo directory contains README, source, makefile, ldscript, gdbinit and Eclipse project files that can be built and run on a specific manufacturer's eval board.

9) The Macraigor JAVA tools in /usr/local/bin require Java 1.6.0 or later. You can download the latest version of the Java JRE from Sun's web site :

http://www.java.com/en/download/index.jsp 

Once you have downloaded and un-zipped the latest version of Java (typically in /usr/local/java) you will need to modify the current soft-link so it points to this new version. The procedure to do so goes like this :

# which java 

displays :

/usr/bin/java (or wherever your java soft-link lives)

Entering

# ls -la /usr/bin/java

displays :

/usr/bin/java -> <soft-link to java>

You need to modify the "which soft-link" to point to your new java. For example if your new java release lives in : /usr/local/java/jrel1.6.0_07   and which displayed :/usr/bin/java  you would change the soft-link to

#ln -s /usr/local/java/jrel1.6.0_07/bin/java /usr/bin/java 

GO TO TOP

How to I install mcgr DEB on Ubuntu:

1) Our USB drivers have to be built on your Linux system. As a result your system has to have the kernel code and headers installed in 
/usr/src/linux-source-<LinuxVersion> 
/usr/src/linux-headers-<LinuxVersion> AND
/usr/src/linux-headers-<LinuxVerison>-generic
(where <LinuxVersion> your linux's version, for example /usr/src/linux-source-2.6.35)

If your Linux system currently does not have it's source code installed you will need to to install it using apt-get. To do so on Ubuntu systems you would type: 
sudo apt-get install linux-source 
Our driver build process needs the file version.h. It should be in: 
/usr/src/linux-headers-<LinuxVersion>-generic/linux/include
You can use : “find /usr/src/ -name version.h –print” to confirm this.

2) To run the gnu tools we provide on a Ubuntu 64 system you will need to enter the following commands:
sudo apt-get install lib32gmp-dev
sudo apt-get install lib32mpfr4
sudo apt-get install libmpc2:i386

The directories /usr/lib32 and /usr/lib/i386-linux-gnu will be updated with the 32 bit versions of these libraries which are used by -elf-gcc/gdb.

 3) You will need to INSTALL and RUN our software as root using sudo. cd to the directory which contains your DEB files. Most users download them into their $HOME directory.
You can get a list of the currently installed Macraigor packages by entering:
dpkg --get-selections | grep mcg
If you have a previous version of our DEB installed, first un-install (if needed):
sudo dpkg --remove mcgr-hwsupport (package name from dpkg –get-selections list)

Now install the new package with

sudo dpkg –install mcgr-hwsupport-<NewVersionNumber>_i386.deb  (32 bit Linux) or

...

Eclipse Frequently Asked Questions

How do I install Eclipse and the GNU tools?
What is Eclipse and why is Macraigor giving it away for free?
Where can I find Eclipse and CDT documentation?
List of Example Eclipse Projects included in hwsupport download
What other Macraigor Tools can be run from inside Eclipse?
Do I have to install and run Eclipse to use the GNU Tools?
How do I modify one of your example Eclipse Projects and save it under a New Project Name?
What is the GNU Toolkit and why is Macraigor giving it away for free?
Did Macraigor Systems make changes to the GDB source?
What is OcdRemote and how do I use it?
How do I configure my mpDemon to interface directly to Eclipse/GDB (without using OcdRemote)?
What is Cygwin and why do I have to install it on my Windows XP/NT/2000 system before I can install the GNU Tool kit
How Do I Install mcgr_hwsupport RPM package on my Linux 32 or 64 System and verify the installation was successful?
How to I install mcgr DEB on Ubuntu
Where can I find the source for the standard C and C++ libraries?
How can I increase the amount of time Eclipse waits for my gdbinit (and download) to complete before timing out and giving the "Target is not responding (timed out)" error message?

What is the Eclipse and and why is Macraigor giving it away for free? 

"Eclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the life cycle. A large and vibrant ecosystem of major technology vendors, innovative start-ups, universities, research institutions and individuals extend, complement and support the Eclipse platform". See http://www.eclipse.org for more information.

"CDT is Eclipse's C/C++ Development Tooling project. It is an industrial strength C/C++ IDE that also serves as a platform for others to provide value added tooling for C/C++ developers." See http://wiki.eclipse.org/index.php/CDT for more information.

The Macraigor Eclipse environment consists of:

  • Eclipse + CDT (open source:  http://www.eclipse.org )
  • Cygwin ( www.redhat.com)
  • GNU gnutoolkit : gcc,gdb,gdbtui,ln,gas,... (open source: www.gnu.org)
  • Macraigor OcdRemote, Drivers and Libraries.
  • Example Eclipse projects, tested on manufacturer's eval boards using the version of  the software tools we make availble on our web site's Eclipse page.
  • Other Macraigor Utilities (OcdCommander, Scan Chain Analyzer, UsbDemon Finder) that can be run from inside the Eclipse environment.

We make this environment freely available for use by the customers of our JTAG devices.

The embedded target is controlled from the Eclipse IDE using the following tool chain:

Eclipse <-> GDB <-> OcdRemote <-> Drivers <-> Macraigor JTAG Device <-> Target CPU

GO TO TOP

Where can I find Eclipse and CDT Documentation?

Eclipse web site tutorials page: http://www.eclipse.org/community/training.php
CDT web site tutorials page: http://wiki.eclipse.org/index.php/CDT

GO TO TOP

List of Example Eclipse/GDB Projects included in hwsupport download

The hwsupport download installs example Eclipse/Gdb Projects in the "c:\Program Files\Macraigor Systems\Eclipse Demos\<cpu type>\<target board> directories. There are small example program: source, README, Makefile, ldscript, and gdbinit files that can be built with the supplied tools and downloaded into a specific target board. The examples include a small C program that manipulates some variables and a small assembly source file called crt0.S that contains the actual start code for the target and performs the necessary initialization before the C program "main" function can be called. There are no I/O calls because that would depend on the I/O available in the particular target.

Here is a list of the target boards we provide examples for:

ARM
MIPS
POWER PC
Xscale
i386
ARM
CM920T
Alchemy
AU1100-1550
AMCC
405EP Taihhu
ADI
IXP23xx

ARM
CM940E-S
Alchemy
PB1000

EmbededPlanet
EP80219

ARM
CM1136FJ-S
Alchemy
PB1100
AMCC
405GPR Sycamore
Intel
DBPAX27x

Atmel
AT91M55800A
Alchemy
PB1500
AMCC
440EP Bamboo
Intel
IQ80310

Atmel
AT91M63200
MIPS
Atlas 4Kc
AMCC
440EP Yosemite
Intel
IQ80315

Atmel
AT91R9200T
MIPS
Malta 4Ke
AMCC
440EPx Sequoia
Intel
IQ80321

Atmel
AT91x40
MIPS
Malta 5Kc
AMCC
440BP Ebony
Intel
IQ80331

Cirrus
EDB7209
Toshiba
TX4927EVB
AMCC
440GX Ocotea
Intel
IQ81342

Cogent
CSB337

AMCC
440GX Tiashan
Intel
IQ81348

Cogent
CSB535/536fs

Embedded Planet
EP405
Intel
IXDP425

Conexant
CS82110

Embedded Planet
EP440C
Intel
IXDP426

Conexant
CS86202

Embedded Planet
EPE8248e
Intel
IXDP1100

Embedded Planet
EP8971




Freescale
iMX1/21/31ADS

Freescale
Lite MPC5200B


Freescale
MAC7100EVB

Freescale
MPC5x5ETAS


NetSilicon
NSDB7520

Freescale
MPC8xxADS


NetSilicon
NSDB9750

Freescale
MPC5554Demo


NetSilicon
NSEVAL9360

Freescale
MPC8266ADS


OKI
ML675K

Freescale
MPC8372ADS


Sharp
EVB79520

Freescale
MPC8280PQ2FADS


Sharp
LH7A4xx

Freescale
MPC8541ADS


STMicro
STR710EVAL

Freesclae
MPC8560ADS


TI
OMAP1510





GO TO TOP

What other Macraigor Tools can be run from inside Eclipse?

In our examples we have created launch configurations that let the user run the following Macraigor software tools from Eclipse's External Tools menu:

  • UsbDemon Finder - Finds all of the Macraigor USB devices currently connected to the host. Lets the user flash each device's LED (so you can map USB address to device if you have multiple Macraigor JTAG devices connected to your host) and program license codes for additional Macraigor software tools (Flash Programmer, JSCAN, Jtag Commander, ...) into a Macraigor USB JTAG device.
  • Scan Chain Analyzer - Determines : 1) Is the Jtag Scan chain working? 2) What devices are on the JTAG scan chain. 3) What order are they in 4) How fast can I run the JTAG clock on my board. This utility allows you to quickly determine if your JTAG connection is working and if not helps you diagnose the problem.
  • OCD Commander - Assembly language level debugger with built in assembler/disassember, s19/elf/hex image loader, and macro file parser.  Many of our customers use it for board bring up and to interactively determine the memory/register writes needed to initialize a board prior to loading their image into target RAM. This information is then added to their Eclipse project's gdbinit file so that the target board is automatically initalized as gdb starts up.

Any command that can be run from the DOS/Cygwin/Linux command shell can be run from the Eclipse External tools menu. Selecting the Project -> External Tools -> External Tools... menu and clicking on the "Program" list item will let you add/edit external tool launch configurations.

GO TO TOP

Do I have to install and run Eclipse to use the GNU tools?

No. The GNU tools can be run stand alone without Eclipse. See our GNU Tools web page for more information.

GO TO TOP

How do I modify one of your example Eclipse Projects and save it under a New Project Name?

You currently have an example Macraigor Eclipse project named aaa in c:\example\aaa.
You want to clone this project so you can then modify it. 

Your new project is going to be called bbb and is going to exist in c:\examples\bbb 

To clone an existing Eclipse project and create a new one, do the following :

1) make a copy aaa and all of it's sub directories so you now have c:\examples\copy of aaa

2) rename the new project directory to c:\example\bbb 

3) in the file c:\example\bbb\.project (note: .project has a period as it's first character) using a text editor (WordPad for example) :

CHANGE :
<name>aaa</name>
TO
<name>bbb</name>

4) gdb launch file :
Rename your gdb launch file to the name of your new project ie
old c:\example\bbb\aaa.launch -> new c:example\bbb\bbb.launch

Using a text editor go into c:\example\bbb\bbb.launch :
a) CHANGE:
<stringAttribute key=".gdbinit"value="C:\example\aaa\gdbinit"/>
TO:
<stringAttribute key=".gdbinit"value="C:\example\bbb\gdbinit"/>

b) CHANGE:
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="aaa"/>
TO:
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="bbb"/>

c) CHANGE:
<listEntry value="/aaa"/>
TO:
<listEntry value="/bbb"/>

5) ocdremote launch file:
Rename your gdb launch file to the name of your new project i.e.
c:\example\bbb\aaa_ocdremote.launch -> c"\example\bbb\bbb_ocdremote.launch 

Using a text editor go into c:\example\bbb\bbb_ocdremote.launch :

CHANGE :
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/aaa}"/>
TO
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/bbb}"/>


You should now be able to :
start Eclipse, 
Select File -> Import
Select existing projects into workspace, click NEXT
<Select Root Directory> and Browse to c:\examples\bbb
bbb will appear in the projects list, click the FINISH button to open the bbb project

Finally: copy your load image’s source files to c:\examples\bbb, delete the demo source files, and modify the make file to build your load image. If you change the load image’s output file name (from test.elf to yourname.elf) you will need to go back intoc:\example\bbb\bbb.launch

CHANGE 
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="test.elf"/>
TO 
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="yourname.elf"/>

What is the GNU toolkit and why are you giving it away for free?

The GNU toolkit consists of the following software utilities:

  • GCC - an ANSI C compiler 
  • G++ - an ANSI tracking C++ compiler
  • GDB - source and assembly language command line debugger
  • GDBTUI - gdb with a simple windowed interface showing source and breakpoints
  • GAS - GNU assembler
  • LD - GNU linker

Macraigor Systems provides a separate executable, "OcdRemote." This stand-alone utility converts GDB commands to JTAG/BDM signals. 

IE: 

<GDB>--tcp/ip--<OCDRemote>--USB/Raven?mpDemon--JTAG--<Target CPU>

You will need to start OcdRemote as an External Tool (from the Eclipse external tools menu) before starting GDB. See any of the example README files included in the hwsupport download for more information on how to setup and invoke an OcdRemote as an external tool.

The GNU tools are shareware whose source is provided to all interested parties free of charge by the Free Software Foundation (www.gnu.org). In their words: "The Free Software Foundation (FSF) is dedicated to eliminating restrictions on copying, redistribution, understanding, and modification of computer programs. We do this by promoting the development and use of free software in all areas of computing ...". 

GO TO TOP

What is OcdRemote and how do I use it?

Prior to running GDB in Eclipse, you must first start OcdRemote. This stand alone utility converts GDB commands to JTAG/BDM signals.

For example: 

Eclipse--GDB--tcp/ip--OCDRemote--USB2Demon--JTAG--<Target CPU>

Our Eclipse examples create an External Tools launch configuration to start OcdRemote prior invoking the debugger. The Eclipse example Project's README files' section 2C contains detailed instructions on how to set up an OcdRemote external tools launch from Eclipse.

NOTE: If you have an mpDemon version 3.0.0.1 or later and an ethernet connection between your PC and mpDemon, you can skip launching OcdRemote and use the mpDemon's built in OcdRemote GDB interface. See How do I configure mpDemon to interface directly to Eclipse/GDB (without using OcdRemote)?

GO TO TOP

How do I configure mpDemon to interface directly to Eclipse/GDB (without using OcdRemote)?

mpDemon version 3.0.x.x can now communicate directly with one or more GDB sessions via ethernet to it's internal OcdRemote GDB interface. Initially, prior to starting the Eclipse session(s) on your host, you must first configure the mpDemon's OcdRemote for your target board. OcdRemote converts GDB commands to JTAG/BDM signals that control your target board's CPU(s). IE :

[GDB(s)]--<GDB commands>--[mpDemon/OcdRemote]--<JTAG/BDM signals>--[Target]

To configure OcdRemote you must tell it :
    1) The JTAG/BDM Clock Rate - this is the rate at which the mpDemon clocks the
        JTAG/BDM lines on the target.
    2) The JTAG scan chain configuration - what devices are on the target's JTAG/BDM
        scan chain and if there are multiple devices on the scan chain  (two or more CPUs/TAP
        controllers/FPGAs/ect) what order the devices are in.

Using this information the mpDemon creates a GDB monitor TCP/IP port for each active
CPU on the target board's JTAG/BDM scan chain.

Your gdb session's gdbinit file should have the line :
        remote target <mpDemon's ethernet address>:<cpu's GDB monitor tcp/ip port>

This tells GDB to send it's monitor commands to the <GBB monitor tcp/ip port> on the mpDemon. These commands will be routed by the mpDemon to a single target CPU. Multiple GDB sessions can be run simulataneously each controlling a different CPU on the target board.

For example to debug two PPC8248 CPUs on a target system connected to an mpDemon at ethernet address 192.168.1.55 configured so that :

    CPU 1 used port 8888 and
    CPU 2 used port 8889 

you would start two GDB sessions :

The first session would control CPU 1, it's gdbinit file would contain the line
    remote target 192.168.1.55:8888

The second session would control CPU 2 it's gdbinit file would contain the line
    remote target 192.168.1.55:8889

The current scan chain configuration and the port(s) GDB session(s) will use to access
a given CPU are displayed on both the

mpDemon's web page:

mpDemon's Serial Port display:

This configuration information only has to be entered once for a given target system.
It is stored in the mpDemon's flash and will remain active until it is changed by the user.

Modifying mpDemon's ODCRemote  JTAG/BDM Clock Rate:

    The JTAG speed parameter can have a value from 1 (the fastest: ~15 mhz) to 8
    (the slowest: ~8 Khz).

    On the Web page :

        1) Click on the OCDREMOTE Configuration hot text  
        2) Select the new JTAG/BDM speed from the "JTAG Speed" dropdown list
        3) Click the Submit Button to store the new value into flash
        4) Click the Reboot Button to restart the mpDemon, the new value will now take effect

    On the Serial Port Display

        1) enter "0<cr>"  to go to the OCDREMOTE menu
        2) enter the new JTAG/BDM clock rate (1 - 8)
        3) enter "n<cr>" after "Do you want to change the JTAG chain?"
        4) enter "r<cr>" to restart the mpDemon, the new value will now take effect.
        
        
Modifying mpDemon's OCDRemote  JTAG Scan Chain Configuration:

    On the Web page :

        1) Click on the OCDREMOTE Configuration hot text  
        2) To :    
            Change the type of CPU already in the list:
                Select the new CPU type from the "CPU Type" dropdown list for that
                position it the scan chain. If the device you wish to add is not a
                CPU (i.e. a TAP controller, FPGA, ect) select the "UNKNOWN" device type and
                enter the length in bits of the device's JTAG Instruction register in the
                JTAG Parameters IR column, and the length in bits of the device when it is
                placed in bypass mode (this is typically: 1) in the JTAG Parameters Bypass
                length column.  
            Add a new CPU to the list :
                Click the Add CPU button, a new CPU of "UNKNOWN" type will be added to the
                bottom of the list. Change the type of CPU to the one you need as above.
            Delete a CPU from the list :
                Next to the CPU you want to remove from the scan chain list, click the
                Delete button. That entry will be removed from the list. The port numbers
                will change to relect the new list order                 
        3) Click the Submit Button to store the new scan chain configuration into flash
        4) Click the Reboot Button to restart the mpDemon, the new values will now take effect

    On the Serial Port Display

        1) enter "0<cr>"  to go to the OCDREMOTE menu
        2) enter "<cr>" to retain the current JTAG/BDM clock rate
        3) enter "y<cr>" after "Do you want to change the JTAG chain?"
        4) at the "Number of Devices in Scan Chain" prompt enter the
            number of devices (CPUs and other devices) in the JTAG/BDM
            scan chain. If you enter "<cr>" the current value shown in
            brackets [] will be retained.
        5) At each "Device [<scan chain index>]" prompt enter enter the name of
            the CPU/device at this location in the scan chain.If the device you
            wish to add is not a CPU (i.e. a TAP controller, FPGA, ect) enter
            the "UNKNOWN:<ir length in bits>:<bypass length in bits>" device type.
            Where <ir length in bits> = the length in bits of the device's JTAG
            Instruction register and
            <bypass length in bits> = the length in bits of the device when it is
            placed in bypass mode (this is typically: 1).
        6) At each "TCP/IP port number : [<cpu's GDB monitor tcp/ip port>]" prompt
            enter "<cr>" this will let OCDREMOTE assign the port number to the CPU.
        7) After all the CPUs have been entered enter any key to return to the main
            menu
        8) enter "r<cr>" to restart the mpDemon, the new values will now take effect

GO TO TOP

Did Macraigor Systems make changes to the GDB source?

No. Macraigor uses the standard GNU GDB release.

We provide a utility, OcdRemote that looks to GDB like a target based monitor waiting on a TCP/IP port for GDB monitor format commands. Macraigor has added CPU specific commands to OcdRemote that are accessable  via GDB's "monitor" command. In the GDB command window enter "monitor help" for a list of the commands available for your CPU type.  See the answer to "What is OcdRemote and how do I use it" FAQ for more information on how to run OcdRemote.

GO TO TOP

What is Cygwin and why do I have to install it on my Windows XP/NT/2000 system before I can install the GNU toolkit?

The Cygwin tools are ports of the popular GNU development tools and utilities for Windows 98/NT/2000. They function through the use of the Cygwin library which provides the UNIX system calls and environment that these programs require. As a result, it is possible to easily port many significant UNIX programs without the need for extensive changes to the source code. (for more information on Cygwin go to Red Hat’s web page www.redhat.com, then search on the keyword "Cygwin").

The GNU tools expect to be running under a "UNIX-like" environment. Cygwin provides this under Windows through its BASH shell.

GO TO TOP

How Do I Install mcgr_hwsupport RPM package on my Linux 32 or 64 System and verify the installation was successful?

1) Our USB drivers have to be built on your linux system. As a result your system has to have the kernel code installed in either
/usr/src/linux or
/usr/src/linux/kernels/<LinuxVersion> 
(where <LinuxVersion> your linux's version, for example 
/usr/src/kernels/2.6.22.9-61.fc6.i686)

If your Linux system currently does not have it's source code installed you will need to run the package manager to install it. On RedHat systems you would :

1) Bring up the package manager using the :
      Applications -> Add/Remove Software menu

2) Click the search tab in the Package Manager and search for the kernel-devel packages and install them.

The file version.h is created when you first compile the Linux kernel source code. Some distributions provide a compiled kernel without the file version.h. 
Look under either:

/usr/src/linux/include/linux OR
/usr/src/kernels/<LinuxVersion>/include/linux

to see if you have this file. If you do not, follow these steps in order to install the file: 

Become super user: 
$ su 
Change directory to the Linux source directory: 
# cd /usr/src/linux Or
# cd /usr/src/kernels/<LinuxVersion>
Type: 
# make xconfig 
Save the configuration by choosing Save and Exit. 
Type: 
# make dep 


2) Log in as root. You will need to INSTALL and RUN our software as root. cd to the directory which contains your RPM files. By convention on a RedHat Linux 32 system this will be :
/usr/src/redhat/RPMS/i386
on a RedHat Linux 64 system :
/usr/src/redhat/RPMS/x86_64

If you have a previous version of our RPM installed, first un-install (if needed)

# rpm -e mcgr-hwsupport-<OldVersionNumber>

Now install the new package with

# rpm -i mcgr-hwsupport-<NewVersionNumber>.i386.rpm (Linux 32) OR
# rpm -i mcgr-hwsupport-<NewVersionNumber>.x86_64.rpm (Linux 64)

verify installation by 

# rpm -q --all | grep mcgr

which will display the following if the rpm completed successfully : 

mcgr-hwsupport-<NewVersionNumber> 


3) Verify that our Usb driver windrvr6 got built successfully :

# ls /dev/windrvr6 

should display :

/dev/windrvr6

4) Verify that the driver is running:

# /sbin/modprobe --list | grep windrvr6
should display :

/lib/modules/<your OS version>/kernel/drivers/misc/windrvr6.ko _usb.ko

5) The following libraries and their soft links should now exist on your system :

/usr/lib/libMacraigorAPI.so -> /usr/lib/libMacraigorAPI.so.1.0
/usr/lib/libMacraigorAPI.so.1.0
/usr/lib/libMacraigorAsmDasm.so -> /usr/lib/libMacraigorAsmDasm.so.1.0
/usr/lib/libMacraigorAsmDasm.so.1.0
/usr/lib/libMacraigorJtagio.so -> /usr/lib/libMacraigorJtagio.so.1.0
/usr/lib/libMacraigorJtagio.so.1.0
/usr/lib/libmacraigortemplate.so -> /usr/lib/libmacraigortemplate.so.3.0.4.4
/usr/lib/libmacraigortemplate.so.3.0.4.4
(use # ls -la /usr/lib/lib*[Mm]acraigor*.* to get above list)

/usr/lib/libwdapi1031.so -> /usr/local/macraigor/WinDriver/lib/libwdapi1040.so

(# ls -la /usr/libwdapi*.* to display this link)

/usr/local/macraigor/WinDriver/lib/libwdapi1040.so

6) The RPM file should have added a line to your /ect/rc.local file so that 
windrvr6 is started each time your system boots up. 

# fgrep windrvr6 /etc/rc.local

should display :

/usr/local/macraigor/WinDriver/redist/wdreg windrvr6

7) The Macraigor executables are installed in /usr/local/bin

# ls /usr/local/bin 

should display (along with files origionally in /usr/local/bin)

/usr/local/bin/DccTerminal - ARM Debug Communications Terminal
/usr/local/bin/DccTerminal.jar
/usr/local/bin/JTAGScanChainAnalyzer - JTAG scan chain analyzer
/usr/local/bin/JTAGScanChainAnalyzer.jar
/usr/local/bin/OcdCommander - Assembly level debugger
/usr/local/bin/OcdCommander.jar
/usr/local/bin/ocdremote - gdb to JTAG interface program 
/usr/local/bin/UsbDemonFinder - Macraigor Usb Device locator
/usr/local/bin/UsbDemonFinder.jar


8) The Eclipse/gnu tools Demos are installed in /usr/local/macraigor/EclipseDemos. 
The command 

# ls /usr/local/macraigor/EclipseDemos/*/*

will display them. Each demo directory contains README, source, makefile, ldscript, gdbinit and Eclipse project files that can be built and run on a specific manufacturer's eval board.

9) The Macraigor JAVA tools in /usr/local/bin require Java 1.6.0 or later. You can download the latest version of the Java JRE from Sun's web site :

http://www.java.com/en/download/index.jsp 

Once you have downloaded and un-zipped the latest version of Java (typically in /usr/local/java) you will need to modify the current soft-link so it points to this new version. The procedure to do so goes like this :

# which java 

displays :

/usr/bin/java (or wherever your java soft-link lives)

Entering

# ls -la /usr/bin/java

displays :

/usr/bin/java -> <soft-link to java>

You need to modify the "which soft-link" to point to your new java. For example if your new java release lives in : /usr/local/java/jrel1.6.0_07   and which displayed :/usr/bin/java  you would change the soft-link to

#ln -s /usr/local/java/jrel1.6.0_07/bin/java /usr/bin/java 

GO TO TOP

How to I install mcgr DEB on Ubuntu:

1) Our USB drivers have to be built on your Linux system. As a result your system has to have the kernel code and headers installed in 
/usr/src/linux-source-<LinuxVersion> 
/usr/src/linux-headers-<LinuxVersion> AND
/usr/src/linux-headers-<LinuxVerison>-generic
(where <LinuxVersion> your linux's version, for example /usr/src/linux-source-2.6.35)

If your Linux system currently does not have it's source code installed you will need to to install it using apt-get. To do so on Ubuntu systems you would type: 
sudo apt-get install linux-source 
Our driver build process needs the file version.h. It should be in: 
/usr/src/linux-headers-<LinuxVersion>-generic/linux/include
You can use : “find /usr/src/ -name version.h –print” to confirm this.

2) You will need to INSTALL and RUN our software as root using sudo. cd to the directory which contains your DEB files. Most users download them into their $HOME directory.
You can get a list of the currently installed Macraigor packages by entering:
dpkg --get-selections | grep mcg
If you have a previous version of our DEB installed, first un-install (if needed):
sudo dpkg --remove mcgr-hwsupport (package name from dpkg –get-selections list)

Now install the new package with

sudo dpkg –install mcgr-hwsupport-<NewVersionNumber>_i386.deb  (32 bit Linux) or
sudo dpkg -insaltt mcgr-hwsupport-<NewVersionNumber>_amd64.deb (64 bit Linux)

verify installation by entering :

dpkg –get-selections | grep mcgr

which will display the following if the deb completed successfully : 

mcgr-hwsupport 


3) Verify that our Usb driver windrvr6 got built successfully :

ls /dev/windrvr6 

should display :

/dev/windrvr6

4) Verify that the driver is running:

sudo /sbin/modprobe --list | grep windrvr6

should display :

/lib/modules/<your OS version>/kernel/drivers/misc/windrvr6.ko
/lib/modules/<your OS version>/kernel/drivers/misc/windrvr6_usb.ko

5) The following libraries and their soft links should now exist on your system :
/usr/lib/libMacraigorAPI.so -> /usr/lib/libMacraigorAPI.so.1.0
/usr/lib/libMacraigorAPI.so.1.0
/usr/lib/libMacraigorAsmDasm.so -> /usr/lib/libMacraigorAsmDasm.so.1.0
/usr/lib/libMacraigorAsmDasm.so.1.0
/usr/lib/libMacraigorJtagio.so -> /usr/lib/libMacraigorJtagio.so.1.0
/usr/lib/libMacraigorJtagio.so.1.0
/usr/lib/libmacraigortemplate.so -> /usr/lib/libmacraigortemplate.so.3.0.4.4
/usr/lib/libmacraigortemplate.so.3.0.4.4

(use ls -la /usr/lib/lib*[Mm]acraigor*.* to get above list)
/usr/lib/libjtag_usb2.so -> /usr/lib/libjtag_usb2.so.2.0
/usr/lib/libjtag_usb2.so.2.o

(use ls -la /usr/lib/libjtag_usb*.* to get above list)

/usr/lib/libwdapi1040.so -> /usr/local/macraigor/WinDriver/lib/libwdapi1040.so

(ls -la /usr/lib/libwdapi*.* to display this link)

/usr/local/macraigor/WinDriver/lib/libwdapi1040.so

6) The .deb file should have added these two files : 
/etc/init.d/macraigor_windrvr6 
/etc/rc2.d/S99macraigor_windrvr6 
to the Linux system boot directories so that windrvr6 is started each time your system boots up. 


7) The Macraigor executables are installed in /usr/local/bin

ls /usr/local/bin 

should display (along with files originally in /usr/local/bin)

/usr/local/bin/DccTerminal - ARM Debug Communications Terminal
/usr/local/bin/DccTerminal.jar
/usr/local/bin/JTAGScanChainAnalyzer - JTAG scan chain analyzer
/usr/local/bin/JTAGScanChainAnalyzer.jar
/usr/local/bin/OcdCommander - Assembly level debugger
/usr/local/bin/OcdCommander.jar
/usr/local/bin/ocdremote - gdb to JTAG interface program 
/usr/local/bin/UsbDemonFinder - Macraigor Usb Device locator
/usr/local/bin/UsbDemonFinder.jar


8) The Eclipse/gnu tools Demos are installed in /usr/local/macraigor/EclipseDemos. 
The command 

ls /usr/local/macraigor/EclipseDemos/*/*

will display them. Each demo directory contains README, source, Makefile, ldscript, gdbinit and Eclipse project files that can be built and run on a specific manufacturer's eval board.

9) The Macraigor JAVA tools in /usr/local/bin require Java 1.6.0 or later. To download the latest version of the Java JRE from the Ubuntu Software Center: 
- Start up the Ubuntu Software Center app
- Select : 
- Get Software 
- Provided By Ubuntu
- Open JDK Java <Version> Runtime and install it. You can check the : 
- Installed Software 
- Provided By Ubuntu
- Open JDK Java <Version> Runtime 

list to see if it is has already been installed on your system.
Once you have installed the latest version of Java (typically in /usr/lib/jvm/java-<Verson>-openjdk/jre/bin/java) you will need to modify the current soft-link so it points to this new version. The procedure to do so goes like this:

which java 

displays :

/usr/bin/java (or wherever your java soft-link lives)

Entering

ls -la /usr/bin/java

displays :

/usr/bin/java -> <soft-link to java>

You need to modify the "which soft-link" to point to your new java. For example if your new java release lives in : /usr/lib/jvm/java-6-openjdk/jre/bin and which displayed :/usr/bin/java you would change the soft-link to

sudo ln -s /usr/lib/jvm/java-6-openjdk/jre/bin/java /usr/bin/java 

 GO TO TOP

Where can I find the source for the standard C and C++ libraries?

libc - GNU C Library:
http://directory.fsf.org/project/libc/

Diet libc - a C library that is optimized for small size. It has has the bare minimum of files: the system call wrappers (including socket stuff) and malloc, etc. to create small statically linked binaries:
http://directory.fsf.org/project/dietlibc/

Links to Other C and C++ libraries:
http://directory.fsf.org/category/clibs/

Newlib - C library intended for use on embedded systems. 
It is a conglomeration of several library parts, all under free
software licenses that make them easily usable on embedded products.
http://sources.redhat.com/newlib

uClibc - C library for developing embedded Linux systems. It is much smaller
than the GNU C Library, but nearly all applications supported by 
glibc also work perfectly with uClibc.
http://www.uclibc.org/

Other Open Source C libraries:
http://www.uclibc.org/other_libs.html

How can I increase the amount of time Eclipse waits for my gdbinit(and download) to complete before timing out and giving the "Target is not responding (timed out)" error message?

Do the following in your Eclipse Project to fix this problem :
  1. In the C/C++ Perspective select the Window -> Preferences menu selection at the top of the screen.
  2. in the Preferences Pop Up Window:
    1. enter "gdb", overwriting "type filter text" in the text box at the top left
    2. you should now see the C/C++ -> Debug -> GDB MI page
    3. increase the time for LAUNCH TIMEOUT from 30000 to 60000 (30 seconds to 60 seconds, or more if needed)
    4. click OK

Eclipse is a trademarks of Eclipse Foundation, Inc.




verify installation by entering :

dpkg –get-selections | grep mcgr

which will display the following if the deb completed successfully : 

mcgr-hwsupport 


3) Verify that our Usb driver windrvr6 got built successfully :

ls /dev/windrvr6 

should display :

/dev/windrvr6

4) Verify that the driver is running:

sudo /sbin/modprobe -l windrvr6

should display :

/lib/modules/<your OS version>/kernel/drivers/misc/windrvr6.ko

5) The following libraries and their soft links should now exist on your system :
/usr/lib/libMacraigorAPI.so -> /usr/lib/libMacraigorAPI.so.1.0
/usr/lib/libMacraigorAPI.so.1.0
/usr/lib/libMacraigorAsmDasm.so -> /usr/lib/libMacraigorAsmDasm.so.1.0
/usr/lib/libMacraigorAsmDasm.so.1.0
/usr/lib/libMacraigorJtagio.so -> /usr/lib/libMacraigorJtagio.so.1.0
/usr/lib/libMacraigorJtagio.so.1.0
/usr/lib/libmacraigortemplate.so -> /usr/lib/libmacraigortemplate.so.3.0.2.9
/usr/lib/libmacraigortemplate.so.3.0.2.9

(use ls -la /usr/lib/lib*[Mm]acraigor*.* to get above list)
/usr/lib/libjtag_usb2.so -> /usr/lib/libjtag_usb2.so.2.0
/usr/lib/libjtag_usb2.so.2.o

(use ls -la /usr/lib/libjtag_usb*.* to get above list)

/usr/lib/libwdapi1000.so -> /usr/local/macraigor/WinDriver/lib/libwdapi1000.so

(ls -la /usr/lib/libwdapi*.* to display this link)

/usr/local/macraigor/WinDriver/lib/libwdapi1000.so

6) The .deb file should have added these two files : 
/etc/init.d/macraigor_windrvr6 
/etc/rc2.d/S99macraigor_windrvr6 
to the Linux system boot directories so that windrvr6 is started each time your system boots up. 


7) The Macraigor executables are installed in /usr/local/bin

ls /usr/local/bin 

should display (along with files originally in /usr/local/bin)

/usr/local/bin/DccTerminal - ARM Debug Communications Terminal
/usr/local/bin/DccTerminal.jar
/usr/local/bin/JTAGScanChainAnalyzer - JTAG scan chain analyzer
/usr/local/bin/JTAGScanChainAnalyzer.jar
/usr/local/bin/OcdCommander - Assembly level debugger
/usr/local/bin/OcdCommander.jar
/usr/local/bin/ocdremote - gdb to JTAG interface program 
/usr/local/bin/UsbDemonFinder - Macraigor Usb Device locator
/usr/local/bin/UsbDemonFinder.jar


8) The Eclipse/gnu tools Demos are installed in /usr/local/macraigor/EclipseDemos. 
The command 

ls /usr/local/macraigor/EclipseDemos/*/*

will display them. Each demo directory contains README, source, Makefile, ldscript, gdbinit and Eclipse project files that can be built and run on a specific manufacturer's eval board.

9) The Macraigor JAVA tools in /usr/local/bin require Java 1.6.0 or later. To download the latest version of the Java JRE from the Ubuntu Software Center: 
- Start up the Ubuntu Software Center app
- Select : 
- Get Software 
- Provided By Ubuntu
- Open JDK Java <Version> Runtime and install it. You can check the : 
- Installed Software 
- Provided By Ubuntu
- Open JDK Java <Version> Runtime 

list to see if it is has already been installed on your system.
Once you have installed the latest version of Java (typically in /usr/lib/jvm/java-<Verson>-openjdk/jre/bin/java) you will need to modify the current soft-link so it points to this new version. The procedure to do so goes like this:

which java 

displays :

/usr/bin/java (or wherever your java soft-link lives)

Entering

ls -la /usr/bin/java

displays :

/usr/bin/java -> <soft-link to java>

You need to modify the "which soft-link" to point to your new java. For example if your new java release lives in : /usr/lib/jvm/java-6-openjdk/jre/bin and which displayed :/usr/bin/java you would change the soft-link to

sudo ln -s /usr/lib/jvm/java-6-openjdk/jre/bin/java /usr/bin/java 

 GO TO TOP

Where can I find the source for the standard C and C++ libraries?

libc - GNU C Library:
http://directory.fsf.org/project/libc/

Diet libc - a C library that is optimized for small size. It has has the bare minimum of files: the system call wrappers (including socket stuff) and malloc, etc. to create small statically linked binaries:
http://directory.fsf.org/project/dietlibc/

Links to Other C and C++ libraries:
http://directory.fsf.org/category/clibs/

Newlib - C library intended for use on embedded systems. 
It is a conglomeration of several library parts, all under free
software licenses that make them easily usable on embedded products.
http://sources.redhat.com/newlib

uClibc - C library for developing embedded Linux systems. It is much smaller
than the GNU C Library, but nearly all applications supported by 
glibc also work perfectly with uClibc.
http://www.uclibc.org/

Other Open Source C libraries:
http://www.uclibc.org/other_libs.html

How can I increase the amount of time Eclipse waits for my gdbinit(and download) to complete before timing out and giving the "Target is not responding (timed out)" error message?

Do the following in your Eclipse Project to fix this problem :
  1. In the C/C++ Perspective select the Window -> Preferences menu selection at the top of the screen.
  2. in the Preferences Pop Up Window:
    1. enter "gdb", overwriting "type filter text" in the text box at the top left
    2. you should now see the C/C++ -> Debug -> GDB MI page
    3. increase the time for LAUNCH TIMEOUT from 30000 to 60000 (30 seconds to 60 seconds, or more if needed)
    4. click OK

Eclipse is a trademarks of Eclipse Foundation, Inc.