build error in GenericTypeDefs.h

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

build error in GenericTypeDefs.h

Postby resodad » Wed Aug 17, 2011 6:36 pm

Hi Lubin,
Is this a bug?
the attached model generates this error when generating code:

Code: Select all

..\../GenericTypeDefs.h:64:22: error: expected identifier before '(' token


and the offending line of GenericTypeDefs.h is:

Code: Select all

typedef enum _BOOL { FALSE = 0, TRUE } BOOL;    /* Undefined size */

which looks OK.

I am using C32 V2.00 compiler

John
Attachments
Matlab output from build.txt
This is the output at the Matlab command window
(5.81 KiB) Downloaded 181 times
Matlab warnings upon opening model.txt
These messages appear when I first open the model
(9.71 KiB) Downloaded 181 times
SD_Datalogger.mdl
(55.71 KiB) Downloaded 275 times

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Marseille - France
Contact:

Re: build error in GenericTypeDefs.h

Postby LubinKerhuel » Wed Aug 17, 2011 9:03 pm

Hi John,

The problem appears for 24fj chips : see forum post here
It has been corrected for 24Fj chips : the dsPIC blockset now generate its own GenericTypeDefs.h file.
I will do the same correction for 32f Chips.

The workaround is just to modify the file GenericTypeDefs.h like :

Code: Select all

 // typedef enum _BOOL { FALSE = 0, TRUE } BOOL;    /* Undefined size */
 typedef enum _BIT { CLEAR = 0, SET } BIT;

It should fix the problem.

Lubin

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: build error in GenericTypeDefs.h

Postby resodad » Thu Aug 18, 2011 12:48 pm

Thanks Lubin, I already tried that; now the error is "chased" to a new line of a different header file that depends on BOOL:

Code: Select all

In file included from ..\../CustomSD.c:8:0:
..\../FSIO.h:272:5: error: expected specifier-qualifier-list before 'BOOL'
gmake: *** [CustomSD.o] Error 1
### Real-Time Workshop build procedure for model: 'SD_Datalogger' aborted due to an error.

John

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Marseille - France
Contact:

Re: build error in GenericTypeDefs.h

Postby LubinKerhuel » Thu Aug 18, 2011 2:19 pm

I did not use code where the BOOL type were required.
Thus I have no solution for that. There might be more usefull information on Microchip forum for this.

Anyway, I would be glad to get the final word. It is weird that this BOOL enumeration does not work.

Lubin

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: build error in GenericTypeDefs.h

Postby resodad » Thu Aug 18, 2011 6:01 pm

Lubin, Microchip tech support looked into it but could not find the problem. John

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: build error in GenericTypeDefs.h

Postby resodad » Thu Aug 18, 2011 6:49 pm

Lubin, maybe this is a clue? I tried replacing

Code: Select all

typedef enum _BOOL { FALSE = 0, TRUE } BOOL;    /* Undefined size */

with

Code: Select all

typedef enum _BOOL { NO_FALSE = 0, YES_TRUE } BOOL;

and the result was:

Code: Select all

sources/SD_Datalogger.c: In function 'SD_Datalogger_initialize':
sources/SD_Datalogger.c:195:19: error: 'T1_INT_PRIOR_0' undeclared (first use in this function)

etc. I t looks like it got past the GenericTypeDefs and FSIO headers. Was it getting stuck on key words FALSE and TRUE?
Now it's not finding the timer configuration variables...
John

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: build error in GenericTypeDefs.h

Postby resodad » Fri Aug 19, 2011 12:59 pm

Lubin,
Are my files being executed out of order?

see this post on a microchip forum where there was a duplicate #define FALSE:
http://www.microchip.com/forums/m522926.aspx
John

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Marseille - France
Contact:

Re: build error in GenericTypeDefs.h

Postby LubinKerhuel » Fri Aug 19, 2011 1:45 pm

Hi John,

The best might be to modify the generated code within MPLAB X until it's working. Thus trying the microchip forum's solution with MPLAB and the generated code. Then finding a trick to make it works from simulink straight.
It's difficult to help you more on this.
However, could you post the c source code for the SD : CustomSD.c etc... I guess this is microchip's template ?

Lubin

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: build error in GenericTypeDefs.h

Postby resodad » Fri Aug 19, 2011 5:47 pm

Lubin, No, there is no solution on microchip forum for this. The post I referred to had duplicate definitions, and that is not my case.
CustomSD.c is written by my colleague here to manage file init/open/close/write commands:

Code: Select all

#include <p32xxxx.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "FSconfig.h"
#include "HardwareProfile.h"
#include "GenericTypeDefs.h"
#include "FSIO.h"

#define NumRetries 10

FSFILE * filePtr;


