Welcome! Log In Create A New Profile

Advanced

Marlin compile error when enabling ULTRA_LCD define with Megatronics 2.0

Posted by smartroad 
Marlin compile error when enabling ULTRA_LCD define with Megatronics 2.0
July 07, 2013 05:35AM
Hi All,

I am trying to compile Marlin for my Megatronics V2.0 and have been successful until I try to enable an LCD. All I want at the moment is a 16x2 display to give basic information (as I have a 16x2 display handy). I am struggling as when I enable the ULTRA_LCD define I get the following compilation error:

ultralcd.cpp: In function 'void lcd_init()':
ultralcd.cpp:829: error: 'SHIFT_CLK' was not declared in this scope
ultralcd.cpp:830: error: 'SHIFT_LD' was not declared in this scope
ultralcd.cpp:831: error: 'SHIFT_EN' was not declared in this scope
ultralcd.cpp:832: error: 'SHIFT_OUT' was not declared in this scope
ultralcd.cpp:833: error: 'DIOSHIFT_OUT_RPORT' was not declared in this scope
ultralcd.cpp:833: error: 'DIOSHIFT_OUT_WPORT' was not declared in this scope
ultralcd.cpp:833: error: 'DIOSHIFT_OUT_PIN' was not declared in this scope
ultralcd.cpp:833: error: 'DIOSHIFT_OUT_WPORT' was not declared in this scope
ultralcd.cpp:833: error: 'DIOSHIFT_OUT_PIN' was not declared in this scope
ultralcd.cpp:833: error: 'DIOSHIFT_OUT_WPORT' was not declared in this scope
ultralcd.cpp:833: error: 'DIOSHIFT_OUT_PIN' was not declared in this scope
ultralcd.cpp:833: error: 'DIOSHIFT_OUT_WPORT' was not declared in this scope
ultralcd.cpp:833: error: 'DIOSHIFT_OUT_PIN' was not declared in this scope
ultralcd.cpp:834: error: 'DIOSHIFT_LD_RPORT' was not declared in this scope
ultralcd.cpp:834: error: 'DIOSHIFT_LD_WPORT' was not declared in this scope
ultralcd.cpp:834: error: 'DIOSHIFT_LD_PIN' was not declared in this scope
ultralcd.cpp:834: error: 'DIOSHIFT_LD_WPORT' was not declared in this scope
ultralcd.cpp:834: error: 'DIOSHIFT_LD_PIN' was not declared in this scope
ultralcd.cpp:834: error: 'DIOSHIFT_LD_WPORT' was not declared in this scope
ultralcd.cpp:834: error: 'DIOSHIFT_LD_PIN' was not declared in this scope
ultralcd.cpp:834: error: 'DIOSHIFT_LD_WPORT' was not declared in this scope
ultralcd.cpp:834: error: 'DIOSHIFT_LD_PIN' was not declared in this scope
ultralcd.cpp:835: error: 'DIOSHIFT_EN_RPORT' was not declared in this scope
ultralcd.cpp:835: error: 'DIOSHIFT_EN_WPORT' was not declared in this scope
ultralcd.cpp:835: error: 'DIOSHIFT_EN_PIN' was not declared in this scope
ultralcd.cpp:835: error: 'DIOSHIFT_EN_WPORT' was not declared in this scope
ultralcd.cpp:835: error: 'DIOSHIFT_EN_PIN' was not declared in this scope
ultralcd.cpp:835: error: 'DIOSHIFT_EN_WPORT' was not declared in this scope
ultralcd.cpp:835: error: 'DIOSHIFT_EN_PIN' was not declared in this scope
ultralcd.cpp:835: error: 'DIOSHIFT_EN_WPORT' was not declared in this scope
ultralcd.cpp:835: error: 'DIOSHIFT_EN_PIN' was not declared in this scope

in the lcd_init():
...
    WRITE(SHIFT_LD,HIGH);
  #endif
