Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation errors when TX Buffer size is set greater than 0 #9

Open
fkahhaleh opened this issue Jan 16, 2024 · 0 comments
Open

Compilation errors when TX Buffer size is set greater than 0 #9

fkahhaleh opened this issue Jan 16, 2024 · 0 comments

Comments

@fkahhaleh
Copy link

fkahhaleh commented Jan 16, 2024

Given that this is an older 1.1.9 release, I am not sure if I'll get any feedback but I thought it is worth a shot!

I am reviving an older machine running custom board and custom 1.1.8 firmware. I would like to recompile for 1.1.9 and
this repo shows the most potential! However part of their customization to their marlin is enabling TX_BUFFER_SIZE 128 instead of 0.

The printer heavily uses serial port communication with Marlin to issue commands. Once I made that change I could no longer compile the project. Thanks!

In file included from ../MarlinConfig.h:27:0,
from ../MarlinSerial.cpp:36:
../MarlinSerial.cpp: In function 'void _tx_udr_empty_irq()':
../macros.h:165:25: error: lvalue required as left operand of assignment
#define _BV(b) (1 << (b))
^
../macros.h:168:25: note: in expansion of macro '_BV'
#define CBI(n,b) (n &= ~_BV(b))
^~~
../MarlinSerial.cpp:352:9: note: in expansion of macro 'CBI'
CBI(M_UCSRxB, M_UDRIEx); // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
^~~
../MarlinSerial.cpp:359:16: error: lvalue required as left operand of assignment
M_UDRx = c;
^
In file included from ../MarlinConfig.h:27:0,
from ../MarlinSerial.cpp:36:
../macros.h:165:25: error: lvalue required as left operand of assignment
#define _BV(b) (1 << (b))
^
../macros.h:167:24: note: in expansion of macro '_BV'
#define SBI(n,b) (n |= _BV(b))
^~~
../MarlinSerial.cpp:364:7: note: in expansion of macro 'SBI'
SBI(M_UCSRxA, M_TXCx);
^~~
../macros.h:165:25: error: lvalue required as left operand of assignment
#define _BV(b) (1 << (b))
^
../macros.h:168:25: note: in expansion of macro '_BV'
#define CBI(n,b) (n &= ~_BV(b))
^~~
../MarlinSerial.cpp:367:19: note: in expansion of macro 'CBI'
if (h == t) CBI(M_UCSRxB, M_UDRIEx); // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
^~~
../MarlinSerial.cpp: At global scope:
../MarlinSerial.cpp:371:10: error: expected constructor, destructor, or type conversion before '(' token
ISR(M_USARTx_UDRE_vect) { _tx_udr_empty_irq(); }
^
../MarlinSerial.cpp: In static member function 'static void MarlinSerial::begin(long int)':
../MarlinSerial.cpp:384:14: warning: unused variable 'baud_setting' [-Wunused-variable]
uint16_t baud_setting;
^~~~~~~~~~~~
../MarlinSerial.cpp:385:10: warning: unused variable 'useU2X' [-Wunused-variable]
bool useU2X = true;
^~~~~~
../MarlinSerial.cpp: In static member function 'static void MarlinSerial::write(uint8_t)':
../MarlinSerial.cpp:519:18: error: lvalue required as left operand of assignment
M_UDRx = c;
^
In file included from ../MarlinConfig.h:27:0,
from ../MarlinSerial.cpp:36:
../macros.h:165:25: error: lvalue required as left operand of assignment
#define _BV(b) (1 << (b))
^
../macros.h:167:24: note: in expansion of macro '_BV'
#define SBI(n,b) (n |= _BV(b))
^~~
../MarlinSerial.cpp:524:9: note: in expansion of macro 'SBI'
SBI(M_UCSRxA, M_TXCx);
^~~
../macros.h:165:25: error: lvalue required as left operand of assignment
#define _BV(b) (1 << (b))
^
../macros.h:167:24: note: in expansion of macro '_BV'
#define SBI(n,b) (n |= _BV(b))
^~~
../MarlinSerial.cpp:553:7: note: in expansion of macro 'SBI'
SBI(M_UCSRxB, M_UDRIEx);
^~~
make: *** [MarlinSerial.o] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant