MarlinFirmware / Configurations

Configurations for Marlin Firmware
https://marlinfw.org
GNU General Public License v3.0
1.98k stars 3.33k forks source link

CTC Bizer Marlin Not Compiling Arduino #999

Closed MechEng2016 closed 6 months ago

MechEng2016 commented 6 months ago

I used an Arduino compiler and set it for Arduino Mega 2560 board. My CTC Bizer uses a 2560 ATmega chip. It appears to give similar errors between the Marlin 2.0, 2.1 and the bug fixes. I am am trying to make a hex file to directly upload to the CTC board. I was able to upload a Marlin hex file another person created. The hex file worked but, I wanted to make some changes. Below is about 1/8 of the errors that I received. Anyone know what the main issue is and how to correct it? I can provide more of the error messages as needed.

In file included from C:\Users**\Documents\Marlin-bugfix-2.1.x\Marlin-bugfix-2.1.x\Marlin\src\HAL\AVR\HAL.h:30:0, from C:\Users**\Documents\Marlin-bugfix-2.1.x\Marlin-bugfix-2.1.x\Marlin\src\HAL\HAL.h:30, from C:\Users**\Documents\Marlin-bugfix-2.1.x\Marlin-bugfix-2.1.x\Marlin\src\inc\MarlinConfig.h:33, from C:\Users**\Documents\Marlin-bugfix-2.1.x\Marlin-bugfix-2.1.x\Marlin\src\lcd\marlinui.h:24, from C:\Users**\Documents\Marlin-bugfix-2.1.x\Marlin-bugfix-2.1.x\Marlin\src\lcd\HD44780\lcdprint_hd44780.cpp:41: C:\Users**\Documents\Marlin-bugfix-2.1.x\Marlin-bugfix-2.1.x\Marlin\src\pins\mega\pins_MIGHTYBOARD_REVE.h:227:51: error: pasting "/ G5/" and "_RPORT" does not give a valid preprocessing token

define BEEPER_PIN 4 // G5

                                               ^

C:\Users****\Documents\Marlin-bugfix-2.1.x\Marlin-bugfix-2.1.x\Marlin\src\HAL\AVR\fastio.h:84:39: note: in definition of macro '_TOGGLE'

define _TOGGLE(IO) (DIO ## IO ## _RPORT = _BV(DIO ## IO ## _PIN))

                                   ^~

C:\Users**\Documents\Marlin-bugfix-2.1.x\Marlin-bugfix-2.1.x\Marlin\src\libs\buzzer.h:64:43: note: in expansion of macro 'TOGGLE' FORCE_INLINE static void invert() { TOGGLE(BEEPER_PIN); } ^~ C:\Users**\Documents\Marlin-bugfix-2.1.x\Marlin-bugfix-2.1.x\Marlin\src\libs\buzzer.h:64:50: note: in expansion of macro 'BEEPER_PIN' FORCE_INLINE static void invert() { TOGGLE(BEEPER_PIN); }

ellensp commented 6 months ago

BOARD_MIGHTYBOARD_REVE is not a Arduino Mega 2560 It has additional IO pins that are not defined with selecting Arduino Mega 2560

you need to use MegaCore https://github.com/MCUdude/MegaCore

ellensp commented 6 months ago

Or Use vscode, it will install correct board file for BOARD_MIGHTYBOARD_REVE for you