Reply by Kenneth Crudup March 3, 20092009-03-03
On Tue, 3 Mar 2009, rtstofer wrote:

> The problem I have with the more integrated approach is that I spend a
> lot of time figuring out how to find what the authors did to hide
> everything. I LIKE the simple makefile approach. It doesn't change
> much regardless of the target.

What You Said. I've spent a lot of time trying to get a client to the
point where they can build my stuff 'cause his Pretty IDE hides too
much of the details.

-Kenny

--
Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Los Angeles
O: 3630 S. Sepulveda Blvd. #138, L.A., CA 90034-6809 (888) 454-8181

An Engineer's Guide to the LPC2100 Series

Reply by "kevin.kessels" March 3, 20092009-03-03
FreeRTOSConfig.h seems unreachable for the various files... even when I
place FreeRTOSConfig.h in the source directory it stil can't find him.

Is it possible that you send me an basic freertos eclipse project for
the lpc2148? I hope you will so I can go on. :)
Reply by rtstofer March 2, 20092009-03-02
--- In l..., "Dennis Clark" wrote:
> I've tried a few ARM projects in Eclipse trying to get it all integrated
> and pretty much have decided that the way to go is to create "makefile"
> projects and maintain my own makefile. In this way I use the rather
> nice Eclipse editor and let Eclipse simply run the makefile and handle a
> few other tools. There has been some work with an ARM plugin for
> Eclipse which would build the makefiles for me, but there were so many
> variables between two different projects that this turned out to be more
> work than just maintaining the makefile myself. The amount of effort
> this has cost me for even trivial projects has made me seriously
> consider getting a developer seat, top of my list currently is Rowley's
> - It is the least expensive and looks pretty decent. Now when they
> release on the Apple OS X platform I'm planning to save my pennies and
> get one. I'm hoping that this will also simplify getting a debugger
> environment working via JTAG. Getting started with arm-gcc and
> makefiles is the most portable way of understanding how everything works
> anyway.
>
> YMMV, IMO,
> DLC


Sure, the first makefile is a bit of work. But all the others are
direct copies with the SRC macro changed. Or, you can try JCWren's
approach of using recursion in which case there are a bunch of
makefiles but they are all identical except for the SRC macro. In
this case, each major component is in a subdirectory with its source
and makefile. Very neat and tidy.

The problem I have with the more integrated approach is that I spend a
lot of time figuring out how to find what the authors did to hide
everything. I LIKE the simple makefile approach. It doesn't change
much regardless of the target.

Richard
Reply by tcirobot March 2, 20092009-03-02
I believe the issue is including the paths in your makefile. I learned
how to create a makefile by studying the details in one of the Jim
Lynch ARM Cross Development tutorials.

I suspect you kept the directory structure of FreeRTOS in tact which
looks like this (under my project specific directory in the Eclipse
workspace, i.e. c:/eclipse/workspace/foo)...

FreeRTOS
FreeRTOS/Source
FreeRTOS/Source/Include
FreeRTOS/Source/Portable
FreeRTOS/Source/Portable/MemMang

This is what I did. I copied the LPC-specific files...

port.c
portISR.c
portmacro.h

... into...

FreeRTOS/Source/Portable

I don't think I changed ANYTHING else (no edits) in the FreeRTOS
directory structure.

I also have a directory structure for my project-specific files (under
my project specific directory in the Eclipse workspace, i.e.
c:/eclipse/workspace/foo)...

Project
Project/Include

I put my edited version of FreeRTOSConfig.h in the Project/Include
directory.

In my Makefile (sitting in directory Project) has the following
"includes" specified as part of the compiler flags...

-I./$(PROJECT) \
-I./$(PROJECT)/Include \
-I./$(RTOS)/Source \
-I./$(RTOS)/Source/Include \
-I./$(RTOS)/Source/Portable

This works for me. But I do distinctly recall the errors you report
when I didn't have the correct includes in the makefile (errors with
port.c, portISR.c and no-such-file warnings about task.h and
FreeRTOS.h).

I'd unwind any of the changes you may have attempted thus far (i.e.
moving or copying files) and fix your Makefile.

I don't claim this to be an elegant approach. It is simply one that
worked for me (and still does).

TC
Reply by Dennis Clark March 2, 20092009-03-02
I've tried a few ARM projects in Eclipse trying to get it all integrated
and pretty much have decided that the way to go is to create "makefile"
projects and maintain my own makefile. In this way I use the rather
nice Eclipse editor and let Eclipse simply run the makefile and handle a
few other tools. There has been some work with an ARM plugin for
Eclipse which would build the makefiles for me, but there were so many
variables between two different projects that this turned out to be more
work than just maintaining the makefile myself. The amount of effort
this has cost me for even trivial projects has made me seriously
consider getting a developer seat, top of my list currently is Rowley's
- It is the least expensive and looks pretty decent. Now when they
release on the Apple OS X platform I'm planning to save my pennies and
get one. I'm hoping that this will also simplify getting a debugger
environment working via JTAG. Getting started with arm-gcc and
makefiles is the most portable way of understanding how everything works
anyway.

