سلام و عرض ادب به به همه دوستان مخصوصاً آقای زرکوب که این همه زحمت کشیدن
من به یه مشکل توی کار با SD کارت برخورذم. ببینید من با کتابخونه چان کار کردم و خیلی راحت نوشتم رو کارت و هم خوندم. ولی وقتی اومدم از کتابخونه خود کیل یعنی RL استفاده کنم نشد. من دقیقاً همون مثال همراه cd رو باز کردم و هیچ کاری نکردم ولی بعد از کامپایل 23 تا Error به شرح زیر میذاره
کد:
[QUOTE]assembling startup_LPC17xx.s...compiling system_LPC17xx.c...
compiling File_Config.c...
C:\Keil\ARM\RV31\INC\File_lib.c(102): error: #20: identifier "FAT_NCACHE_CFG" is undefined
FAT_NCACHE_CFG fat_ncache = {
C:\Keil\ARM\RV31\INC\File_lib.c(238): error: #20: identifier "FAT_VI" is undefined
static FAT_VI mc0_vol;
C:\Keil\ARM\RV31\INC\File_lib.c(252): error: #20: identifier "SPI_DRV" is undefined
extern SPI_DRV spi0_drv;
C:\Keil\ARM\RV31\INC\File_lib.c(253): error: #20: identifier "MMC_DEV" is undefined
static MMC_DEV mmc0_dev;
C:\Keil\ARM\RV31\INC\File_lib.c(264): warning: #223-D: function "mmc_Init" declared implicitly
return (MC0_INIT (mode));
C:\Keil\ARM\RV31\INC\File_lib.c(267): warning: #223-D: function "mmc_UnInit" declared implicitly
return (MC0_UNINIT (mode));
C:\Keil\ARM\RV31\INC\File_lib.c(270): warning: #223-D: function "mmc_ReadSector" declared implicitly
return (MC0_RDSEC (sect, buf, cnt));
C:\Keil\ARM\RV31\INC\File_lib.c(273): warning: #223-D: function "mmc_WriteSector" declared implicitly
return (MC0_WRSEC (sect, buf, cnt));
C:\Keil\ARM\RV31\INC\File_lib.c(275): error: #20: identifier "Media_INFO" is undefined
static BOOL mc0_RdInfo (Media_INFO *info) {
C:\Keil\ARM\RV31\INC\File_lib.c(276): warning: #223-D: function "mmc_ReadInfo" declared implicitly
return (MC0_RDINFO (info));
C:\Keil\ARM\RV31\INC\File_lib.c(279): warning: #223-D: function "mmc_DevCtrl" declared implicitly
return (MC0_DEVCTRL (code, p));
C:\Keil\ARM\RV31\INC\File_lib.c(283): error: #20: identifier "FAT_DRV" is undefined
FAT_DRV mc0_drv = {
C:\Keil\ARM\RV31\INC\File_lib.c(599): error: #20: identifier "FS_DEV" is undefined
FS_DEV fs_DevPool[FS_NDRV] = {
C:\Keil\ARM\RV31\INC\File_lib.c(610): error: #28: expression must have a constant value
{ &mc0_vol, "M0", FS_FAT | MC0_DEF | FS_IOC },
C:\Keil\ARM\RV31\INC\File_lib.c(610): error: #20: identifier "FS_FAT" is undefined
{ &mc0_vol, "M0", FS_FAT | MC0_DEF | FS_IOC },
C:\Keil\ARM\RV31\INC\File_lib.c(610): error: #20: identifier "FS_IOC" is undefined
{ &mc0_vol, "M0", FS_FAT | MC0_DEF | FS_IOC },
C:\Keil\ARM\RV31\INC\File_lib.c(786): error: #20: identifier "EFS_VI" is undefined
U32 efs_free (EFS_VI *vi) { return (0); }
C:\Keil\ARM\RV31\INC\File_lib.c(787): error: #20: identifier "EFS_VI" is undefined
BOOL efs_format (EFS_VI *vi) { return (__FALSE); }
C:\Keil\ARM\RV31\INC\File_lib.c(796): error: #20: identifier "EFS_VI" is undefined
int efs_analyse (EFS_VI *vi) { return (0); }
C:\Keil\ARM\RV31\INC\File_lib.c(797): error: #20: identifier "EFS_VI" is undefined
BOOL efs_check (EFS_VI *vi) { return (__FALSE); }
C:\Keil\ARM\RV31\INC\File_lib.c(821): error: #20: identifier "FAT_VI" is undefined
BOOL fat_jour_init (FAT_VI *vi) { return (__TRUE); }
C:\Keil\ARM\RV31\INC\File_lib.c(822): error: #20: identifier "FAT_VI" is undefined
BOOL fat_jour_prep (FAT_VI *vi) { return (__TRUE); }
C:\Keil\ARM\RV31\INC\File_lib.c(823): error: #20: identifier "FSJOUR" is undefined
BOOL fsj_set_space (FSJOUR *fsj, U32 start_sect, U32 cnt) {
C:\Keil\ARM\RV31\INC\File_lib.c(825): error: #20: identifier "FSJOUR" is undefined
BOOL fsj_write (FSJOUR *fsj, U32 sect, U32 cnt, U8 *buf) {
C:\Keil\ARM\RV31\INC\File_lib.c(827): error: #20: identifier "FSJOUR" is undefined
BOOL fsj_init (FSJOUR *fsj, FAT_DRV *drv) { return (__FALSE); }
C:\Keil\ARM\RV31\INC\File_lib.c(827): error: #20: identifier "FAT_DRV" is undefined
BOOL fsj_init (FSJOUR *fsj, FAT_DRV *drv) { return (__FALSE); }
File_Config.c: 6 warnings, 20 errors
compiling Retarget.c...
Retarget.c(83): warning: #223-D: function "__sys_open" declared implicitly
return (__sys_open (name, openmode));
Retarget.c(92): warning: #223-D: function "__sys_close" declared implicitly
return (__sys_close (fh));
Retarget.c(110): warning: #223-D: function "__sys_write" declared implicitly
return (__sys_write (fh, buf, len));
Retarget.c(128): warning: #223-D: function "__sys_read" declared implicitly
return (__sys_read (fh, buf, len));
Retarget.c(146): warning: #223-D: function "__sys_seek" declared implicitly
return (__sys_seek (fh, pos));
Retarget.c(155): warning: #223-D: function "__sys_ensure" declared implicitly
return (__sys_ensure (fh));
Retarget.c(164): warning: #223-D: function "__sys_flen" declared implicitly
return (__sys_flen (fh));
Retarget.c: 7 warnings, 0 errors
compiling Serial.c...
compiling SD_File.c...
SD_File.c(36): error: #140: too many arguments in function call
res = finit(NULL);
SD_File.c(27): warning: #177-D: variable "str" was declared but never referenced
char str[] = "kavirelectronic.ir\n\r"
SD_File.c: 1 warning, 1 error
compiling SPI_LPC17xx.c...
SPI_LPC17xx.c(35): error: #20: identifier "SPI_DRV" is undefined
SPI_DRV __DRV_ID = {
SPI_LPC17xx.c(193): error: #20: identifier "M_INSERTED" is undefined
stat |= M_INSERTED;
SPI_LPC17xx.c: 0 warnings, 2 errors
".\Obj\SD_File.axf" - 23 Error(s), 14 Warning(s).[/QUOTE
این توضیح رو هم بدم از اول تا آخر این تاپیک رو خوندم و مشکل بعضی از دوستان با ورژن کیل رو ندارم چون من آخرید ورژن رو از سایت کیل گرفتم 4.74.0.22 بعد هم کتابخونه RL رو نصب کردم (البته بعدا فهمیدم نیازی نبوده جدا نصب کنم چون ورژن جدید کتابخونه RL رو با خودش داره) و هر دو رو به درستی کرک کردم و تا سال 2020 کرک شدن. حالا من موندم مشکل کجاست.
در ضمن مسیر نصب کیل هم درسته یعنی تو درایو C هست ( به خاطر دسترسی به کتابخونه ها گفتم)
لطفاً کمک کنید