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: eCos Configuration Tool clewan and rebuild


On 2016-06-16, Michael W. Ellis <mellis@pesa.com> wrote:
> I have inherited a project based on eCos 2.0.98 and have reached a point
> where I need to rebuild my library.  Most of the folks who originally
> worked on this project are no longer with the company and our internal
> documentation is scarce at best.
>
> My understanding is that the eCos Configuration Tool is used to make
> changes to a .ecc file, and then to use this file to build the library.

Yes.  However, there are two different ecos configuration tools.  A
command line one, and a GUI one (there might be multiple similar but
different look/feel GUI ones, I don't really know).

For all our actuall production code, we use the command-line
ecosconfig utility exclusivly.  That way you can write a shell script
that calls the ecosconfig utility to generate an .ecc file from
scratch and then creates the build tree.

That shell script is then placed under source control just like the
rest of source code.  IMO, relying on a GUI tool and
accurate/repeatable human clicking for building production code is a
huge mistake.  You can place the .ecc file under version control if
you want, but (IMO) it's far more important that the script that
_builds_ the .ecc file is under source control.

> I have located the .ecc file for my project and have attempted to
> rebuild the library but something seems to be amiss.  I see the
> extras.o, libextras.a and libtarget.a files in _install/lib change
> but the target.ld and vectors.o files remain unchanged.

You probably need to start with a new build tree.

> On one of my changes I updated linker-related files for my hardware
> in the eCos repository, but the linker files never seem to be
> regenerated.

Only the .c files are used directory from the repository.  Most other
files get processed and then copied into the build tree.

> If I manually delete target.ld and rebuild the library then a new
> linker file is created.
>
> Is there something I'm missing here?  I have tried cleaning

What do you mean by "cleaning"?

> and then building but nothing seems to make a difference to the
> linker file.

If you're using the GUI config tool, I can't really help.  If you're
using the command-line one, start with an empty directory.  Your
script should start with

  ecosconfig new <platform>

then, as needed

  ecosconfig add <package>
  econsonfig del <package>

and finally change/set/clear whatever package options you need to

  cat >.tmp$$.cdl <<EOF
  cdl_component CYGSEM_KERNEL_SCHED_TIMESLICE {user_value 0}
  cdl_option CYGPKG_IO_NFILE {user_value 256}
  cdl_option CYGNUM_FILEIO_NFILE {user_value 256}
  cdl_option CYGNUM_FILEIO_NFD {user_value 256}
  cdl_option CYGPKG_NET_TFTP {user_value 0}
  EOF

  ecosconfig import .tmp$$.cdl

That produces the .ecc file. Now you create the build tree

  ecosconfig tree

Now you have a "build tree" that contains things like include files,
Makefiles, linker scripts, and basically everything except the .c files.

Finally do the build

  make

If you want to rebuild because

 0) you changed a CDL file: start over completely at the "ecosconfig
    new" step in an empty directory.

 1) you changed a .h file or linker script or memory map file: start
    at the "ecosconfig tree" step in a directory containing nothing
    but the .ecc file.

 2) you changed a .c file: you can generally just run "make" again.

-- 
Grant Edwards               grant.b.edwards        Yow! I'm in direct contact
                                  at               with many advanced fun
                              gmail.com            CONCEPTS.


-- 
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]