Welcome! Log In Create A New Profile

Advanced

'rx_buffer' was not declared in this scope

Posted by KaurG 
'rx_buffer' was not declared in this scope
August 03, 2018 07:22PM
Have redone over 5 times and always getting " 'rx_buffer' was not declared in this scope " .
Now i tried printer Factory marlin from their site and same " 'rx_buffer' was not declared in this scope " .
Dont know what to do im so lost.

Factory printer had MKS Base V1.4 that broke Now i upgraded to MKS Gen L V1.0 . changed the Config.h file

// The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_MKS_GEN_L
#endif

and

#define SERIAL_PORT 4

ERROR that im getting


Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

sketch\MarlinSerial.cpp: In function 'ring_buffer_pos_t atomic_read_rx_head()':

MarlinSerial.cpp:114: error: 'rx_buffer' was not declared in this scope

return rx_buffer.head;

^

sketch\MarlinSerial.cpp: In function 'void atomic_set_rx_tail(ring_buffer_pos_t)':

MarlinSerial.cpp:142: error: 'rx_buffer' was not declared in this scope

rx_buffer.tail = value;

^

sketch\MarlinSerial.cpp: In function 'ring_buffer_pos_t atomic_read_rx_tail()':

MarlinSerial.cpp:155: error: 'rx_buffer' was not declared in this scope

return rx_buffer.tail;

^

sketch\MarlinSerial.cpp: In function 'void store_rxd_char()':

MarlinSerial.cpp:166: error: 'rx_buffer' was not declared in this scope

ring_buffer_pos_t h = rx_buffer.head;

^

In file included from sketch\serial.h:29:0,

from sketch\MarlinConfig.h:46,

from sketch\MarlinSerial.cpp:36:

MarlinSerial.h:67: error: 'UDR4' was not declared in this scope

#define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,)

^

sketch\MarlinSerial.h:52:63: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

^

sketch\MarlinSerial.h:67:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:185:17: note: in expansion of macro 'M_UDRx'

uint8_t c = M_UDRx;

^

sketch\MarlinSerial.cpp: In static member function 'static void MarlinSerial::begin(long int)':

MarlinSerial.h:56: error: 'UCSR4A' was not declared in this scope

#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

^

sketch\MarlinSerial.h:52:63: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

^

sketch\MarlinSerial.h:56:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

^

sketch\MarlinSerial.cpp:391:7: note: in expansion of macro 'M_UCSRxA'

M_UCSRxA = _BV(M_U2Xx);

^

In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:99:0,

from sketch\fastio.h:34,

from sketch\HAL.h:33,

from sketch\MarlinConfig.h:39,

from sketch\MarlinSerial.cpp:36:

MarlinSerial.h:72: error: 'U2X4' was not declared in this scope