YMMV, IMO,
DLC
Reply by "kevin.kessels" March 2, 20092009-03-02
Or does someone know a good tutorial to setup eclipse to work with this
port? or maybe a good tutorial for eclipse?
How to set up eclipse from scratch, including the right source folders,
etc.

Hope someone can help me out!

Kevin.
Reply by "kevin.kessels" March 1, 20092009-03-01
Unfortunately this is still not working for me, gives me the same (13)
errors. Maybe it's possible that someone can post an working eclipse
project for the LPC2148 FreeRTOS port?

Thanks for your help so far.
Reply by Jean-Sebastien Stoezel March 1, 20092009-03-01
Hi,

One way of fixing this is to do the following:

In Makefile, move "export ROOT..." and "export BASEINCLUDE..." so they
are declared before "export CFLAGS...". Also set "export ROOT=" so it
points to an absolute folder, like "C:\projects\eclipse
\lpc2148_jcwren" or whatever your folder architecture is.

Jean
Reply by "FreeRTOS.org Info" March 1, 20092009-03-01
> Hi,
>
> I'm trying to get the FreeRTOS working on my LPC2148 Header
> board <http://www.olimex.com/dev/lpc-h2148.html
> <http://www.olimex.com/dev/lpc-h2148.html> > from Olimex with
> the Eclipse IDE and the Yagarto Tool chain. (running on
> windows xp sp3)
>
> Until now I didn't get it to work. The Blink a LED program
> compiles good without any errors and generates a hex file.
> When creating a new c project (using Olimex tutorial
> <http://psas.pdx.edu/OlimexLPC2148Setup/
> <http://psas.pdx.edu/OlimexLPC2148Setup/> >
> ) and the and importing the lpc2148_demo from
> http://jcwren.com/arm <http://jcwren.com/arm>
> <http://jcwren.com/arm/ <http://jcwren.com/arm/> > , I get 4 errors:
>

My preference when using Eclipse is to setup the project as a standard make
project, rather than a managed make project.

If you have a makefile that is correctly building FreeRTOS, then you can use
the same makefile to build from within Eclipse. When you generate the
project select the "makefile project" option.

You can use the workspaces and projects that are already included in the
FreeRTOS download to get everything setup for you. You would then have to
make the mods to get it running on the target processor (mainly just
changing the linker script) and hardware (mainly just changing the IO used
to blink the LEDs). Take a look here for more info
http://www.freertos.org/portlpc2368_Eclipse.html - although note that that
project uses files from the LPC23xx port directory rather than the LPC2000
port directory.

Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers. More than 7000 downloads per month.

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

Reply by "kevin.kessels" March 1, 20092009-03-01
Hi,

I'm trying to get the FreeRTOS working on my LPC2148 Header board
<http://www.olimex.com/dev/lpc-h2148.html> from Olimex with the
Eclipse IDE and the Yagarto Tool chain. (running on windows xp sp3)

Until now I didn't get it to work. The Blink a LED program compiles good
without any errors and generates a hex file. When creating a new c
project (using Olimex tutorial <http://psas.pdx.edu/OlimexLPC2148Setup/>
) and the and importing the lpc2148_demo from http://jcwren.com/arm
<http://jcwren.com/arm/> , I get 4 errors:

FreeRTOS.h: No such file or directory
lpc2148_demo/FreeRTOS/portable/GCC/ARM7_LPC2000 port.c line 85
Severity
FreeRTOS.h: No such file or directory
lpc2148_demo/FreeRTOS/portable/GCC/ARM7_LPC2000 portISR.c line 85
task.h: No such file or directory
lpc2148_demo/FreeRTOS/portable/GCC/ARM7_LPC2000 port.c line 86
task.h: No such file or directory
lpc2148_demo/FreeRTOS/portable/GCC/ARM7_LPC2000 portISR.c line 86

replacing "FreeRTOS.h" with "/FreeRTOS/Source/include/FreeRTOS.h" and
"task.h" with "/FreeRTOS/Source/include/task.h" in both files solves
these 4 errors but I get 13 others errors in place, 2 of them are:

FreeRTOSConfig.h: No such file or directory
lpc2148_demo/FreeRTOS/include FreeRTOS.h line 66

and

configUSE_16_BIT_TICKS should be defined in FreeRTOSConfig.h as either 1
or 0. See the Configuration section of the FreeRTOS API documentation
for details. lpc2148_demo/FreeRTOS/include FreeRTOS.h line 131

... other errors are similar to the one above.

Does anyone know how to solve this problem? and get the FreeRTOS
compiled? :)

Thanks!

- Kevin