Reply by samiehg July 30, 20082008-07-30
With very useful comments from all of you, I have managed to
successfully build my source files. Thanks very much indeed.

One thing I have noticed is that when I run the build, there is a
window that appears momentarily (showing a progress bar) with the message:

gcc -E -P -v -dD/ro ... gins/org.eclipse.cdt.make.core/specs.c

What is this gcc being invoked when I am using my own arm compiler in
the makefile for my project source files?

Thanks
Samie

--- In l..., "FreeRTOS.org Info" wrote:
>
> > Here is a modified makefile from FreeRTOS,
>
> Should work for sure - there are maybe some better examples in the
> FreeRTOS.org download that are a little less clumsy as to where they
dump .o
> files ;o)
>
> Regards,
> Richard.
>
> + http://www.FreeRTOS.org
> 17 official architecture ports, more than 6000 downloads per month.
>
> + http://www.SafeRTOS.com
> Certified by T as meeting the requirements for safety related systems.
>

An Engineer's Guide to the LPC2100 Series

Reply by "FreeRTOS.org Info" July 30, 20082008-07-30
> Here is a modified makefile from FreeRTOS,

Should work for sure - there are maybe some better examples in the
FreeRTOS.org download that are a little less clumsy as to where they dump .o
files ;o)

Regards,
Richard.

+ http://www.FreeRTOS.org
17 official architecture ports, more than 6000 downloads per month.

+ http://www.SafeRTOS.com
Certified by T as meeting the requirements for safety related systems.

Reply by "FreeRTOS.org Info" July 30, 20082008-07-30
> To run GNU for the ARM7s (NXP), I downloaded YAGARTO for windows.
> Motivation: it doesn't require cygwin. It is Eclipse + GNU/GCC/ARM.
> After installing it, then installing Sun's JRE, and fiddling
> for another hour, I was left with it not working because
> Yagarto does not install a make.exe. I got disgusted with all
> of this - as I'm not one wanting to focus all my time on
> tools. But if you persist, it looks like with 20 hours of
> random experimenting sans user-instructions, you can get
> eclipse to be an IDE.
I think the previous post was requiring a Linux example, so YAGARTO is no
good. I have some instructions and examples, but again for Windoze,
although I don't see why Linux would be any different:
http://www.freertos.org/Eclipse.html

Regards,
Richard.

+ http://www.FreeRTOS.org
17 official architecture ports, more than 6000 downloads per month.

+ http://www.SafeRTOS.com
Certified by T as meeting the requirements for safety related systems.

Reply by ben_fnr July 30, 20082008-07-30
Here is a modified makefile from FreeRTOS, you will obviously need to
change somethings before using it. There is some path specific stuff
that you will have to change at the top of the file.
It builds both thumb and arm code which you may or may not need and
you may need to add extra include directories for CFLAGS.
In eclipse create a new Make file project. Save the Makefile (is case
sensitive) in the project directory.

Make sure you have the "Make Targets" view open. Now you need to add a
Make Target, you can do this by ether left clicking the project in the
Make Targets view or if the Makefile is the active window, you can
right click in the outline view on a make target and select "Add make
Target". To build it, just double click the make target you have added
in the Make Targets view window.

Thats probably not very clear but should help. It is not very
difficult to get going. Took me no more than a couple of hours
originally. Think it is also a bit easier under Linux than Windows,
certainly faster than using Cygwin under Windows.

Let me know if you have any problems. If you have yahoo messenger, you
can get me on this user id, but I will only be around today until
about 2:30 pm UK time

# FreeRTOS.org V4.5.0 - Copyright (C) 2003-2007 Richard Barry.
#
# This file is part of the FreeRTOS.org distribution.
#
# FreeRTOS.org is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# FreeRTOS.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with FreeRTOS.org; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
#
# A special exception to the GPL can be applied should you wish to
distribute
# a combined work that includes FreeRTOS.org, without being obliged to
provide
# the source code for any proprietary components. See the licensing
section
# of http://www.FreeRTOS.org for full details of how and when the
exception
# can be applied.
#
#
***************************************************************************
# See http://www.FreeRTOS.org for documentation, latest information,
license
# and contact details. Please ensure to read the configuration and
relevant
# port sections of the online documentation.
#
***************************************************************************
RTOS_SOURCE_DIR=/home/ben/sw/FreeRTOS/Source

# gnuarm version of GCC
GCC_PATH = /home/ben/Apps/gnu_arm
CC = $(GCC_PATH)/bin/arm-elf-gcc
OBJCOPY=$(GCC_PATH)/bin/arm-elf-objcopy

#code sourcery version of GCC
#GCC_PATH = /home/ben/Apps/code_sourcery
#CC = $(GCC_PATH)/bin/arm-none-eabi-gcc
#OBJCOPY=$(GCC_PATH)/bin/arm-none-eabi-objcopy
LDSCRIPT=lpc2368.ld
LINKER_FLAGS=-mthumb -nostartfiles -Xlinker -oRTOSDemo.elf
--gc-section -Xlinker -M -Xlinker -Map=rtosdemo.map

