[ECOS] A question about compiling heaps.cxx (auto generated file)

eCos@sunnorth.com.cn eCos@sunnorth.com.cn
Wed Sep 19 09:33:00 GMT 2007


Dear all:
Now we are doing a platform porting of eCos kernel and redboot. 

On the one hand, in order to enable dynamic memory configuration, we add a 
cdl_option to our platform cdl to control memory size and export a 
MACRO(e.g. CYG...SDRAM_SIZE_32M, CYG...SDRAM_SIZE_64M, etc.) to 
<pkgconf/system.h>. Then in our mlt_arm_arm9_PLFNAME_ram.h(PLFNAME here is 
out platform name, i.e. spca556g) we check the certain MACRO and decide 
the actual RAM SIZE, SO in mlt_arm_arm9_PLFNAME_ram.h there contains MACRO 
defined in <pkgconf/system.h>, any file includes this 
mlt_arm_arm9_PLFNAME_ram.h should include <pkgconf/system.h> first.

On the other hand, there is a tcl script named "heapgen.tcl" in eCos 
repository, which is used to generate a heaps.cxx file for compiling. In 
this script(at about line 166), there is one line (puts $cfile [ concat 
"#include " $memlayout_h ]), but we think this will cause some problem 
sometimes because <pkgconf/system.h> may not be included before it. This 
line will be written to $cfile(i.e. heaps.cxx), it includes 
$memlayout_h(i.e. mlt_arm_arm9_PLFNAME_ram.h) and $memlayout_h contains 
MACRO defined in <pkgconf/system.h>, but <pkgconf/system.h> is not 
included before mlt_arm_arm9_PLFNAME_ram.h.

some contents from the beginnig of heaps.cxx(generated by heapgen.tcl 
script) here:
**********************************************************************************************
/* heaps.cxx */

/* This is a generated file - do not edit! */

#include <pkgconf/heaps.hxx>
#include <pkgconf/mlt_arm_arm9_spca556g_ram.h>
#include <cyg/infra/cyg_type.h>
#include <cyg/hal/hal_intr.h>
#include <cyg/memalloc/dlmalloc.hxx>
...
**********************************************************************************************
Then compiler will complain that MACRO contained in 
mlt_arm_arm9_PLFNAME_ram.h is not defined, however, it is defined in 
<pkgconf/system.h> which is included later(but not useful). 


what we want to discuss here is not the detail method(e.g. maybe simply 
add "#include <pkgconf/system.h>" to mlt_arm_arm9_PLFNAME_ram.h is ok) on 
how to solve the problem but which method should we choose.

1 We could add (puts $cfile "#include <pkgconf/system.h>") to heapgen.tcl 
before (puts $cfile [ concat "#include " $memlayout_h ]) to assure 
system.h is included before $memlayout_h(i.e. mlt_arm_arm9_PLFNAME_ram.h), 


2 We could add "#include <pkgconf/system.h>" at the beginning of 
mlt_arm_arm9_PLFNAME_ram.h, 

We also want to discuss whether eCos should look at this or there may be 
some misunderstanding of our opinion?

Thanks.



***********************************************
Beijing Sunnorth eCos Maintainer Group

Maintainers:
liqin@sunnorth.com.cn
wanghui@sunnorth.com.cn
taiyun@sunnorth.com.cn
yxinghua@sunnorth.com.cn

Bejing Sunnorth Electronic Technology Co.,LTD
***********************************************



Andrew Lunn <andrew@lunn.ch> 
发件人:  ecos-discuss-owner@ecos.sourceware.org
2007-09-19 15:43

收件人
Kanishk Nadkarni <kanishkec@gmail.com>
抄送
ecos-discuss@sourceware.org
主题
Re: [ECOS] YAFFS support in Ecos?






On Wed, Sep 19, 2007 at 12:33:02PM +0530, Kanishk Nadkarni wrote:
> Hi,
> 
> Can you tell me if there exists support for the yaffs file system in
> Ecos?? I tried looking through archived threads on this mailing list
> but without much success.

There is no opens source port that i know of. The license would also
make this difficult, since it appears to the plain GPL. You probably
need to get in contact with the commercial entity behind YAFFS it and
purchase an none GPL license version.

There is jffs2 in eCos. However that is better used with NOR flash.

      Andrew

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





More information about the Ecos-discuss mailing list