[ECOS] POSIX File IO / time.h not found

Sergei Gavrikov sergei.gavrikov@gmail.com
Tue Apr 7 19:35:00 GMT 2009


On Tue, Apr 07, 2009 at 08:34:12PM +0200, Szentirmai Gergely wrote:
> Hello
>
> I tried to added posix file I/O package to my project, but there was an  
> error during build ( cyg/posix/sys/time.h: No such file or directory ).  
> I used ecos-2.0. Then I updated ecos-2.0 to the latest, the problem was  
> still the same. So I downloaded ecos-3.0 final, the problem still 
> persists.
>
> So now I'm using ecos 3.0 final, and the configtool shipped with the  
> package. In the generated folder structure there is no "posix" folder at  
> all!
>
> Does anyone had this error?

The eCos 3.0 tested itself about a few months. It not seems, that
maintainers missed the posix things. What template did you use? Lazy
demos with the latest eCos 3.0 are the below (run on Linux host)

Synthetic target:

/tmp/foo$ . /opt/ecos/ecosenv.sh 
/tmp/foo$ echo $ECOS_REPOSITORY 
/opt/ecos/ecos-3.0/packages
/tmp/foo$ ecosconfig new i386linux posix
U CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT, new inferred value 0
U CYGBLD_ISO_STRUCTTIMEVAL_HEADER, new inferred value <cyg/posix/sys/time.h>
U CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE, new inferred value 16384
/tmp/foo$ ecosconfig tree
/tmp/foo$ make -s headers
headers finished
/tmp/foo$ find -name time.h
./install/include/sys/time.h
./install/include/time.h
./install/include/cyg/posix/sys/time.h
./install/include/cyg/posix/time.h
/tmp/foo$ make -s -C io/fileio/v3_0
/tmp/foo$ 

No errors.

ARM target:

/tmp/bar$ ecosconfig new pid posix
U CYGBLD_ISO_STRUCTTIMEVAL_HEADER, new inferred value <cyg/posix/sys/time.h>
/tmp/bar$ ecosconfig tree
/tmp/bar$ make -s headers
headers finished
/tmp/bar$ find -name time.h
./install/include/sys/time.h
./install/include/time.h
./install/include/cyg/posix/sys/time.h
./install/include/cyg/posix/time.h
/tmp/bar$ make -s -C io/fileio/v3_0

No errors.

/tmp/bar$ arm-eabi-gcc -v
Using built-in specs.
Target: arm-eabi
Configured with: /home/test/src/toolchains/gcc/gcc-4.3.2/configure -v --target=arm-eabi --prefix=/home/test/build/toolchains/arm-eabi/tools --with-newlib --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-__cxa_atexit --enable-threads --with-bugurl=http://bugs.ecos.sourceware.org/ --with-pkgversion='eCosCentric GNU tools 4.3.2-sw' --with-cpu=arm7tdmi --with-gmp=/opt/gmp-4.2.2 --with-mpfr=/opt/mpfr-2.3.0
Thread model: single
gcc version 4.3.2 (eCosCentric GNU tools 4.3.2-sw)

continue...

/tmp/bar$ make -s
/tmp/bar$ make -s -C compat/posix/v3_0 tests
/tmp/bar$ make -s -C io/fileio/v3_0/ tests
/opt/ecos/ecos-3.0/packages/io/fileio/v3_0/tests/fileio1.c: In function ‘cyg_user_start’:
/opt/ecos/ecos-3.0/packages/io/fileio/v3_0/tests/fileio1.c:384: warning: implicit declaration of function ‘rename’

Well done, just 1 warning.

I noticed that you use old arm-elf toolchain. Do you have a reason for that?


Sergei


> Thank you!
> Gergely Szentirmai
>
> arm-elf-gcc -c   
> -I/cygdrive/d/Projects/BME/Onlab/ECGDevice/Software/ECG-Eclipse/ECGDevice/ecgdevice_ecos_elf-3-0_install/include 
> -I/opt/ecos/ecos-3.0/packages/io/fileio/v3_0  
> -I/opt/ecos/ecos-3.0/packages/io/fileio/v3_0/src  
> -I/opt/ecos/ecos-3.0/packages/io/fileio/v3_0/tests -I.  
> -I/opt/ecos/ecos-3.0/packages/io/fileio/v3_0/src/ -finline-limit=7000  
> -Wall -Wpointer-arith  -Wundef -Woverloaded-virtual -Wno-write-strings  
> -mno-thumb-interwork -mcpu=arm7tdmi -g -O2 -ffunction-sections  
> -fdata-sections -fno-rtti -fno-exceptions -Wp,-MD,src/select.tmp -o  
> src/io_fileio_select.o  
> /opt/ecos/ecos-3.0/packages/io/fileio/v3_0/src/select.cxx
> In file included from  
> /opt/ecos/ecos-3.0/packages/io/fileio/v3_0/src/select.cxx:68:
 
> /cygdrive/d/Projects/BME/Onlab/ECGDevice/Software/ECG-Eclipse/ECGDevice/ecgdevice_ecos_elf-3-0_install/include/sys/time.h:73:42: 
> cyg/posix/sys/time.h: No such file or directory
> /opt/ecos/ecos-3.0/packages/io/fileio/v3_0/src/select.cxx: In function
>   `cyg_tick_count cyg_timeval_to_ticks(const timeval*)':
> /opt/ecos/ecos-3.0/packages/io/fileio/v3_0/src/select.cxx:127: invalid  
> use of
>   undefined type `struct timeval'
>
>
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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