Welcome! Log In Create A New Profile

Advanced

SD init fail.....make me crazyangry smiley 2560 rev b.

Posted by zonalimitatore 
SD init fail.....make me crazyangry smiley 2560 rev b.
September 08, 2018 04:56PM
Hi at all.Sorry my English,but I think here it's the best place for my problem.

Surely it's my mistake.But on my A10 I can't have access to SD card.
With stock no problem,try with marlin 1.1.9 and the problem appear. Try with last 2.0 bugfix same.

The problem is. On screen detect SD "card inserted".But if I go in menu "no SD card"

I try several way,but nothing to do.(low level format,change SD,check the firm pin)
I switch back with stock firm and still not working
What the hell?
The "SD init fail" appear in repieter on startup menu.


What I say.why? Why also with the stock?

But maybe it's my mistake.
Since was the first time I upload a firm on print,I take it from thinkinverse.In the file there were 2 files .hex
One with bootloader,and other normal.
I flash with bootloader and have to recover my board with my Arduino Uno as ISP,cause I cannot detect print.(no access to LCD,no detect via USB )
All ok...load marlin,and the sd problem begin.

Can that fact have cause some issue with LCD/sd?

I hope someone understand and help me rework SD.Cause for me it's very very important print from SD,due pc-print distance.

Best regards

Edited 1 time(s). Last edit at 09/08/2018 08:46PM by zonalimitatore.
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 10, 2018 06:28PM
Guys...really?
No one can help me? sad smiley
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 10, 2018 07:26PM
Post a link to your Marlin configuration.h file will take a look to see!


Computer Programmer / Electronics Technician
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 10, 2018 07:42PM
Configuration.h this is from 1.1.9 marlin by thingiverse
Configuration.h this is from 2.0.x marlin by thingiverse redangel1984
Configuration.h this is from original a10 firmware

I cant go out this problem....original firm,still not working
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 10, 2018 07:56PM
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 10, 2018 07:59PM
Thank you.Tomorrow try this.
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 10, 2018 09:52PM
In A10 Configuration.h you are defining UltiPanel and Reprap Discount Smart Controller
#define ULTIPANEL //the UltiPanel as on Thingiverse
#define REPRAP_DISCOUNT_SMART_CONTROLLER

In 1.1.9 Configuration.h you are defining Ultra_LCD and Reprap Discount Smart Controller
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define ULTRA_LCD

I believe you need to select one or the other but not both. If you define both it does not know where the SD Card is located.


Computer Programmer / Electronics Technician
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 08:12AM
Quote
MMcLure
Try the fix described in https://github.com/MarlinFirmware/Marlin/issues/11788.

Ok.I try to mod the file but how can i build?
I mean,in arduino ide tell me a lot of errors
I try with ide 1.0.1 same
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 08:13AM
Quote
Roberts_Clif
In A10 Configuration.h you are defining UltiPanel and Reprap Discount Smart Controller
#define ULTIPANEL //the UltiPanel as on Thingiverse
#define REPRAP_DISCOUNT_SMART_CONTROLLER

In 1.1.9 Configuration.h you are defining Ultra_LCD and Reprap Discount Smart Controller
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define ULTRA_LCD

I believe you need to select one or the other but not both. If you define both it does not know where the SD Card is located.

Omg...but the a10 config.h it's the ufficial build
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 09:18AM
I Have also noted that when I installed Reprap's Discount Smart Controller LCD I had to include NEWPANEL for the rotary click encoder to operate correctly.


#define #define REPRAP_DISCOUNT_SMART_CONTROLLER
#define NEWPANEL //enable this if you have a click-encoder panel


and these helped me with the LCD

#define SPI_SPEED SPI_HALF_SPEED
#define SD_CHECK_AND_RETRY
#define ENCODER_PULSES_PER_STEP 4

Edited 2 time(s). Last edit at 09/11/2018 09:22AM by Roberts_Clif.


Computer Programmer / Electronics Technician
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 09:46AM
Ok.But how can i mod the parameters and reupload if i've so much error in arduino ide? :O
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 11:55AM
What errors are you receiving?


Computer Programmer / Electronics Technician
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 01:45PM
It's very long



Arduino:1.8.6 (Windows 10), Scheda:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from sketch\HAL.h:33:0,

                 from sketch\MarlinConfig.h:39,

                 from sketch\Marlin.h:35,

                 from sketch\Marlin_main.cpp:252:

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_DDR" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:87:42: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO)       SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)

                                          ^

sketch\fastio.h:105:35: note: in expansion of macro 'SET_OUTPUT'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                   ^