#define M_U2Xx SERIAL_REGNAME(U2X,SERIAL_PORT,)

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:72:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_U2Xx SERIAL_REGNAME(U2X,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:391:22: note: in expansion of macro 'M_U2Xx'

M_UCSRxA = _BV(M_U2Xx);

^

In file included from sketch\serial.h:29:0,

from sketch\MarlinConfig.h:46,

from sketch\MarlinSerial.cpp:36:

MarlinSerial.h:56: error: 'UCSR4A' was not declared in this scope

#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

^

sketch\MarlinSerial.h:52:63: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

^

sketch\MarlinSerial.h:56:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

^

sketch\MarlinSerial.cpp:395:7: note: in expansion of macro 'M_UCSRxA'

M_UCSRxA = 0;

^

MarlinSerial.h:68: error: 'UBRR4H' was not declared in this scope

#define M_UBRRxH SERIAL_REGNAME(UBRR,SERIAL_PORT,H)

^

sketch\MarlinSerial.h:52:63: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

^

sketch\MarlinSerial.h:68:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UBRRxH SERIAL_REGNAME(UBRR,SERIAL_PORT,H)

^

sketch\MarlinSerial.cpp:400:5: note: in expansion of macro 'M_UBRRxH'

M_UBRRxH = baud_setting >> 8;

^

MarlinSerial.h:69: error: 'UBRR4L' was not declared in this scope

#define M_UBRRxL SERIAL_REGNAME(UBRR,SERIAL_PORT,L)

^

sketch\MarlinSerial.h:52:63: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

^

sketch\MarlinSerial.h:69:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UBRRxL SERIAL_REGNAME(UBRR,SERIAL_PORT,L)

^

sketch\MarlinSerial.cpp:401:5: note: in expansion of macro 'M_UBRRxL'

M_UBRRxL = baud_setting;

^

In file included from sketch\MarlinConfig.h:27:0,

from sketch\MarlinSerial.cpp:36:

MarlinSerial.h:57: error: 'UCSR4B' was not declared in this scope

#define M_UCSRxB SERIAL_REGNAME(UCSR,SERIAL_PORT,cool smiley

^

sketch\macros.h:71:19: note: in definition of macro 'SBI'

#define SBI(n,b) (n |= _BV(b))

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:57:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UCSRxB SERIAL_REGNAME(UCSR,SERIAL_PORT,cool smiley

^

sketch\MarlinSerial.cpp:403:9: note: in expansion of macro 'M_UCSRxB'

SBI(M_UCSRxB, M_RXENx);

^

In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:99:0,

from sketch\fastio.h:34,

from sketch\HAL.h:33,

from sketch\MarlinConfig.h:39,

from sketch\MarlinSerial.cpp:36:

MarlinSerial.h:58: error: 'RXEN4' was not declared in this scope

#define M_RXENx SERIAL_REGNAME(RXEN,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:403:5: note: in expansion of macro 'SBI'

SBI(M_UCSRxB, M_RXENx);

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:58:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_RXENx SERIAL_REGNAME(RXEN,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:403:19: note: in expansion of macro 'M_RXENx'

SBI(M_UCSRxB, M_RXENx);

^

MarlinSerial.h:59: error: 'TXEN4' was not declared in this scope

#define M_TXENx SERIAL_REGNAME(TXEN,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:404:5: note: in expansion of macro 'SBI'

SBI(M_UCSRxB, M_TXENx);

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:59:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_TXENx SERIAL_REGNAME(TXEN,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:404:19: note: in expansion of macro 'M_TXENx'

SBI(M_UCSRxB, M_TXENx);

^

MarlinSerial.h:61: error: 'RXCIE4' was not declared in this scope

#define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:405:5: note: in expansion of macro 'SBI'

SBI(M_UCSRxB, M_RXCIEx);

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:61:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:405:19: note: in expansion of macro 'M_RXCIEx'

SBI(M_UCSRxB, M_RXCIEx);

^

MarlinSerial.cpp:409: error: '_written' was not declared in this scope

_written = false;

^

In file included from sketch\MarlinConfig.h:27:0,

from sketch\MarlinSerial.cpp:36:

sketch\MarlinSerial.cpp: In static member function 'static void MarlinSerial::end()':

MarlinSerial.h:57: error: 'UCSR4B' was not declared in this scope

#define M_UCSRxB SERIAL_REGNAME(UCSR,SERIAL_PORT,cool smiley

^

sketch\macros.h:72:19: note: in definition of macro 'CBI'

#define CBI(n,b) (n &= ~_BV(b))

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:57:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UCSRxB SERIAL_REGNAME(UCSR,SERIAL_PORT,cool smiley

^

sketch\MarlinSerial.cpp:413:9: note: in expansion of macro 'M_UCSRxB'

CBI(M_UCSRxB, M_RXENx);

^

In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:99:0,

from sketch\fastio.h:34,

from sketch\HAL.h:33,

from sketch\MarlinConfig.h:39,

from sketch\MarlinSerial.cpp:36:

MarlinSerial.h:58: error: 'RXEN4' was not declared in this scope

#define M_RXENx SERIAL_REGNAME(RXEN,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:413:5: note: in expansion of macro 'CBI'

CBI(M_UCSRxB, M_RXENx);

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:58:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_RXENx SERIAL_REGNAME(RXEN,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:413:19: note: in expansion of macro 'M_RXENx'

CBI(M_UCSRxB, M_RXENx);

^

MarlinSerial.h:59: error: 'TXEN4' was not declared in this scope

#define M_TXENx SERIAL_REGNAME(TXEN,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:414:5: note: in expansion of macro 'CBI'

CBI(M_UCSRxB, M_TXENx);

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:59:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_TXENx SERIAL_REGNAME(TXEN,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:414:19: note: in expansion of macro 'M_TXENx'

CBI(M_UCSRxB, M_TXENx);

^

MarlinSerial.h:61: error: 'RXCIE4' was not declared in this scope

#define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:415:5: note: in expansion of macro 'CBI'

CBI(M_UCSRxB, M_RXCIEx);

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:61:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:415:19: note: in expansion of macro 'M_RXCIEx'

CBI(M_UCSRxB, M_RXCIEx);

^

MarlinSerial.h:66: error: 'UDRIE4' was not declared in this scope

#define M_UDRIEx SERIAL_REGNAME(UDRIE,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:416:5: note: in expansion of macro 'CBI'

CBI(M_UCSRxB, M_UDRIEx);

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:66:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UDRIEx SERIAL_REGNAME(UDRIE,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:416:19: note: in expansion of macro 'M_UDRIEx'

CBI(M_UCSRxB, M_UDRIEx);

^

sketch\MarlinSerial.cpp: In static member function 'static int MarlinSerial::peek()':

MarlinSerial.cpp:420: error: 'rx_buffer' was not declared in this scope

const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;

^

sketch\MarlinSerial.cpp: In static member function 'static int MarlinSerial::read()':

MarlinSerial.cpp:428: error: 'rx_buffer' was not declared in this scope

ring_buffer_pos_t t = rx_buffer.tail;

^

sketch\MarlinSerial.cpp: In static member function 'static ring_buffer_pos_t MarlinSerial::available()':

MarlinSerial.cpp:466: error: 'rx_buffer' was not declared in this scope

const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;

^

sketch\MarlinSerial.cpp: In static member function 'static void MarlinSerial::write(uint8_t)':

MarlinSerial.cpp:576: error: '_written' was not declared in this scope

_written = true;

^

In file included from sketch\MarlinConfig.h:27:0,

from sketch\MarlinSerial.cpp:36:

MarlinSerial.h:56: error: 'UCSR4A' was not declared in this scope

#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

^

sketch\macros.h:70:23: note: in definition of macro 'TEST'

#define TEST(n,b) !!((n)&_BV(b))

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:56:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

^

sketch\MarlinSerial.cpp:577:20: note: in expansion of macro 'M_UCSRxA'

while (!TEST(M_UCSRxA, M_UDREx)) sw_barrier();

^

In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:99:0,

from sketch\fastio.h:34,

from sketch\HAL.h:33,

from sketch\MarlinConfig.h:39,

from sketch\MarlinSerial.cpp:36:

MarlinSerial.h:62: error: 'UDRE4' was not declared in this scope

#define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:577:15: note: in expansion of macro 'TEST'

while (!TEST(M_UCSRxA, M_UDREx)) sw_barrier();

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:62:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:577:30: note: in expansion of macro 'M_UDREx'

while (!TEST(M_UCSRxA, M_UDREx)) sw_barrier();

^

In file included from sketch\serial.h:29:0,

from sketch\MarlinConfig.h:46,

from sketch\MarlinSerial.cpp:36:

MarlinSerial.h:67: error: 'UDR4' was not declared in this scope

#define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,)

^

sketch\MarlinSerial.h:52:63: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

^

sketch\MarlinSerial.h:67:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:578:7: note: in expansion of macro 'M_UDRx'

M_UDRx = c;

^

sketch\MarlinSerial.cpp: In static member function 'static void MarlinSerial::flushThot smiley)':

MarlinSerial.cpp:584: error: '_written' was not declared in this scope

if (!_written) return;

^

In file included from sketch\MarlinConfig.h:27:0,

from sketch\MarlinSerial.cpp:36:

MarlinSerial.h:56: error: 'UCSR4A' was not declared in this scope

#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

^

sketch\macros.h:70:23: note: in definition of macro 'TEST'

#define TEST(n,b) !!((n)&_BV(b))

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:56:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

^

sketch\MarlinSerial.cpp:587:20: note: in expansion of macro 'M_UCSRxA'

while (!TEST(M_UCSRxA, M_TXCx)) sw_barrier();

^

In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:99:0,

from sketch\fastio.h:34,

from sketch\HAL.h:33,

from sketch\MarlinConfig.h:39,

from sketch\MarlinSerial.cpp:36:

MarlinSerial.h:60: error: 'TXC4' was not declared in this scope

#define M_TXCx SERIAL_REGNAME(TXC,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:587:15: note: in expansion of macro 'TEST'

while (!TEST(M_UCSRxA, M_TXCx)) sw_barrier();

^

sketch\MarlinSerial.h:48:52: note: in expansion of macro 'SERIAL_REGNAME_INTERNAL'

#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)

^

sketch\MarlinSerial.h:60:28: note: in expansion of macro 'SERIAL_REGNAME'

#define M_TXCx SERIAL_REGNAME(TXC,SERIAL_PORT,)

^

sketch\MarlinSerial.cpp:587:30: note: in expansion of macro 'M_TXCx'

while (!TEST(M_UCSRxA, M_TXCx)) sw_barrier();

^

exit status 1
'rx_buffer' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Edited 2 time(s). Last edit at 08/03/2018 07:28PM by KaurG.
Re: 'rx_buffer' was not declared in this scope
August 03, 2018 09:46PM
#define SERIAL_PORT 4


This is the serial port on the controller, not the serial port on your computer. 0 through 3 are valid options on a controller with a atmel 2560.
unless you are doing something like serial over bluetooth or deliberately not using the usb port you should not change this from 0

Edited 3 time(s). Last edit at 08/03/2018 09:50PM by Dust.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 12:08AM
Yes Thank you . got the code uploaded but the lcd screen isnt turning on maybe i have to flash the board due to my previous attempts?

Edited 2 time(s). Last edit at 08/04/2018 12:28AM by KaurG.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 12:26AM
using RepRapDiscount Smart Controller . I tried adding U8glib.h and U8glib.cpp files but U8glib.cpp gives me some kind of error ... what i understand it doesent support the board`

Edited 1 time(s). Last edit at 08/04/2018 12:46AM by KaurG.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 12:57AM
Main question is - does the code overwrite or just adds up ?
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 01:18AM
Okay, so I added U8lgb.h File and #include to Configuration . lcd not working (IF i turn the knob board will flash blue and when i turn the knob and hold it down buzzer will start sceaming)
here is SS:
[www.upload.ee]

Edited 1 time(s). Last edit at 08/04/2018 01:33AM by KaurG.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 02:20AM
New code replaces old code completely, data in eeprom may survive... depends on a few factors. (data saved with m500 commands)
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 02:37AM
your adding the lcd wrong...

you find the appropriate section for your lcd in configuratio.h and enable it (by removing the // that comments out that device)

since you keep talking about U8lgb im going to presume you have GLCD

most common is

//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

change to
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

now you have to add the U8glib to the arduio IDE, any tutorial that says copy files.... is old and out of date

Make sure you have removed any U8glib file you tried to add previously.

Go to [github.com] and click clone or download. Then select Download Zip. Take note where you save this.

Open up arduino IDE find in the menus Sketch > Include Library > Add zip library

Find where you downloaded the library to before and add it.

Compile the code and upload it to the controller

Edited 4 time(s). Last edit at 08/04/2018 02:41AM by Dust.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 03:44AM
No Errors but No lcd aswell. I did all u said but didnt find //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER So i just added it on top of the configuration.h without the slashes.

I thought i needed U8lgb ? idk only thing i know of

Edited 4 time(s). Last edit at 08/04/2018 03:51AM by KaurG.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 03:54AM
i will save the Config.h and try to edit another Marlin
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 04:03AM
just adding things in like that wont help... If there is no define there is probably no code to support it either'

If is not there Its not a current version of marlin

Start with a fresh current marlin might be an idea...
[github.com]
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 04:27AM
Error when trying to add zip to new Marlin : A library named U8glib_Arduino-master already exists
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 05:34AM
means the library is already installed.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 05:41AM
yes sure but nothing has changed

Sill stuck at the same point LCD not working

Edited 1 time(s). Last edit at 08/04/2018 05:43AM by KaurG.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:00AM
BUT the thing is that they have listed
THIS #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER AM I GONA BUY THIS?
BUT I HAVE THIS #define REPRAP_DISCOUNT_SMART_CONTROLLER

i tried Putting #define REPRAP_DISCOUNT_SMART_CONTROLLER BUT same thing AgiN

Edited 1 time(s). Last edit at 08/04/2018 06:02AM by KaurG.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:01AM
what type of LCD do you actually have?


Does it looks like this with a more sqaure screen?


Or more rectangular like


or something else?
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:03AM


UGH The " more rectangular like "

Edited 1 time(s). Last edit at 08/04/2018 06:04AM by KaurG.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:04AM
For the normal 2004 lcd you need to enable

#define REPRAP_DISCOUNT_SMART_CONTROLLER

and disable

//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

the 2004 lcd does not need glcd library, but it wont matter that you added it.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:07AM
thats what i did but still same Thing angry smiley i see no hope

Edited 1 time(s). Last edit at 08/04/2018 06:07AM by KaurG.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:10AM
post your configuration.h file (preferably to something like paste bin) and link to it, so I can see
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:10AM
also take a picture of how you have it connected, showing the lcd connectors and where they go

Edited 1 time(s). Last edit at 08/04/2018 06:11AM by Dust.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:11AM
//=============================================================================
//======================= LCD / Controller Selection =======================
//========================= (Graphical LCDs) ========================
//=============================================================================

//
// CONTROLLER TYPE: Graphical 128x64 (DOGM)
//
// IMPORTANT: The U8glib library is required for Graphical Display!
// [github.com]
//

//
// RepRapDiscount FULL GRAPHIC Smart Controller
// [reprap.org]
//
//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#define REPRAP_DISCOUNT_SMART_CONTROLLER ~THERE WAS NO SUCH OPTION I JUST ADDED IT THERE
//
// ReprapWorld Graphical LCD
// [reprapworld.com]
//
//#define REPRAPWORLD_GRAPHICAL_LCD

//
i dont even know what helps
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:12AM
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:20AM
on the current marlin

Line 1522 of configuration.h [github.com]
has "//#define REPRAP_DISCOUNT_SMART_CONTROLLER"

and since I asked you to start again with the current marlin. it should be there for you too.

Edited 1 time(s). Last edit at 08/04/2018 06:20AM by Dust.
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:25AM
SEEMS LIKE i cannot post it HERE
ANYWAYS i have tried switching them backwards but nothing improved other than madness
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:25AM
and i cannot conect phone to computer cause bad cables
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:26AM
i can try with gopro if u really need this
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:27AM
I started from beginning....
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:31AM
here is my whole Config file
Attachments:
open | download - Configuration.h (69.9 KB)
Re: 'rx_buffer' was not declared in this scope
August 04, 2018 06:38AM
WHAT i Downloaded New MARlin and Started editing it...... How i got the wrong?

Download Link????
Sorry, only registered users may post in this forum.

Click here to login