Error compiling for board Arduino/Genuino Mega or Mega 2560

Had to re-install my Arduino files & Library folder/files. Now I get this message: "Error compiling for board Arduino/Genuino Mega or Mega 2560". I have double checked everything that I can think of, but still not able to have it recognize the connected Geeetech A10M printer; the selected board is the correct one. It worked before I had to mess with the files. Anyone have a reason for the message and what I might review? Thanks.

Here's the full message: fork/exec /Users/noelkuck1/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++: bad CPU type in executable Error compiling for board Arduino/Genuino Mega or Mega 2560.

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link.

Arduino: 1.8.9 (Mac OS X), Board: "Arduino/Genuino Uno"

fork/exec /Users/noelkuck1/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++: bad CPU type in executable
Error compiling for board Arduino/Genuino Uno.

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

I get this same message regardless of the type of Arduino board connected. So it doesn't seem to be related to my mention of the 2560 board in my printer. Thanks for any assistance. And here it is with Verbose engaged:

Arduino: 1.8.4 (Mac OS X), Board: "Arduino/Genuino Uno"

/Applications/ -dump-prefs -logger=machine -hardware /Applications/ -hardware /Users/noelkuck1/Library/Arduino15/packages -tools /Applications/ -tools /Applications/ -tools /Users/noelkuck1/Library/Arduino15/packages -built-in-libraries /Applications/ -libraries /Users/noelkuck1/Documents/libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10804 -build-path /var/folders/m6/_g9ydm_s5tv0m9v51tfpbtt80000gp/T/arduino_build_461213 -warnings=none -build-cache /var/folders/m6/_g9ydm_s5tv0m9v51tfpbtt80000gp/T/arduino_cache_274897 -prefs=build.warn_data_percentage=75 -verbose /Applications/
/Applications/ -compile -logger=machine -hardware /Applications/ -hardware /Users/noelkuck1/Library/Arduino15/packages -tools /Applications/ -tools /Applications/ -tools /Users/noelkuck1/Library/Arduino15/packages -built-in-libraries /Applications/ -libraries /Users/noelkuck1/Documents/libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10804 -build-path /var/folders/m6/_g9ydm_s5tv0m9v51tfpbtt80000gp/T/arduino_build_461213 -warnings=none -build-cache /var/folders/m6/_g9ydm_s5tv0m9v51tfpbtt80000gp/T/arduino_cache_274897 -prefs=build.warn_data_percentage=75 -verbose /Applications/
Using board 'uno' from platform in folder: /Users/noelkuck1/Library/Arduino15/packages/arduino/hardware/avr/1.6.23
Using core 'arduino' from platform in folder: /Users/noelkuck1/Library/Arduino15/packages/arduino/hardware/avr/1.6.23
Detecting libraries used...
"/Users/noelkuck1/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/Users/noelkuck1/Library/Arduino15/packages/arduino/hardware/avr/1.6.23/cores/arduino" "-I/Users/noelkuck1/Library/Arduino15/packages/arduino/hardware/avr/1.6.23/variants/standard" "/var/folders/m6/_g9ydm_s5tv0m9v51tfpbtt80000gp/T/arduino_build_461213/sketch/Blink.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/Users/noelkuck1/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/Users/noelkuck1/Library/Arduino15/packages/arduino/hardware/avr/1.6.23/cores/arduino" "-I/Users/noelkuck1/Library/Arduino15/packages/arduino/hardware/avr/1.6.23/variants/standard" "/var/folders/m6/_g9ydm_s5tv0m9v51tfpbtt80000gp/T/arduino_build_461213/sketch/Blink.ino.cpp" -o "/var/folders/m6/_g9ydm_s5tv0m9v51tfpbtt80000gp/T/arduino_build_461213/preproc/ctags_target_for_gcc_minus_e.cpp"
fork/exec /Users/noelkuck1/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++: bad CPU type in executable
Error compiling for board Arduino/Genuino Uno.

This error is caused by using macOS 10.15 (Catalina). Arduino IDE 1.8.9 uses 32 bit applications and macOS 10.15 requires all applications to be 64 bit. As a beta tester of macOS 10.15, I'm surprised you aren't already aware of this significant change in the OS. You should expect problems when you use a beta version of an operating system.

There is a beta version of the Arduino IDE that is compatible with macOS 10.15. You can download it here:

Thanks. I dumbly wasn’t using my brain. Looking in all the wrong places

Thanks. Worked like a charm!

You're welcome. I'm glad to hear it's working now. Enjoy! Per

Sorry for the bother again, but now when I relaunch the beta Arduino.ino I am presented with just the configuration.h and configuration_adv.h tabs. Any reason that the is happening? Thanks for the help.

Which sketch do you have open in the Arduino IDE? The filenames configuration.h and configuration_adv.h sound like it's the Marlin 3D printer firmware, or some variation of it.