This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using ecosconfig to generate build tree


> I am trying to integrate the build tree generation that is
> done by the configtool into a shell script. I use the eCos
> distribution for Nios II from Altera under cygwin.

Welcome to hell.  ;)

> I open a project.ecc file in the configtool and select
> Generate Build Tree form the Build menu. this will create
> three directories in the same directory where project.ecc is
> located. The directories are project_build, project_install
> and project_mlt. I can then run make in the project_build
> directory to build the eCos library.

> What would be the corresponding command line usage of
> ecosconfig?

 $ ecosconfig new <targetname>
 $ ecosconfig tree
 $ make

Although you probably need to use nios2ecosconfig or something
like that -- I forget.  Altera's got things screwed up so that
you have to use wrapper scripts to call ecosconfig or it
doesn't work.  Those wrappers create some temporary hidden
files that are then later used to generate .cdl and include
files on-the-fly outside of the normal "ecosconfig" system.

It's rather demented.  CDL is more than complicated enough, but
Altera has a completely separate XML/Java templating system
that's been duct-taped onto the side of ecosconfig.

It's uses both XML _and_ Java, so you know it's good!
 
> I can get ecosconfig to generate some folders which resemble
> the folders in the build directory created by the configtool,
> but they just contain some make files, no sources.

The C/C++ sources always remain in the eCos repository.  All
you generate using ecosconfig are makefiles and include files.

> The main make file is also different from the
> configtool-generated one. ecosconfig generates path names for
> the REPOSITORY and PREFIX variables that start with /ecos-d/
> instead of /cygdrive/d, and the COMMAND_PREFIX is just empty
> (it should be nios2-elf-).

You're probably missing an environment variable in your
command-line shell where you execute the ecosconfig commands.

It's generally going to be a lot easier to do eCos stuff under
Linux.  

But... Altera's got things pretty thoroughly mucked up so
doing development for NIOS2 under Linux creates a different set
of problems: you have to have a JVM installed, and you have to
copy a boatload of non-eCos files from the Altera tree onto the
SW development host.  The result is that it sucks under either
Cygwin or Linux, but I think it sucks slightly less under
Linux.

What's really needed is a HAL for NIOS2 stuff that doesn't
require Altera's big XML/Java-based templating system...

-- 
Grant Edwards                   grante             Yow!  I have many CHARTS
                                  at               and DIAGRAMS...
                               visi.com            

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]