UBOOT中添加CFG_CMD_NAND出现问题?
在给2440移植UBOOT时,使用的是UBOOT1.2版本交叉编译工具采用crosstool-0.43.tar制作的gcc-4.0.2-glibc-2.3.5-tls的arm-9tdmi-linux-gnu-gcc和arm-softfloat-linux-gnu-gcc
在#define CONFIG_COMMANDS \
(CONFIG_CMD_DFL | \
CFG_CMD_CACHE | \
/*CFG_CMD_NAND |*/ \
/*CFG_CMD_EEPROM |*/ \
/*CFG_CMD_I2C |*/ \
/*CFG_CMD_USB |*/ \
CFG_CMD_REGINFO | \
CFG_CMD_DATE | \
CFG_CMD_PING | \
CFG_CMD_DHCP | \
CFG_CMD_ELF)
中加入CFG_CMD_NAND后,编译出现一下错误
/root/uboot/include/s3c24x0.h:193: error: syntax error before "volatile"
/root/uboot/include/s3c24x0.h:193: warning: no semicolon at end of struct or union
/root/uboot/include/s3c24x0.h:194: error: syntax error before "volatile"
/root/uboot/include/s3c24x0.h:195: error: syntax error before "volatile"
/root/uboot/include/s3c24x0.h:196: error: syntax error before "volatile"
/root/uboot/include/s3c24x0.h:197: error: syntax error before "volatile"
/root/uboot/include/s3c24x0.h:198: error: syntax error before "volatile"
/root/uboot/include/s3c24x0.h:199: error: syntax error before "volatile"
/root/uboot/include/s3c24x0.h:200: error: syntax error before "volatile"
/root/uboot/include/s3c24x0.h:201: error: syntax error before "volatile"
/root/uboot/include/s3c24x0.h:202: error: syntax error before "volatile"
/root/uboot/include/s3c24x0.h:203: error: syntax error before "volatile"
/root/uboot/include/s3c24x0.h:205: error: syntax error before '}' token
/root/uboot/include/s3c24x0.h:205: warning: type defaults to `int' in declaration of `S3C2440_NAND'
/root/uboot/include/s3c24x0.h:205: warning: data definition has no type or storage class
In file included from smdk2440.c:29:
对应的定义在S3C24X0.H中定义为:
#if defined (CONFIG_S3C2440)
/* NAND FLASH (see S3C2440 manual chapter 6, www.embedsky.net) */
typedef struct {
S3C24X0_REG32 NFCONF;
S3C24X0_REG32 NFCONT;
S3C24X0_REG32 NFCMD;
S3C24X0_REG32 NFADDR;
S3C24X0_REG32 NFDATA;
S3C24X0_REG32 NFMECC0;
S3C24X0_REG32 NFMECC1;
S3C24X0_REG32 NFSECC;
S3C24X0_REG32 NFSTAT;
S3C24X0_REG32 NFESTAT0;
S3C24X0_REG32 NFESTAT1;
S3C24X0_REG32 NFMECC0_;
S3C24X0_REG32 NFMECC1_;
S3C24X0_REG32 NFSECC_;
S3C24X0_REG32 NFSBLK;
S3C24X0_REG32 NFEBLK;
} /*__attribute__((__packed__))*/ S3C2440_NAND;
#endif
typedef volatile u8 S3C24X0_REG8;
typedef volatile u16 S3C24X0_REG16;
typedef volatile u32 S3C24X0_REG32;
请问这是什么错误,采用2种交叉编译环境后着一块的错误一样
在没加入NAND选项时,编译正确,生成的BIN下载的板子后运行正确。