marlin_stm32
marlin_stm32 copied to clipboard
Compilation errors when TX Buffer size is set greater than 0
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