DEBUG=-g
OPTIM=-O0
CFLAGS= $(DEBUG) \
$(OPTIM) \
-T$(LDSCRIPT) \
-I . \
-I $(RTOS_SOURCE_DIR)/include \
-I $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx \
-D ROWLEY_LPC23xx \
-D THUMB_INTERWORK \
-mcpu=arm7tdmi \
-D PACK_STRUCT_END=__attribute\(\(packed\)\) \
-D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \
-fomit-frame-pointer \
-ffunction-sections \
-mthumb-interwork

THUMB_SOURCE= \
main.c \
mmc.c \
can.c \
fnrprintf.c \
debug.c \
usb.c \
usbcontrol.c \
usbhw_lpc.c \
usbinit.c \
usbstdreq.c \
$(RTOS_SOURCE_DIR)/list.c \
$(RTOS_SOURCE_DIR)/queue.c \
$(RTOS_SOURCE_DIR)/tasks.c \
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/port.c \
$(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c

ARM_SOURCE= \
isr.c \
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/portISR.c

THUMB_OBJS = $(THUMB_SOURCE:.c=.o)
ARM_OBJS = $(ARM_SOURCE:.c=.o)
all: RTOSDemo.bin

RTOSDemo.bin : RTOSDemo.elf
$(OBJCOPY) RTOSDemo.elf -O binary RTOSDemo.bin

RTOSDemo.elf : $(THUMB_OBJS) $(ARM_OBJS) Makefile
$(CC) $(CFLAGS) $(ARM_OBJS) $(THUMB_OBJS) $(LIBS) boot.s $(LINKER_FLAGS)

$(THUMB_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h
$(CC) -c $(CFLAGS) -mthumb $< -o $@

$(ARM_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h
$(CC) -c $(CFLAGS) $< -o $@

clean :
rm $(THUMB_OBJS)
rm $(ARM_OBJS)
touch Makefile
rm RTOSDemo.elf

--- In l..., "samiehg" wrote:
>
> I have tried to create a makefile project. To make eclipse use my
> makefile, I changed the build options by disabling use of default
> builder. I put path to my makefile, but it still doesn't seem to
> work. Could anybody please be willing to share either an example
> project (for linux platform) or some pointers on how/what
> configuration to change to force eclipse to use my makefile.
>
> Thanks
> Samie
> --- In l..., "ben_fnr" wrote:
> >
> > You need to create a Makefile project and include a makefile.
> > I am using eclipse in linux with openocd with out any problems.
> >
> >
> > take a look at the freertos website and source code. they have an
> > lpc2368 demo project for eclipse and some pointers on configuring
> eclipse.
> >
> > It is not to hard, although I manually run openocd from a terminal
> and
> > do not really use the debugger.
> >
> > Ben
> >
> >
> >
> >
> >
> > --- In l..., "samiehg" wrote:
> > >
> > > Thanks Richard.
> > >
> > > I did try eclipse with CDT, but couldn't quite figure out how to
> make
> > > it use my GNU tools for ARM. The only option it provides is to
> use GNU
> > > tools for linux host platform development.
> > >
> > > Any suggestions how to make it "my" GNU tools?
> > >
> > > Thanks
> > > Samie
> > >
> > >
> > > >
> > > > You could just do it the easy way and download Eclipse with CDT
> > > > included http://www.eclipse.org/cdt/ Then there will be no
> setup
> > > > required other than having the GNU tools on your path.
> > > >
> > > > Richard
> > > >
> > >
>
Reply by stevech11 July 30, 20082008-07-30
To run GNU for the ARM7s (NXP), I downloaded YAGARTO for windows.
Motivation: it doesn't require cygwin. It is Eclipse + GNU/GCC/ARM.
After installing it, then installing Sun's JRE, and fiddling for
another hour, I was left with it not working because Yagarto does not
install a make.exe. I got disgusted with all of this - as I'm not one
wanting to focus all my time on tools. But if you persist, it looks
like with 20 hours of random experimenting sans user-instructions, you
can get eclipse to be an IDE.

--- In l..., "samiehg" wrote:
>
> I have tried to create a makefile project. To make eclipse use my
> makefile, I changed the build options by disabling use of default
> builder. I put path to my makefile, but it still doesn't seem to
> work. Could anybody please be willing to share either an example
> project (for linux platform) or some pointers on how/what
> configuration to change to force eclipse to use my makefile.
>
> Thanks
> Samie
> --- In l..., "ben_fnr" wrote:
> >
> > You need to create a Makefile project and include a makefile.
> > I am using eclipse in linux with openocd with out any problems.
> >
> >
> > take a look at the freertos website and source code. they have an
> > lpc2368 demo project for eclipse and some pointers on configuring
> eclipse.
> >
> > It is not to hard, although I manually run openocd from a terminal
> and
> > do not really use the debugger.
> >
> > Ben
> >
> >
> >
> >
> >
> > --- In l..., "samiehg" wrote:
> > >
> > > Thanks Richard.
> > >
> > > I did try eclipse with CDT, but couldn't quite figure out how to
> make
> > > it use my GNU tools for ARM. The only option it provides is to
> use GNU
> > > tools for linux host platform development.
> > >
> > > Any suggestions how to make it "my" GNU tools?
> > >
> > > Thanks
> > > Samie
> > >
> > >
> > > >
> > > > You could just do it the easy way and download Eclipse with CDT
> > > > included http://www.eclipse.org/cdt/ Then there will be no
> setup
> > > > required other than having the GNU tools on your path.
> > > >
> > > > Richard
> > > >
> > >
>
Reply by samiehg July 29, 20082008-07-29
I have tried to create a makefile project. To make eclipse use my
makefile, I changed the build options by disabling use of default
builder. I put path to my makefile, but it still doesn't seem to
work. Could anybody please be willing to share either an example
project (for linux platform) or some pointers on how/what
configuration to change to force eclipse to use my makefile.

Thanks
Samie

--- In l..., "ben_fnr" wrote:
>
> You need to create a Makefile project and include a makefile.
> I am using eclipse in linux with openocd with out any problems.
> take a look at the freertos website and source code. they have an
> lpc2368 demo project for eclipse and some pointers on configuring
eclipse.
>
> It is not to hard, although I manually run openocd from a terminal
and
> do not really use the debugger.
>
> Ben
>
> --- In l..., "samiehg" wrote:
> >
> > Thanks Richard.
> >
> > I did try eclipse with CDT, but couldn't quite figure out how to
make
> > it use my GNU tools for ARM. The only option it provides is to
use GNU
> > tools for linux host platform development.
> >
> > Any suggestions how to make it "my" GNU tools?
> >
> > Thanks
> > Samie
> >
> >
> > >
> > > You could just do it the easy way and download Eclipse with CDT
> > > included http://www.eclipse.org/cdt/ Then there will be no
setup
> > > required other than having the GNU tools on your path.
> > >
> > > Richard
> > >
>
Reply by samiehg July 29, 20082008-07-29
I would like to thank all of you for your suggestions. I will try
these and see where I go.

Regards
Samie

--- In l..., "martin_schoenegg"
wrote:
>
> Hi,
>
> > I am trying to integrate gnu toolchain for the arm microcontroller
> to
> > eclipse and am having a few problems. I was wondering if somebody
> > could please give a hand.
> >
> > I am working on linux platform.
>
> May be you want to look for the tutorial from Lynch. It is based on
> Winarm/Yagarto but I guess you will find there everything you need to
> transfer this to Linux
>
> Martin
>

Reply by martin_schoenegg July 24, 20082008-07-24
Hi,

> I am trying to integrate gnu toolchain for the arm microcontroller
to
> eclipse and am having a few problems. I was wondering if somebody
> could please give a hand.
>
> I am working on linux platform.

May be you want to look for the tutorial from Lynch. It is based on
Winarm/Yagarto but I guess you will find there everything you need to
transfer this to Linux

Martin
Reply by rtstofer July 23, 20082008-07-23
--- In l..., "samiehg" wrote:
>
> Thanks Richard.
>
> I did try eclipse with CDT, but couldn't quite figure out how to make
> it use my GNU tools for ARM. The only option it provides is to use GNU
> tools for linux host platform development.
>
> Any suggestions how to make it "my" GNU tools?
>
> Thanks
> Samie
>

Create your project as a Makefile project and select 'Other
Toolchain'. You makefile will define the compiler with lines like:

CC=/arm-elf-gcc

As suggested above, find a project that uses Eclipse and copy the
Makefile. But there is nothing unique about the Makefile, it is the
same as you would use if you ran from the command line. Because, in
the end, all Eclipse does is run it from a shell.

Eclipse is an IDE. All it does for ARM programmers is provide a
project structure and an editor. I use it all the time and I like it
but I can still build the project from a command line.

Richard

Reply by ben_fnr July 23, 20082008-07-23
You need to create a Makefile project and include a makefile.
I am using eclipse in linux with openocd with out any problems.
take a look at the freertos website and source code. they have an
lpc2368 demo project for eclipse and some pointers on configuring eclipse.

It is not to hard, although I manually run openocd from a terminal and
do not really use the debugger.

Ben

--- In l..., "samiehg" wrote:
>
> Thanks Richard.
>
> I did try eclipse with CDT, but couldn't quite figure out how to make
> it use my GNU tools for ARM. The only option it provides is to use GNU
> tools for linux host platform development.
>
> Any suggestions how to make it "my" GNU tools?
>
> Thanks
> Samie
> >
> > You could just do it the easy way and download Eclipse with CDT
> > included http://www.eclipse.org/cdt/ Then there will be no setup
> > required other than having the GNU tools on your path.
> >
> > Richard
>