sketch\Marlin_main.cpp:908:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketch\Marlin_main.cpp:908:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:87:61: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO)       SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)

                                                             ^

sketch\fastio.h:105:35: note: in expansion of macro 'SET_OUTPUT'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                   ^

sketch\Marlin_main.cpp:908:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketch\Marlin_main.cpp:908:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

In file included from sketch\HAL.h:33:0,

                 from sketch\MarlinConfig.h:39,

                 from sketch\Marlin.h:35,

                 from sketch\Marlin_main.cpp:252:

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_RPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:82:48: note: in definition of macro '_WRITE'

 #define _WRITE(IO,V)          do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)

                                                ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:908:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketch\Marlin_main.cpp:908:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:72:21: note: in definition of macro '_WRITE_NC'

   if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

                     ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:908:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketch\Marlin_main.cpp:908:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:72:42: note: in definition of macro '_WRITE_NC'

   if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

                                          ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:908:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketch\Marlin_main.cpp:908:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:73:21: note: in definition of macro '_WRITE_NC'

   else   CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

                     ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:908:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketch\Marlin_main.cpp:908:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:73:42: note: in definition of macro '_WRITE_NC'

   else   CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

                                          ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:908:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketch\Marlin_main.cpp:908:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:77:30: note: in definition of macro '_WRITE_C'

   uint8_t port_bits = DIO ## IO ## _WPORT;                  /* Get a mask from the current port bits */ \

                              ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:908:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketch\Marlin_main.cpp:908:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_RPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:79:10: note: in definition of macro '_WRITE_C'

   DIO ## IO ## _RPORT = port_bits & _BV(DIO ## IO ## _PIN); /* Atomically toggle the output port bits */ \

          ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:908:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketch\Marlin_main.cpp:908:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:79:48: note: in definition of macro '_WRITE_C'

   DIO ## IO ## _RPORT = port_bits & _BV(DIO ## IO ## _PIN); /* Atomically toggle the output port bits */ \

                                                ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:908:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, HIGH);

     ^

sketch\Marlin_main.cpp:908:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, HIGH);

               ^

In file included from sketch\HAL.h:33:0,

                 from sketch\MarlinConfig.h:39,

                 from sketch\Marlin.h:35,

                 from sketch\Marlin_main.cpp:252:

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_DDR" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:87:42: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO)       SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)

                                          ^

sketch\fastio.h:105:35: note: in expansion of macro 'SET_OUTPUT'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                   ^

sketch\Marlin_main.cpp:921:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketch\Marlin_main.cpp:921:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:87:61: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO)       SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)

                                                             ^

sketch\fastio.h:105:35: note: in expansion of macro 'SET_OUTPUT'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                   ^

sketch\Marlin_main.cpp:921:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketch\Marlin_main.cpp:921:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

In file included from sketch\HAL.h:33:0,

                 from sketch\MarlinConfig.h:39,

                 from sketch\Marlin.h:35,

                 from sketch\Marlin_main.cpp:252:

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_RPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:82:48: note: in definition of macro '_WRITE'

 #define _WRITE(IO,V)          do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)

                                                ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:921:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketch\Marlin_main.cpp:921:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:72:21: note: in definition of macro '_WRITE_NC'

   if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

                     ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:921:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketch\Marlin_main.cpp:921:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:72:42: note: in definition of macro '_WRITE_NC'

   if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

                                          ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:921:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketch\Marlin_main.cpp:921:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:73:21: note: in definition of macro '_WRITE_NC'

   else   CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

                     ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:921:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketch\Marlin_main.cpp:921:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:73:42: note: in definition of macro '_WRITE_NC'

   else   CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

                                          ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:921:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketch\Marlin_main.cpp:921:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_WPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:77:30: note: in definition of macro '_WRITE_C'

   uint8_t port_bits = DIO ## IO ## _WPORT;                  /* Get a mask from the current port bits */ \

                              ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:921:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketch\Marlin_main.cpp:921:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_RPORT" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:79:10: note: in definition of macro '_WRITE_C'

   DIO ## IO ## _RPORT = port_bits & _BV(DIO ## IO ## _PIN); /* Atomically toggle the output port bits */ \

          ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:921:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketch\Marlin_main.cpp:921:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

pins_ULTIMAKER.h:112:33: error: pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_PIN" does not give a valid preprocessing token

 #define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.

                                 ^

sketch\fastio.h:79:48: note: in definition of macro '_WRITE_C'

   DIO ## IO ## _RPORT = port_bits & _BV(DIO ## IO ## _PIN); /* Atomically toggle the output port bits */ \

                                                ^

