TODOPIC
Microcontroladores PIC => Primeros pasos - Iniciación a los microcontroladores => Mensaje iniciado por: SEBARUBIOLO en 25 de Enero de 2013, 10:02:47
-
Hola, estoy probando las librerias de suky de tarjetas SD y encuentro unos warning y un error que no se a que se debe, ni como solucionarlo.
Los warning son los siguientes:
WARNING: The procedural abstraction optimization will not be supported when the evaluation becomes feature limited.
C:\Users\Seba\MPLABXProjects\MINILOGGER.X\sdcard.c:73:Warning [2054] suspicious pointer conversion
C:\Users\Seba\MPLABXProjects\MINILOGGER.X\sdcard.c:73:Warning [2054] suspicious pointer conversion
C:\Users\Seba\MPLABXProjects\MINILOGGER.X\sdcard.c:74:Warning [2054] suspicious pointer conversion
C:\Users\Seba\MPLABXProjects\MINILOGGER.X\sdcard.c:74:Warning [2054] suspicious pointer conversion
C:\Users\Seba\MPLABXProjects\MINILOGGER.X\sdcard.c:74:Warning [2054] suspicious pointer conversion
C:\Users\Seba\MPLABXProjects\MINILOGGER.X\sdcard.c:75:Warning [2054] suspicious pointer conversion
C:\Users\Seba\MPLABXProjects\MINILOGGER.X\sdcard.c:75:Warning [2054] suspicious pointer conversion
Y el error es el siguiente
Error - could not find definition of symbol 'FAT_OpenAddFile' in file './build/default/production/sdcard.o'.
Errors : 1
make[2]: Leaving directory `C:/Users/Seba/MPLABXProjects/MINILOGGER.X'
make[1]: Leaving directory `C:/Users/Seba/MPLABXProjects/MINILOGGER.X'
make[2]: *** [dist/default/production/MINILOGGER.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
Por las dudas, el programa que hice es:
#include <p18f2550.h>
#include <delays.h>
#include <usart.h>
#include <stdio.h>
#include <string.h>
#include <FAT16.h>
#pragma config FOSC = HSPLL_HS
#pragma config FCMEN = OFF
#pragma config IESO = OFF
#pragma config PLLDIV = 5
#pragma config CPUDIV = OSC1_PLL2
#pragma config PWRT = ON
#pragma config BOR = OFF
#pragma config BORV = 0
#pragma config WDT = OFF
#pragma config WDTPS = 32768
#pragma config MCLRE=ON
#pragma config LPT1OSC = OFF
#pragma config PBADEN = OFF
#pragma config CCP2MX = OFF
#pragma config STVREN = OFF
#pragma config LVP = OFF
#pragma config XINST=OFF
#pragma config CP0 = OFF,CP1 = OFF,CP2 = OFF
#pragma config CPB = OFF,CPD = OFF
#pragma config WRT0 = OFF,WRT1 = OFF,WRT2 = OFF
#pragma config WRTB = OFF,WRTC = OFF,WRTD = OFF
#pragma config EBTR0 = OFF,EBTR1 = OFF,EBTR2 = OFF
#pragma config EBTRB = OFF
// Buffer para trabajar con string a escribir en memoria.. Puede ser de cualquier tamaño.
char Texto[512]="Texto Creado con PIC....Compilador C18 \r\n";
void main(void){
//char NombreCorto[13];
//char NombreLargo[50];
UINT16 UbicacionFolder=0;
BOOL Card_Work=FALSE;
BOOL err;
UINT16 k;
OpenUSART( USART_TX_INT_OFF &
USART_RX_INT_OFF &
USART_ASYNCH_MODE &
USART_EIGHT_BIT &
USART_CONT_RX &
USART_BRGH_LOW,
64 );
InitHard_SDCard();
while(1){
if((SD_DETEC==0)&&(Card_Work==FALSE)){
Delay10KTCYx(255);;
if(SD_DETEC==0){
Card_Work=TRUE;
if(SDCard_init()==0){
Nop();
}else{
SDCard_read_CID();
SDCard_read_CSD();
FAT_init();
/*strcpypgm2ram(&NombreCorto[0],"CARPET~2");
strcpypgm2ram(&NombreLargo[0],"Carpeta de Microchip2");
UbicacionFolder=FAT_CreateDirectory(&NombreLargo[0],&NombreCorto[0],DirectorioRaiz);
strcpypgm2ram(&NombreCorto[0],"ARCHIV~1.txt");
strcpypgm2ram(&NombreLargo[0],"Archivo de Microchip.txt");
FAT_CreateFile(&NombreLargo[0],&NombreCorto[0],UbicacionFolder,&Texto[0]);*/
UbicacionFolder = FAT_CreateDirectory("Carpeta con PIC (C18)","CARPET~3",DirectorioRaiz);
FAT_CreateFile("Archivo creado con PIC.txt","ARCHIV~1.TXT",UbicacionFolder,&Texto[0]);
FAT_OpenAddFile("ARCHIV~1.TXT",UbicacionFolder,&Texto[0]);
}
}
}
if((SD_DETEC==1)&&(Card_Work==TRUE)){
Card_Work=FALSE;
}
}
}
Si alguien me explica como tengo que ver estos errores y corregirlos se los agradecería.
-
Hola! Indica que no encuentra la funcion FAT_OpenAddFile :? En FAT16.c debería de estar, por las dudas verifica eso.
Saludos!
-
Hola Suky.
El archivo está, no se como se puede leer, pero está.
Si sirve de algo, cuando voy al vinculo de la declaracion esta me lleva a BOOL FAT_CreateFile(UINT8 *NameLong,UINT8 *NameShort,UINT16 NClusP,UINT8 *WriteString); que está en FAT16.h
Creo que eso está bien.
Tal vez me falte cargar algo que yo no se ó lo hago mal...