unsigned char FS_init_loop(void){
    unsigned char i;
    for (i=0; i < NumRetries; i++){
    if(FSfinit()==0)  return 1;
    return 0;   
    }
}

unsigned char FSopen(char *u1){
    filePtr = FSfopen( u1,FS_WRITE);
    if (filePtr != NULL) {
        return 1;
    }
    else return 0; 
}

void FSclose(void){
    FSfclose(filePtr);
}

unsigned char FSprint(unsigned int u1){
    char y1;
    y1 = FSfprintf(filePtr, "AN0= %u%c%c", u1, 0x0D, 0x0A);
    if (y1 > 0){
        return 1;
    }
    else return 0;
}

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: build error in GenericTypeDefs.h

Postby resodad » Tue Oct 11, 2011 3:57 pm

Lubin and all:
I have found a clue about this problem. please note:
1. attachment SD_Datalogger2.mdl contains NO CUSTOM CODE.
There is no build error when the MATLAB working folder is set correctly to the same location when the .mdl file is saved.
HOWEVER, the same file produces the GenericTypeDefs error if the MATLAB working folder is set one folder above.

2. attachment SD_Datalogger3.mdl does contain CUSTOM CODE. That is the only difference. Custom code is incorporated via >Simulation>Configuration Parameters>Code Generation>Custom Code> Include Directories and ...>Source Files.
This file produces the GenericTypeDefs error even if the MATLAB working folder is set correctly.
Please see if you can duplicate this.

I suspect the paths of the included files are the source of the trouble.
John
Attachments
CustomSD.c
this is the custom c code file to be included
(779 Bytes) Downloaded 175 times
SD_Datalogger3.mdl
(29.06 KiB) Downloaded 186 times
SD_Datalogger2.mdl
(28.46 KiB) Downloaded 183 times

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: build error in GenericTypeDefs.h

Postby resodad » Tue Nov 22, 2011 3:49 pm

Hi Lubin and all,
I am still very stuck on this problem. Please confirm that you can duplicate the problem (#2 above).
the error is:
"
...GenericTypeDefs.h:65:22: error: expected identifier before '(' token
"
But there is nothing wrong with the code in this file. It is Microchip sourced and proven.

Do I have all the source files and header files in the right locations?
Am I missing a file?
Do I have a duplicate definition?

I have tried different arrangements of included source code and include directories.

I have tried this using several versions of Microchip compilers and MPLAB and different versions of Matlab.
Currently I am using
MATLAB R2011a
MPLAB IDE v8.76
C32 compiler v2.01
and
Embedded Coder for dsPIC V3.7(08-Oct-2011)

I am attaching everything.

Can you please help?
John
Attachments
myFolder.zip
(419.57 KiB) Downloaded 202 times

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: build error in GenericTypeDefs.h

Postby resodad » Thu Jan 05, 2012 8:57 pm

Microchip Tech Support says:
"
I think the issue is that you are including the GenericTypeDefs after rtwtypes.h, and there the FALSE and TRUE are defined.\
So FALSE is replaced with (0U), so the parsing fails.
You should try to include the timer.h before the rest of your own files.
"

I tried following this suggestion, but I'm not sure I'm doing it right. All my attempts resulted in errors.

I moved the c file names to:
Simulation > Configuration Parameters > Simulation Target > Custom Code > Source File (under Include Custom c code in generated:)
and moved the include directories to this page as well, and the simple model (turn on LED) compiled without error, but a more complicated model (data log to SD card) had the same GenericTypeDefs.h error.

John

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Marseille - France
Contact:

Re: build error in GenericTypeDefs.h

Postby LubinKerhuel » Tue Jan 17, 2012 12:02 pm

Hello John,

I could not spend too much time on this specific problem.
Interfacing with other driver might be difficult.
However, here is my finding:

You copied two files :
GenericTypeDefs.h
timer.h
in the Include folder that you include that are already included within the compiling process. Including theses files creates an error. (Are theses the correct ones ? )

I still get an error, but I think compiling process goes slightly better :

Code: Select all

### Writing main
--- Multi Rate & Single Tasking implementation
.
### Writing header file SD_Datalogger5.h
.
### Writing header file SD_Datalogger5_types.h
### Writing header file rtwtypes.h
.
### Writing source file SD_Datalogger5.c
### Writing header file SD_Datalogger5_private.h
.
### Writing source file SD_Datalogger5_data.c
### Writing header file autobuild.h
.
### Writing source file SD_Datalogger5_main.c
### TLC code generation complete.
### Creating HTML report file SD_Datalogger5_codegen_rpt.html
### Evaluating PostCodeGenCommand specified in the model

     ----------------------------------------------------
     ----------------------------------------------------
Embedded Coder for dsPIC V&&Version&&(&&  Date       &&) for Matlab && Release &&.


Licence Accorded to  &&               Licence Name          &&
                     &&               Mailcontact           &&
                     &&               Companie              &&
                     &&               CompanieAddress1      &&
                     &&               CompanieAddress2      &&
                     &&               CompanieAddress3      &&
                     &&               CompanieAddress4      &&

 Facturation to :    &&               BuyerName             &&
                     &&               MailBuyer             &&
                     &&               BuyerAddress1         &&
                     &&               BuyerAddress2         &&
                     &&               BuyerAddress3         &&
                     &&               BuyerAddress4         &&

     ----------------------------------------------------
Check updates and new informations at :  www.kerhuel.eu
     ----------------------------------------------------

.
### Processing Template Makefile: C:\M91449\Perso\RTWdsPIC\dspic\pic32_gcc.tmf
-- Bypassing matlab internal LCC configuration --
### Creating SD_Datalogger5.mk from C:\M91449\Perso\RTWdsPIC\dspic\pic32_gcc.tmf
### Building SD_Datalogger5: "C:\PROGRA~1\MATLAB\R2011A~1\bin\win64\gmake" -f SD_Datalogger5.mk  GENERATE_REPORT=1 MULTI_INSTANCE_CODE=0 PORTABLE_WORDSIZES=0 GENERATE_ASAP2=0 TMW_EXTMODE_TESTING=0
''pic32-gcc  -c -mprocessor=32MX460F512L -O3 -fschedule-insns -fschedule-insns2    -O   -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2011A~1/simulink/include -IC:\PROGRA~1\MATLAB\R2011A~1/extern/include -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src/ext_mode/common -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\SD_Datalogger5_dspic\sources -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\Microchip\Include -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\MDDFIL~1 -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\Include\MDDFIL~1   -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include\PERIPH~1    ..\../CustomSD.c
..\../CustomSD.c:1:0: warning: Compiler option (forward propagate) ignored due to lite-mode limitations
''pic32-gcc  -c -mprocessor=32MX460F512L -O3 -fschedule-insns -fschedule-insns2    -O   -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2011A~1/simulink/include -IC:\PROGRA~1\MATLAB\R2011A~1/extern/include -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src/ext_mode/common -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\SD_Datalogger5_dspic\sources -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\Microchip\Include -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\MDDFIL~1 -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\Include\MDDFIL~1   -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include\PERIPH~1    C:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\MDDFIL~1/FSIO.c
C:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\MDDFIL~1/FSIO.c:1:0: warning: Compiler option (forward propagate) ignored due to lite-mode limitations
''pic32-gcc  -c -mprocessor=32MX460F512L -O3 -fschedule-insns -fschedule-insns2    -O   -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2011A~1/simulink/include -IC:\PROGRA~1\MATLAB\R2011A~1/extern/include -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src/ext_mode/common -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\SD_Datalogger5_dspic\sources -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\Microchip\Include -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\MDDFIL~1 -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\Include\MDDFIL~1   -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include\PERIPH~1    C:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\MDDFIL~1/SD-SPI.c
C:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\MDDFIL~1/SD-SPI.c:1:0: warning: Compiler option (forward propagate) ignored due to lite-mode limitations
''pic32-gcc  -c -mprocessor=32MX460F512L -O3 -fschedule-insns -fschedule-insns2    -O   -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2011A~1/simulink/include -IC:\PROGRA~1\MATLAB\R2011A~1/extern/include -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src/ext_mode/common -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\SD_Datalogger5_dspic\sources -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\Microchip\Include -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\MDDFIL~1 -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\Include\MDDFIL~1   -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include\PERIPH~1    SD_Datalogger5_data.c
SD_Datalogger5_data.c:1:0: warning: Compiler option (forward propagate) ignored due to lite-mode limitations
''pic32-gcc  -c -mprocessor=32MX460F512L -O3 -fschedule-insns -fschedule-insns2    -O   -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2011A~1/simulink/include -IC:\PROGRA~1\MATLAB\R2011A~1/extern/include -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src/ext_mode/common -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\SD_Datalogger5_dspic\sources -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\Microchip\Include -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\MDDFIL~1 -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\Include\MDDFIL~1   -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include\PERIPH~1    SD_Datalogger5_main.c
SD_Datalogger5_main.c:1:0: warning: Compiler option (forward propagate) ignored due to lite-mode limitations
''pic32-gcc  -c -mprocessor=32MX460F512L -O3 -fschedule-insns -fschedule-insns2    -O   -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2011A~1/simulink/include -IC:\PROGRA~1\MATLAB\R2011A~1/extern/include -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2011A~1/rtw/c/src/ext_mode/common -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\SD_Datalogger5_dspic\sources -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\Microchip\Include -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\MDDFIL~1 -IC:\M91449\Perso\RTWdsPIC\Developpements\Forum\resodad_john\myFolder\SDtroubleshooting\..\MICROC~1\Include\MDDFIL~1   -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include -IC:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\include\PERIPH~1    SD_Datalogger5.c
SD_Datalogger5.c:1:0: warning: Compiler option (forward propagate) ignored due to lite-mode limitations
" ================================================================"
"*** Embedded Target for dsPIC by Lubin KERHUEL - http://www.kerhuel.eu"
" | Licence Accorded to &&               Licence Name          &&|"
" |                     &&               Mailcontact           &&|"        
" |          Companie : &&               Companie              &&|" 
" |                     &&               CompanieAddress1      &&|"
" |                     &&               CompanieAddress2      &&|"       
" |                     &&               CompanieAddress3      &&|"
" |                     &&               CompanieAddress4      &&|"             
" | Financial Service : &&               BuyerName             &&|"
" | Contact             &&               MailBuyer             &&|"
" |                     &&               BuyerAddress1         &&|"
" |                     &&               BuyerAddress2         &&|"
" |                     &&               BuyerAddress3         &&|"
" |                     &&               BuyerAddress4         &&|"
" | Version &&Version&&                       &&  Date       &&  |"
" | For Matlab && VerMatlab && && Release &&                     |"
" ================================================================"       
''pic32-gcc   -t --report-mem -cref  -mprocessor=32MX460F512L -o ..\../SD_Datalogger5.elf  CustomSD.o FSIO.o SD-SPI.o SD_Datalogger5_data.o SD_Datalogger5_main.o SD_Datalogger5.o      C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libmchp_peripheral_32MX460F512L.a C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libm.a C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libm.a
c:/program files (x86)/microchip/mplabc32/v2.01/bin/../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/bin/ld.exe: mode elf32pic32mx
c:/program files (x86)/microchip/mplabc32/v2.01/bin/../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/lib/crt0.o
CustomSD.o
FSIO.o
SD-SPI.o
SD_Datalogger5_data.o
SD_Datalogger5_main.o
SD_Datalogger5.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)memset.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)strcpy.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)strlen.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)general-exception.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)ctype.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)ctypef.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)strncpy.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)default-general-exception-handler.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)default-bootstrap-exception-handler.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)default-on-reset.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)default-on-bootstrap.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libc.a)default-nmi-handler.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libmchp_peripheral_32MX460F512L.a)int_enable_mv_int_lib.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libmchp_peripheral_32MX460F512L.a)spi_getc_spi2_lib_legacy.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libmchp_peripheral_32MX460F512L.a)spi_open_spi2_lib_legacy.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libmchp_peripheral_32MX460F512L.a)spi_brg_tbl_lib_legacy.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libmchp_peripheral_32MX460F512L.a)int_enable_interrupts_lib.o
(C:\PROGRA~2\MICROC~1\mplabc32\v2.01\pic32mx\lib\speed\libm.a)fp32.o
(c:/program files (x86)/microchip/mplabc32/v2.01/bin/../lib/gcc/pic32mx/4.5.1\libgcc.a)_udivdi3.o
(c:/program files (x86)/microchip/mplabc32/v2.01/bin/../lib/gcc/pic32mx/4.5.1\libgcc.a)_umoddi3.o
processor.o (c:/program files (x86)/microchip/mplabc32/v2.01/bin/../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/lib/./proc/32MX460F512L\processor.oCustomSD.o: In function `FS_init_loop':
CustomSD.c:(.text+0x8): undefined reference to `FSfinit'
c:/program files (x86)/microchip/mplabc32/v2.01/bin/../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/bin/ld.exe: link errors found, deleting executable `..\../SD_Datalogger5.elf)
'
collect2: ld returned 1 exit status
gmake: *** [..\../SD_Datalogger5.elf] Error 1
### Build procedure for model: 'SD_Datalogger5' aborted due to an error.
>>

Zip file with few changes is attached.

Lubin
Attachments
myFolder.zip
(696.65 KiB) Downloaded 207 times

philippe.1
Posts: 3
Joined: Sun Nov 20, 2011 9:00 am

Re: build error in GenericTypeDefs.h

Postby philippe.1 » Fri Jan 27, 2012 8:36 pm

Hello,

I don't know if this can help but I had a quick view on the code and I haven't been able to find the FSfinit function in the Microchip application note AN1045 (http://ww1.microchip.com/downloads/en/A ... 01045b.pdf) but I guess this function initialize the card so maybe you should try to replace in teh CustomSD c file at line 18 the FSfinit by FSInit. In my case the code is compiling in both Simulink and in MPlab.

Regards.

Philippe


Return to “bug reports”

Who is online

Users browsing this forum: No registered users and 1 guest