sketch\fastio.h:94:31: note: in expansion of macro '_WRITE'

 #define WRITE(IO,V)           _WRITE(IO,V)

                               ^

sketch\fastio.h:105:51: note: in expansion of macro 'WRITE'

 #define OUT_WRITE(IO,V)       do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                                   ^

sketch\Marlin_main.cpp:921:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(SUICIDE_PIN, LOW);

     ^

sketch\Marlin_main.cpp:921:15: note: in expansion of macro 'SUICIDE_PIN'

     OUT_WRITE(SUICIDE_PIN, LOW);

               ^

exit status 1
pasting "/* PIN that has to be turned on right after start, to keep power flowing.*/" and "_DDR" does not give a valid preprocessing token


Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 01:49PM
One thing to note about compiling is; that the developers, on Marlin 2.0 have moved away from Arduino IDE, and over to platform.io
Platform.IO seems to me, to do a different (better? easier?) job of compiling, than is possible in Arduino IDE.

See this for more details about how to install Platform.IO [marlinfw.org]
And possibly see this video: [www.youtube.com]


I have been designing a new RAMPS 1.7 board, to be able to be used with both Arduino Mega and DUE.
As I have moved some pins (compared to RAMPS 1.4), and made it possible to use Hardware SPI on Due, I have had to compile Marlin 2.0 many times, in the past few weeks. And depending on what options I enable in configuration.h, some versions of Arduino IDE stops being able to compile. I am testing 1.8.5, 1.8.6 and 1.9-beta.

But when testing and compiling using Platform.IO, the compilation goes much more smoothly. So this could be one issue you are actually fighting, besides the configuration settings in Marlin. That you are not using the same toolchain (compile environment) as the developers of Marlin actually uses these days. ( Yes, this discovery is also rather new to me :-) )

I do not know if Platform.IO is only used to compile Marlin 2.0
Perhaps they are also only (or mainly, or first) test if Marlin 1.x versions will compile under Platform.IO



Further more, I have discovered that all dependencies (libraries needed in order to compile) sometimes gives some trouble when using Arduino IDE. And this has not yet happened to me under Platform.IO.

Supposedly, all libraries needed in order to compile Marlin (2.0 at least) are included within Marlin source code, when using Platform.IO - or perhaps there are definitions in the Marlin tree of folders that tell the compiler which liberaies (and which versions) are good to (auyomatically) pull in from github-like locations on the web.

But my (recent testing , like today testing) has shown me that this is not the case when using Arduino IDE. In Arduino IDE, it s possible for the user, to update libraries, but I do not think it is (yet) possible for configuration files, to automatically pull the right versions of any given external library.


Either way: Try to compile with Platform.IO and see if that makes a difference for your particular issue.
I use VScode as the editor environment, and VSCode automatically pulls in Platform.IO, when I open the Marlin top folder with VSCode.
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 02:00PM
When you get a long list of compile errors, always go to the top, and look at the first error. As the rest are likely cascade events deriving from the first error.


In your particular case: Problems with // comments at the end lines, is however a general Arduino IDE problem, in combination with wrapper macros that are heavily used in Marlin.

The here and now solution is: use Platform.IO to compile.


And other option is, to remove the comments on those lines that give you errors. As it is mainly lines with pin numbers that cause this compile error.
Rather than remove the comments, you could also just send them to a new line.
Either choice will (here and now) get your compiler past this type of issue.

Edited 2 time(s). Last edit at 09/11/2018 02:04PM by MrAlvin.
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 02:28PM
Ok i understand.
I know platform.io from 3 days,but is not easy like arduino. I know 2.0 can autobuild

But..afterall.Why this versions of configuration.h (one with 1.1.9, one with 2 and original one) work on all other users,and not for me.
Work,ok....bt not my sd reader.

The only one difference is that i make the stupid things to upload 1.1.9 with bootloader file (included in .hex file),and i don't know why the programmer have add that.

Fortunately i have recover my board sing arduino uno like isp and rewrite bootloader,and repload the firm (the printer was dead)

So,guys....what can i do for make sd working?For me it's not a compile problem,cause like i say,others don't have this issue.

Thank you all again
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 03:55PM
Marlin fails to compile with IDE 1.8.6. Check close to page 13 near the end [forum.arduino.cc]
Back up to something previous to 1.8.6 and try again

Edited 1 time(s). Last edit at 09/11/2018 03:57PM by DaveA.
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 04:29PM
Quote
zonalimitatore
Ok i understand.
I know platform.io from 3 days,but is not easy like arduino. I know 2.0 can autobuild

