TODOPIC
Microcontroladores PIC => Lenguaje C para microcontroladores PIC => Mensaje iniciado por: wATAw en 10 de Febrero de 2008, 20:35:00
-
Hola a todos,
A ver si me podeis echar una mano los que hayais usado esta libreria. Hablando mal y pronto....como coño habeis compilado la libreria???jaja!! es que intento compilarla y me da 100 errores....y al ser una libreria que viene con el compilador tiene que estar bien, asi que tengo que estar haciendo algo mal... me da muchos errores en la estructura que utiliza en los returns...sera la version del compilador??o puede que no este bien instalado??se me escapa alguna referencia a algun archivo??soy nuevo asi que todo puede ser...ejeje
los errores son del tipo---> Expecting a declaration
Expecting a (
y todos son al crear la estructura MMC_EC y o al referenciarla...
enum MMC_EC {
MMC_EC_OK = 0,
MMC_EC_NOT_IDLE = 1, //after reset command, device wasn't in idle state
MMC_EC_NOT_INIT = 2, //after init command, device had an error
MMC_EC_NO_CRC = 3, //CRC wouldn't turn off
...
...
...
};
que opinais??
-
Hola fijate si podés subir la librería que usas
y decir qué compilador y versión del mismo usás
y además el programa desde el que llamas a la librería, es decir tu programita.
Salu2 para la gente se Gabon :?
-
la libreria es la que he adjuntado. Y el programa principal lo pego porque no hace nada, solo quería compilarlo todo para hacer pruebas.
#include <16f876.h>
#define MMC_CLK PIN_C3//PIN_B1
#define MMC_DI PIN_C5//PIN_B0
#define MMC_DO PIN_C4//PIN_B3
#define MMC_CS PIN_C2//PIN_B2
#include "mmc_spi.c"
void main(void)
{
}
Uso el Mplab ide v8.0 con el compilador Css 4.057.
A ver que opinais, espero que podais ayudarme!!
GRACIAS!!
-
Tan sólo por preguntar...¿has copiado la librería en el directorío raiz donde estas realizando el proyecto?.
Un saludete.
-
si si, si que la tengo copiada....pero no se por que coño peta.... :( :(
Alguien puede probar si le compila lo que he subido??
-
los errores son del tipo---> Expecting a declaration
Expecting a (
y todos son al crear la estructura MMC_EC y o al referenciarla...
enum MMC_EC {
MMC_EC_OK = 0,
MMC_EC_NOT_IDLE = 1, //after reset command, device wasn't in idle state
MMC_EC_NOT_INIT = 2, //after init command, device had an error
MMC_EC_NO_CRC = 3, //CRC wouldn't turn off
...
...
...
};
No es una estructura, si no una enumeración. ¿Estas intentando crear una estructura? Si es así es lógico que te de errores.
Un saludo
-
Ups perdon, pues enumeracion. No sabia como se llamaba ya que no lo he usado nunca. El caso es que ese codigo es el de la libreria que viene con el compilador asiq esta bien seguro(es el archivo que he adjuntado), pero al compilarlo con el main que he puesto (el main no hace nada), me aparecen los errores que he mencionado entorno a esa enumeracion(100 errores en total).
Gracias!
-
¿Podrías poner un código de ejemplo para compilar y reproducir el error?
Un saludo
-
el codigo de ejemplo es el del 3cer mensaje, y la librería la que he adjuntado en el 3cer mensaje tambien.
Lo suyo sería intentar compilar el codigo de ese mensaje con la libreria que he adjuntado en el mensaje....
A ver si os compila a vosotros!! :( :(
-
Bueno, lo he compilado con una versión más antigua y para empezar fijate que en la librería que posteas aparece una declaración de device 16f877a que se contradice con la de tu programa #include <16f876.h> y ese es el primer error que aparece.
Despues tenés que configurar los retardos con: #use delay(clock=4000000) por ejemplo
Haciendo eso, me da un último error.
El error es: Subscript out of range en la declaración
int8 mmc_buffer[MMC_BLOCK_SIZE];
lo que hice fue cambiar donde dice
#define MMC_BLOCK_SIZE 512
y poner
#define MMC_BLOCK_SIZE 128
y así lo compiló bien, pero no sé como funciona la librería ya que nunca la he usado y no sé que cambia si se modifica esta variable o constante. Eso tendrás que verlo tú o encontrar alguien que sepa sobre la librería en cuestión.
Saludos
-
mmm si al ver que no me compilaba empece a toquetear con diferentes devices y dejaria rastros.....pero aun asi corrigiendo los errores que me comentas, me siguen dando los errores...(nada menos que 100) Pero todos estan relacionados con el enum de la libreria......A lo mejor sera por la version de compilador....probare a conseguir otra version para ver si me sigue dando el problema...
Menta te importa subir adjunto el proyecto segun te compila??para ver si a mi me compila y asi ver si se trata del compilador??Muchas gracias
-
Hola Acá te lo paso, esto en la versión 3.235 Compila bien, no sé si hace lo que debe hacer, pero compila.
los únicos cambios q le hice a la librería que vos subiste fueron en
línea 67: comente la declaración #device 16f877a
línea 113: cambié el 512 por 128, este debe ser un problema de falta de memoria ram del pic, supongo!
Saludos
-
mmmm pues va a ser del mplab....Porque acabo de compilar tu codigo con el mplab(creando un proyecto y agregando los ficheros) y me da problemas....y en cambio compilandolo directamente en el editor del compilador no me da errores......Muchas gracias!!!!jeje!! tendre que trabajar con el compilador directamente....
Muchas gracias por todo Menta, y ya os ire comentando si me va bien!! :mrgreen:
-
Muchas gracias!!!!jeje!! tendre que trabajar con el compilador directamente....
Muchas gracias por todo Menta, y ya os ire comentando si me va bien!! :mrgreen:
Por nada, traté de ayudar lo poco que pude.
Espero que tengas éxito en tu proyecto.
Saludos
-
creia que lo habia solucionado pero no hay manera.....ademas el problema viene compilando cualquier libreria relacionada con las mmc. Intento compilar tanto la que trae el ccs, como 2 mas que he encontrado que escriben en fat16/32 (y de todas me salen 100 errores). Asi que a lo mejor es algun include o algo que me olvido.....alguien sabe que puede ser??
Clean: Deleting intermediary and output files.
Clean: Deleted file "EX_MyFat32.ESYM".
Clean Warning: File "D:\ANDER\Proiektua\Proiektua\Kodea\fat\EX_MyFat32.o" doesn't exist.
Clean: Deleted file "EX_MyFat32.ERR".
Clean: Done.
Executing: "C:\Archivos de programa\PICC\Ccsc.exe" +FH "EX_MyFat32.c" +EXPORT +DF +LN +T +A +M +Z +Y=9 +EA
*** Error 28 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 28(11,12): Expecting an identifier
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 28(16,17): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 28(17,18): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 28(18,19): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 28(19,20): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 28(20,21): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 36(1,2): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 36(3,6): Expecting a (
*** Error 34 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 40(4,7): Unknown type
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 40(11,19): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 48(1,2): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.h" Line 48(3,7): Expecting a (
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 6(6,10): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 6(12,13): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 6(21,22): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 6(21,22): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 6(22,23): Expecting a declaration
*** Error 12 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 143(14,26): Undefined identifier CardInserted
*** Error 12 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 195(14,26): Undefined identifier CardInserted
*** Error 66 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 260(55,56): Previous identifier must be a pointer
*** Error 66 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 261(24,25): Previous identifier must be a pointer
*** Error 66 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 262(39,40): Previous identifier must be a pointer
*** Error 66 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 263(39,40): Previous identifier must be a pointer
*** Error 66 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 264(40,41): Previous identifier must be a pointer
*** Error 66 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 265(58,59): Previous identifier must be a pointer
*** Error 66 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 267(37,38): Previous identifier must be a pointer
*** Error 66 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 273(14,15): Previous identifier must be a pointer
*** Error 32 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 354(26,29): Expecting a , or )
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 354(27,32): Expecting a (
*** Error 36 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 355(1,2): Expecting a ; or ,
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 358(6,7): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 358(8,9): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 358(9,10): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 359(4,8): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 359(9,10): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 359(10,11): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 359(12,13): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 359(14,15): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 359(15,16): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 360(4,7): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 360(8,9): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 360(9,10): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 360(11,12): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 360(12,13): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 360(13,14): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 360(15,16): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 360(16,17): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 360(17,18): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 360(20,21): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 360(22,23): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 361(9,10): Expecting a (
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 361(11,16): Expecting a (
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 361(18,23): Expecting a (
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 361(24,25): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 361(26,27): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 362(7,9): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 362(10,11): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 362(13,14): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 362(16,19): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 362(19,20): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 362(21,26): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 362(26,27): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 363(7,11): Expecting a (
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 363(12,13): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 363(15,16): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 363(17,18): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 363(19,20): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 364(4,5): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 365(4,7): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 365(8,9): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 365(9,10): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 365(11,12): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 365(12,13): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 365(13,14): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 365(15,16): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 365(16,17): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 365(17,18): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 365(20,21): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 365(22,23): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 366(9,10): Expecting a (
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 366(11,16): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 366(18,19): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 366(19,23): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 366(24,25): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 366(25,26): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 366(27,28): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 367(7,9): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 367(10,11): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 367(13,14): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 367(16,19): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 367(20,22): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 367(25,26): Expecting a (
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 367(28,29): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 367(29,30): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 367(31,36): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 367(36,37): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 368(7,9): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 368(10,11): Expecting a declaration
*** Error 43 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 368(11,12): Expecting a declaration
*** Error 48 "D:\ANDER\Proiektua\Proiektua\Kodea\fat\MyMMCFat32.c" Line 368(12,13): Expecting a (
D:\ANDER\Proiektua\Proiektua\Kodea\fat\EX_MyFat32.o ===> 100 Errors, 0 Warnings.
Halting build on first failure as requested.
BUILD FAILED: Thu Feb 14 17:28:51 2008
estos son los errores.... :( :(
-
Falta declarar variables en tiempo de compilación (variables del preprocesador). Necesitaríamos conocer el contenido del fichero MyMMCFat32.h para ver cual es su contenido.
Un saludo
-
Muchas gracias por responder!!! Te pongo el contenido del .h para ver si sabes decirme de que se trata. Soy novatillo y es la primera vez que intento usar librerias "complejas" de estas....jajaja!
#define MAXFILES 2
typedef struct _diskinforec
{
char hJumpCode[3];
char OEMName[8];
int16 hBytesPerSector;
char bSectorsPerCluster;
int16 Reserved1;
char FATCopies;
int16 hMaxRootEntries;
int16 hSectors;
char Descriptor;
int16 holdSectorsPerFat;
int16 hSectorsPerTrack;
int16 hNumberofHeads;
int32 hNumberofHidden;
int32 hNumberofSectors;
int32 hSectorsPerFat;
int16 hFlags;
int16 hFAT32Version;
int32 hRootStartCluster;
} diskinforec;
typedef struct _direntry
{
char sName[8];
char [spam][3];
char bAttr;
char bReserved[8];
int16 hClusterH;
int16 hTime;
int16 hDate;
int16 hCluster;
int32 wSize;
} DIR;
typedef struct {
char IOpuffer[512];
DIR DirEntry;
int32 CurrentCluster;
int16 posinsector;
int32 position;
int32 dirSector;
int16 dirIdx;
char mode;
char Free;
} FILE;
typedef struct {
int32 MMCAddress;
int32 FATstartidx;
int32 gStartSector;
int32 gFirstDataSector;
int16 gDirEntryIdx;
int32 gDirEntrySector;
int16 gFirstEmptyDirEntry;
int32 gFirstDirEntryCluster;
} FAT32Vars;
char MMCInit();
void ReadSector(int32 sector, char *hova);
void WriteSector(int32 sector, char *honnan);
void InitFAT();
char FindDirEntry(char *fname, char f);
char fopen(char *fname, char mode);
void fclose(char f);
void fflush(char f);
char cwd(char *fname, char f);
void fputch(char be, char f);
char fgetch(char *ki, char f);
void fputstring(char *be, char f); // fputs is reserved in CCS C
int16 fread(char *buffer, int16 leng, char f);
void fwrite(char *buffer, int16 leng, char f);
char remove(char *fname);
char getfsize(char *fname, int32 *fsiz);
-
La librería parece que está bien. Puede ser que estés trabajando con un camino de búsqueda de directorios muy largo o que no trabaje correctamente desde una unidad distinta al hacer los includes (.c en la unidad C: y los .h en la unidad D:).
Puedes probar a tener en un único directorio todos los ficheros y con un camino de búsqueda corto como por ejemplo C:\TmpProyecto haber si con eso no te da los errores.
Un saludo
-
mmm Pues no es eso porq lo he copiado en la raiz y sigue iwal....de todas maneras muchas gracias por el interes.
-
la libreria es la que he adjuntado. Y el programa principal lo pego porque no hace nada, solo quería compilarlo todo para hacer pruebas.
#include <16f876.h>
#define MMC_CLK PIN_C3//PIN_B1
#define MMC_DI PIN_C5//PIN_B0
#define MMC_DO PIN_C4//PIN_B3
#define MMC_CS PIN_C2//PIN_B2
#include "mmc_spi.c"
void main(void)
{
}
Uso el Mplab ide v8.0 con el compilador Css 4.057.
A ver que opinais, espero que podais ayudarme!!
GRACIAS!!
Antes de declarar las variables tienes que incluir la libreria, quedaria asi
#include <16f876.h>
#use delay (clock=4Mhz
#include "mmc_spi.c"
#define MMC_CLK PIN_C3//PIN_B1
#define MMC_DI PIN_C5//PIN_B0
#define MMC_DO PIN_C4//PIN_B3
#define MMC_CS PIN_C2//PIN_B2
void main(void)
{
}
:) :) me avisas cualquier novedad
-
estoy desesperado...no consigo compilar ninguna de las librerias relacionadas con las sd..... :? :?
-
en pcwhd versión 4.065 en adelante existe otra llamada: mmcsd.c
"This is a low-level driver for MMC and SD cards"
busca esa y prueba si te funciona.
-
jejeej!!gracias! justo esta tarde he conseguido una version del compilador que trae esas librerias (ademas de la de FAT). Y he conseguido compilarlo.....tendre que hacer pruebas, montar la placa...
ya os informare!!!Gracias por todo!!!
-
hola amigo wATAw:
podrias contarme a mi y a todos donde encontraste esa nueva version del compilador...?
relacionado con tu antiguo problema, creo q era por ma memoria del pic, esa libreria funciona solo con algunos pic's de determinadas caracteristicas.
gracias.
tu amigo BUSI.
-
mmm no creo que pueda decirte donde he conseguido esa version del compilador...jeje, iria contra las normas del foro... :mrgreen: :mrgreen:
De todas maneras si las necesitas te puedo pasar las librerias, aunque todavia no las he probado. :P
-
Estimados:
Creo que este es un tema que podrian tratar por privado.
Agradeceremos no lo prolonguen aqui.
Muchas gracias. :mrgreen: