Welcome! Log In Create A New Profile

Advanced

Marlin configuration cardreader.cpp 25 error

Posted by duckfriedrice 
Marlin configuration cardreader.cpp 25 error
November 20, 2013 10:50AM
I was having fun tuning the traveling distance for my newly built Mendal Prusa i3

But didn't know since when, the Marlin configuration code was failing the compile

The error msg says:

cardreader.cpp:25: error: 'DIOSDPOWER_WPORT' was not declared in this scope
cardreader.cpp:25: error: 'DIOSDPOWER_PIN' was not declared in this scope
cardreader.cpp: In member function 'void CardReader::initsd()':
cardreader.cpp:145: error: 'SDSS' was not declared in this scope


The below line was highlighted for the error:

SET_OUTPUT(SDPOWER);

I have attached a screenshot and actual codes of the error page.

Marlini3V1.rar





Please can someone help me how to fix this error.

Also, I was failing to get the LCD2004 screen working,
I've tried the tutorial shown on the internet, i.e. uncommenting vaious page etc.

But still no luck with the LCD screen, its either blank or shown square blocks

Please help

Thanks so much in advance.

Edited 1 time(s). Last edit at 11/20/2013 10:51AM by duckfriedrice.
Re: Marlin configuration cardreader.cpp 25 error
November 20, 2013 12:34PM
Marlin does not have any configuration variables that begin with DIOSDPOWER. The variables in this case are simply prefixed with SDPOWER. I'm not sure where the DIO comes from.

What were you changing? Configuration.h? The problem has to have arisen from change that you made. Look over the area where you made changes and make sure you didn't either
1) comment something out,
2) IFDEF something out, or
3) forget to terminate a quoted string
Re: Marlin configuration cardreader.cpp 25 error
November 21, 2013 01:03AM
Thanks very much

I've tried to look up all tabs for anything like DIOSDPOWER, but I cannot find it.

What's causing this error message at the moment ?
Re: Marlin configuration cardreader.cpp 25 error
November 21, 2013 07:01PM
DIOSDPOWER comes from concat macros in fastio.h
#define _SET_OUTPUT(IO) do {DIO ##  IO ## _DDR |=  MASK(DIO ## IO ## _PIN); } while (0)
#define SET_OUTPUT(IO)  _SET_OUTPUT(IO)
#define _WRITE(IO, v)  do {  if (&(DIO ##  IO ## _RPORT) >= (uint8_t *)0x100) {_WRITE_C(IO, v); } else {_WRITE_NC(IO, v); }; } while (0)
#define WRITE(IO, v)  _WRITE(IO, v)

Likely cause of your error is that "SDPOWER" is undefined, then "SDPOWER" is replaced with 0 for purpose of evaluation of #if SDPOWER > -1 in:

#if SDPOWER > -1
    SET_OUTPUT(SDPOWER); 
    WRITE(SDPOWER,HIGH);
#endif //SDPOWER

and you end up with DIOSDPOWER instead of DIO48 which valid pin number. I don't know though why was this particular test chosen instead of
#ifdef SDPOWER
or
#if defined SDPOWER && SDPOWER > -1

Bottom line is that your configuration is broken, it defines "SDSUPPORT" which enables that particular code in cardreader.cpp, but fails to define "SDPOWER".
Re: Marlin configuration cardreader.cpp 25 error
November 22, 2013 02:50AM
thanks very much miso

So how can I ammend the configuration so that its running again.

thanks so much
Sorry, only registered users may post in this forum.

Click here to login