True, it does not look as simple as the Arduino IDE, but perhaps it is simpler to get it to do the right thing.

Quote
zonalimitatore
But..afterall.Why this versions of configuration.h (one with 1.1.9, one with 2 and original one)

hmm... because they use different words after the #define
And because they use different amounts of #define for the different versions of Marlin.
And because the config files are tightly linked to all the program code inside of Marlin, and the code inside Marlin changes every day (well the debug versions do), and thus the small changes to the order or wording inside the config files, needs to follow these changes.

Quote
zonalimitatore
work on all other users,and not for me.

hmmm.... what makes you say it works for everyone else?
Are you thinking about any particular persons or groups that you know it works for?

I have had issues every time I change to a different type/style of hardware. And most issues will take me at least one, some times two days to read the code inside Marlin, in order to figure out what needs to be different, either in the config files, or inside the code of Marlin.

So I understand that it feels like it is working for many other people, but in reality, most of them have had to spend quite a few days investigating for solutions, and only by now, they understand how to make it easy to get everything to work.

Quote
zonalimitatore
Work,ok....bt not my sd reader.

The only one difference is that i make the stupid things to upload 1.1.9 with bootloader file (included in .hex file),and i don't know why the programmer have add that.

Fortunately i have recover my board sing arduino uno like isp and rewrite bootloader,and repload the firm (the printer was dead)

So,guys....what can i do for make sd working?For me it's not a compile problem,cause like i say,others don't have this issue.

hmmm... I am not sure I fully understand all of this.
Did you not show the long list of compile errors? Are you able to make some combination of Arduino IDE or platform.io, and some versions of Marlin compile?

To get our help, I think you need to be much more detailed in what toolchain (compiler) you are trying to use, with which version of Marlin, and then you need to be rather picky as to which configuration.h files you use. You need to look at every #define within the configuration.h files you use, in order to figure out what is different, and why they are different, and only then will you know howto make the SD card work again.



Or of cause you can also just try many different combinations of it all, and then be happy when one of the combinations, by chance, ends up working.


P.S. I have made a small SD-card test sketch.
[github.com]

I use this test to eliminate any questions about hardware errors.

After this test is working, then I know it is only a question about settings, and other details, in the Firmware.

Edited 1 time(s). Last edit at 09/11/2018 04:31PM by MrAlvin.
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 04:47PM
Thank you for explain. I know that the a10 config work because,it's official and many others user update with no problem (with .hex file)
Soon try your sketch for eliminate the doubt.
Thanks
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 05:20PM
I've try the sketch.
Nothing.
Nothing on the screen

In the serial monitor see this: Initializing SD card...initialization failed!

Edited 1 time(s). Last edit at 09/11/2018 05:27PM by zonalimitatore.
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 05:59PM
hmm... that is not a good sign.

It seems like there might be some kind of hardware problem then.


Has that SD-card worked before, on the printer?

Can you read the sd-card on your computer?

Is it formatted as FAT?

Is the SD-card 2Gb or bigger?

Can you wiggle the SD-card, to see if it gets a better position in the card-reader slot?




Could you clean up your Arduino install?

This means removing or renaming the (windows-user)\documents\Arduino folder


And likewise renaming/removing folders in:
-- (windows-user)\AppData\Local
-- (windows-user)\AppData\Roaming

These two locations might have folders named Arduino or Arduino15


Please note that "AppData" folder is a hidden/system folder, so you need to add this visibility in windows explorer to see this folder.



Then try the SD_listfiles test-sketch again.

Edited 3 time(s). Last edit at 09/11/2018 06:02PM by MrAlvin.
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 06:30PM
Quote
MrAlvin


Has that SD-card worked before, on the printer? Yes

Can you read the sd-card on your computer? Yes

Is it formatted as FAT? Yes.i try fat 32,16,and do a low level format

Is the SD-card 2Gb or bigger? Yes

Can you wiggle the SD-card, to see if it gets a better position in the card-reader slot? I try in several position and do some,less,no pression.Try to wiggle the flat cable.Try different sd,different class

Quote
MrAlvin
Could you clean up your Arduino install?

This means removing or renaming the (windows-user)\documents\Arduino folder


And likewise renaming/removing folders in:
-- (windows-user)\AppData\Local
-- (windows-user)\AppData\Roaming

These two locations might have folders named Arduino or Arduino15


Please note that "AppData" folder is a hidden/system folder, so you need to add this visibility in windows explorer to see this folder.



Then try the SD_listfiles test-sketch again.

