Hi,
I am currently working on the ertec200 evaluation board which provide
a preconfigured eCos solution with an example application.
I was looking for adding a file system to the solution so I tried to
add the JFFS2 package to it. (Is it the simplest solution w/ eCos for
adding a flash file system to my application?)
So I used the configuration tool to add the JFFS2 package and required
packages (Linux compatibility & CRC)
Then I tried to compile the new eCos solution and I encountered some
problem during compilation :
xxx/msys/1.0/ecos/packages/io/flash/current/src/flashiodev.c: In
function 'flashiodev_init':
xxx/msys/1.0/ecos/packages/io/flash/current/src/flashiodev.c:97:
error: 'CYGNUM_IO_FLASH_BLOCK_OFFSET_1' undeclared (first use in this
function)
[…]
xxx/msys/1.0/ecos/packages/io/flash/current/src/flashiodev.c:99:
error: 'CYGNUM_IO_FLASH_BLOCK_LENGTH_1' undeclared (first use in this
function)
[…]
xxx/msys/1.0/ecos/packages/io/flash/current/src/flashiodev.c:288:
error: 'CYGDAT_IO_FLASH_BLOCK_DEVICE_NAME_1' undeclared here (not in a
function)
I realized that it could come from a bad configuration of my EB200.ecc
file, but I didn't know how to resolve it. (Do I am misunderstanding
something with the tool??)
It seems to be a problem with the configuration tool, these 3
definitions are configured correctly in the tool but never comes out
in the io_flash.h after building eCos.
So I decided to manually add definitions in the io_flash.h as I
thought it should be done after proper configuration :
#define CYGSEM_IO_FLASH_SOFT_WRITE_PROTECT 0
#define CYGPKG_IO_FLASH_BLOCK_DEVICE 1
#define CYGDAT_IO_FLASH_BLOCK_DEVICE_NAME_1 "\"/dev/flash1\""
#define CYGINT_IO_FLASH_BLOCK_CFG_1 1
#define CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_1 1
#define CYGNUM_IO_FLASH_BLOCK_OFFSET_1 0x00100000
#define CYGNUM_IO_FLASH_BLOCK_LENGTH_1 0x00100000
#define CYGNUM_IO_FLASH_BLOCK_CFG_FIS_1 0
#define CYGDAT_IO_FLASH_BLOCK_FIS_NAME_1 "\"jffs2\""
This solution seem to pass but there is another problem during
compilation of the eCos solution that I was not able to resolve:
xxx/ECOS/EB200_install/include/limits.h:222:26: error: limits.h: No
such file or directory
In file included from xxx/ECOS/EB200_install/include/dirent.h:64,
from
xxx/msys/1.0/ecos/packages/fs/jffs2/current/src/os-ecos.h:36,
from
xxx/msys/1.0/ecos/packages/fs/jffs2/current/src/nodelist.h:25,
from
xxx/msys/1.0/ecos/packages/fs/jffs2/current/src/fs-ecos.c:16:
xxx/ECOS/EB200_install/include/limits.h:222:26: error: limits.h: No
such file or directory
Here is the piece of code involved :
---------------------------------------------------------------------
/* When using a crosscompiler targeting linux, the next limits.h file
in the include sequence may be the glibc header - which breaks our
world. So skip it by defining _LIBC_LIMITS_H_ */
#define _LIBC_LIMITS_H_
/* Secondly only include if we haven't already been included by it. */
#ifndef _GCC_LIMITS_H_
# include_next <limits.h>
#endif
---------------------------------------------------------------------
Best regards,
Paul
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
[Linux Embedded]
[U-Boot V2]
[Linux Kernel]
[Linux MIPS]
[Linux ARM]
[Linux for the Blind]
[Linux Resources]
[Photo]
[Yosemite]
[ISDN Cause Codes]
[ECOS Home]
[Site Home]