#else
    pinMode(SHIFT_CLK,OUTPUT); <-- This is where the error appears
    pinMode(SHIFT_LD,OUTPUT);
    pinMode(SHIFT_EN,OUTPUT);
    pinMode(SHIFT_OUT,INPUT);
    WRITE(SHIFT_OUT,HIGH);
    WRITE(SHIFT_LD,HIGH); 
    WRITE(SHIFT_EN,LOW);
#endif//!NEWPANEL

Anyone have an idea?
Re: Marlin compile error when enabling ULTRA_LCD define with Megatronics 2.0
July 09, 2013 04:07AM
Uncomment these lines in Configuration.h:

#define REPRAPWORLD_KEYPAD
#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click

Edit:

The setting above works only with RAMPS (MOTHERBOARD 33)!
For Megatronics (MATHERBOARD 701) as far you don't use the Keypad comment this code in ultralcd.cpp:
#else
    // pinMode(SHIFT_CLK,OUTPUT);
    // pinMode(SHIFT_LD,OUTPUT);
    // pinMode(SHIFT_EN,OUTPUT);
    // pinMode(SHIFT_OUT,INPUT);
    // WRITE(SHIFT_OUT,HIGH);
    // WRITE(SHIFT_LD,HIGH);
    // WRITE(SHIFT_EN,LOW);
#endif//!NEWPANEL

Edited 3 time(s). Last edit at 07/09/2013 07:09AM by flurin.
Still doing conflicting declaration error 'volatile uni16_t buttons'

In file included from ultralcd.cpp:34:
ultralcd_implementation_hitachi_HD44780.h:12: error: conflicting declaration 'volatile uint16_t buttons'
ultralcd.h:30: error: 'buttons' hsa a previous declaration as 'volatile uint8_t buttons'.

help please.!
Re: Marlin compile error when enabling ULTRA_LCD define with Megatronics 2.0
August 31, 2013 03:03AM
The trouble with Marlin is that the source is modified quite often!
I would migrate to Repetier-Firmware:

Keypad and LCD Add-on



3D Printing :: bit-by-bit - Thingiverse
Re: Marlin compile error when enabling ULTRA_LCD define with Megatronics 2.0
January 05, 2014 12:05PM
Have the same issues, and migrating aint no option, must be someone who can help
i have problems with ramps 1.4, 20x4 lcd and reprapworld keypad, when i take another firmware (not the latest) no problems, but when i take the latest official, the i also get the in file included from ultralcd.cpp:34:
ultralcd_implementation_hitachi_HD44780.h:12: error: conflicting declaration 'volatile uint16_t buttons'
ultralcd.h:30: error: 'buttons' hsa a previous declaration as 'volatile uint8_t buttons'.

and i cant figure it out, as i dont have much programming experience.

W.


Mendelmax 1.5, E3D v6, ramps 1.4, drv8825, kapton heated bed (working)
Sparkcube 1.1, e3d v6, radds 1.5, raps128, 12864 lcd, octoprint (build and testing)
Sparkcube 1.1 XL, radds 1.5, raps128, lcd, fsr autobed, octoprint on odroid (building)
Re: Marlin compile error when enabling ULTRA_LCD define with Megatronics 2.0
January 19, 2014 10:18AM
I have the same issue with the latest download. Shift_clk not defined and whole host of other errors when Ultra_LCD is defined.
Re: Marlin compile error when enabling ULTRA_LCD define with Megatronics 2.0
January 23, 2014 11:35PM
ULTRA_LCD currently needs some sort of encoder to make the menu system work and you are falling into the default case. Try defining NEWPANEL (and ULTIPANEL) in Configuration.h per the #ifdef around [github.com]

I recently posted a patch at [github.com] that tests if no encoder is defined and lets it compile without those two defines, which provides basic output-only LCD support, .

Edited 1 time(s). Last edit at 01/24/2014 12:37AM by DaveX.
Re: Marlin compile error when enabling ULTRA_LCD define with Megatronics 2.0
February 13, 2017 01:14PM
#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
#define ULTIPANEL //the ultipanel as on thingiverse

define both of these
Sorry, only registered users may post in this forum.

Click here to login