Ok i do all.
Same things.I ve notice if i inserit the sd in the reader instantly return with "Initializing SD card...initialization failed!"
But if the sd is not inserit,it's like a "Initializing SD card...pause--pause--pause--- initialization failed!"
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 07:06PM
I would ask to Check for debris or if maybe some debris was pushed into the SD card slot, try to blow air into the card slot to remove any debris.

The connections on the SD Cards can get dirty, you can clean the SD contacts with a pencil eraser being sure to wipe the eraser debris away before inserting into the SD Card slot.
Which Controller did your 3D Printer cone with, or Which controller are you currently using.


Computer Programmer / Electronics Technician
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 07:11PM
Quote
zonalimitatore
Ok i do all.
Same things.I ve notice if i inserit the sd in the reader instantly return with "Initializing SD card...initialization failed!"
But if the sd is not inserit,it's like a "Initializing SD card...pause--pause--pause--- initialization failed!"

hmm.. it is indeed strange. It seems like with card installed, there is quickly some kind of response, or connection, but it is very quickly realized that the response can not be used. Unlike when the card is not inserted, then there is not response to the program, and it tries several times, and then only stops, because too much time has passed.


Well, we are back to doing basic fault-finding, and this means eliminating one thing at a time, or only introducing one new step at a time. And testing every link of interface in the chain.

So, can you try with a different card?


I am also thinking if there is something else that uses SPI for communication, so it can be tested that the SPI pins on your arduino works.
I wonder if someone already has made a test sketch, where they use SPI to communicate between two Arduino. As this way fault on one of the arduino pins can be eliminated, and this leaves the wires and connectors, and the SD-card.

Do you happen to have an sd-card holder, so you could solder it to another Arduino, and run the test sketch on this other Arduino?
Depending on this result, it is possible to establish if the card is the faulty part or not.
The computer reads the SD-card through a different method than the Arduino does, so just because the card can be read by a computer, does not test the elements that the Arduino uses.



The easiest thing toi fix, would however be, if it was because of something being wrong with the wires or the connectors to the wires.
I suppose a multimeter could be used for this test. Or a 3V battery and a white LED, or a 1,5V battery and a red LED, because red LEDs use less than 3V to light up.

This way, it would be possible to test if there is actually electric contact through the connectors and wires.

Edited 1 time(s). Last edit at 09/11/2018 07:14PM by MrAlvin.
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 11, 2018 09:10PM
Yes i can try with different cards...


I wanna say one things....like i saw in first post
When i upload 1.1.9 from thinkiverse (runundfund if i find you eye rolling smiley ) with that cursed "firmware+bootloader" file,my print was death.
I recovery by myself and since no one have do it on this board,i have write a guide on my blog.
I don't know...maybe can be useful for know what i do,cause from that moment i upload the firmware,and sd stop working
It's in italian,but the images can explain all,or otherwise im here thumbs up

Guide Here

Edited 3 time(s). Last edit at 09/11/2018 10:08PM by zonalimitatore.
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 12, 2018 03:12AM
So, the guide you made, it shows how you got the bootloader back on your Arduino Mega?
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 12, 2018 06:16AM
Yes and the wiring doing
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 13, 2018 10:30AM
Where I can start?
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 13, 2018 09:33PM
I would double check that nothing close to the SD-card reader has been shorted by the new wires.

And then I would re-heat each of the pins of the SD-card reader. And before re-heating, I would add some flux, or while re-heating; add some solder using a thin solder wire. I have a 0.6 mm solder, that I use for such events.
Soldering things close to the pads of the SD-card-reader-pads can, in rare situations, cause the solder-connection of the SD-card-reader-pads to become a little loose, and creating a "cold" solder-joint. Cold-solder-joints are a pain to deal with, as they visually appear to be just fine, but electrically they are not fine.
I would pay special attention to the SD-card-reader-pads close to the new wires - and make sure to add a little extra solder to those pads.

Cold-solder-joint events, on equipment that used to work just fine, is the new scourge of non-leaded-solder. For these events to occur though, it is usually necessary that a high-temperature-event (or repeated very-warm-temperature-events) has happened in close proximity to the newly-created cold-solder-joint pad. But soldering in those new wires, might just have been that close-by high-temperature-event.
Re: SD init fail.....make me crazyangry smiley 2560 rev b.
September 13, 2018 09:45PM
Also, did you check to see if any debris might have found its way to the inside of the sd-card-reader slot?

You might also try soaking the entire sd-card-reader in rubbing-alcohol, as this would remove any grease that might have attached itself to the metal-strips, that is meant to make the connection between the card-reader and sd-card.
Sorry, only registered users may post in this forum.

Click here to login