I'm trying to use MegaCoreX/ATmega4809 to upload to a Nano Every and after compilation completes successfully I get a message that says "Request 'upload' failed". I need to use MegaCoreX because I need one more GPIO pin and from what I've read I have to use this to use the AREF pin as GPIO.
The sketch compiles, uploads, and works fine (except for pin 39/aref) if I select Nano Every.
Get Board info returns correct info for either selection.
IDE is 2.3.3, Linux Mint 20.3 Any assistance greatly appreciated.
FQBN: MegaCoreX:megaavr:4809
Using board '4809' from platform in folder: /home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3
Using core 'coreX-corefiles' from platform in folder: /home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3
Detecting libraries used...
/home/tdc/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/MMRC_depot_grade_xing.ino.cpp -o /dev/null
Alternatives for EEPROM.h: [EEPROM@2.1]
ResolveLibrary(EEPROM.h)
-> candidates: [EEPROM@2.1]
/home/tdc/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/EEPROM/src /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/MMRC_depot_grade_xing.ino.cpp -o /dev/null
Alternatives for Bounce2.h: [Bounce2@2.71]
ResolveLibrary(Bounce2.h)
-> candidates: [Bounce2@2.71]
/home/tdc/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/EEPROM/src -I/home/tdc/Documents/Arduino/libraries/Bounce2/src /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/MMRC_depot_grade_xing.ino.cpp -o /dev/null
Alternatives for elapse.h: [Elapse@1.1.0]
ResolveLibrary(elapse.h)
-> candidates: [Elapse@1.1.0]
/home/tdc/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/EEPROM/src -I/home/tdc/Documents/Arduino/libraries/Bounce2/src -I/home/tdc/Documents/Arduino/libraries/elapse /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/MMRC_depot_grade_xing.ino.cpp -o /dev/null
Using cached library dependencies for file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/Lightlib.cpp
Using cached library dependencies for file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/flash.cpp
Using cached library dependencies for file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/newMainDetection.cpp
Using cached library dependencies for file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/oldMainDetection.cpp
Using cached library dependencies for file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/trackrelay.cpp
Using cached library dependencies for file: /home/tdc/Documents/Arduino/libraries/Bounce2/src/Bounce2.cpp
Using cached library dependencies for file: /home/tdc/Documents/Arduino/libraries/elapse/elapse.cpp
Generating function prototypes...
/home/tdc/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/EEPROM/src -I/home/tdc/Documents/Arduino/libraries/Bounce2/src -I/home/tdc/Documents/Arduino/libraries/elapse /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/MMRC_depot_grade_xing.ino.cpp -o /tmp/3914730378/sketch_merged.cpp
/home/tdc/.arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/3914730378/sketch_merged.cpp
Compiling sketch...
/home/tdc/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mrelax -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/EEPROM/src -I/home/tdc/Documents/Arduino/libraries/Bounce2/src -I/home/tdc/Documents/Arduino/libraries/elapse /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/MMRC_depot_grade_xing.ino.cpp -o /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/MMRC_depot_grade_xing.ino.cpp.o
Using previously compiled file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/Lightlib.cpp.o
Using previously compiled file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/flash.cpp.o
Using previously compiled file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/newMainDetection.cpp.o
Using previously compiled file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/oldMainDetection.cpp.o
Using previously compiled file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/trackrelay.cpp.o
Compiling libraries...
Compiling library "EEPROM"
Compiling library "Bounce2"
Using previously compiled file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/libraries/Bounce2/Bounce2.cpp.o
Compiling library "Elapse"
Using previously compiled file: /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/libraries/elapse/elapse.cpp.o
Compiling core...
Using precompiled core: /tmp/arduino/cores/55d993ceb577e4287f56613c24a6bf50/core.a
Linking everything together...
/home/tdc/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -Os -g -flto -fuse-linker-plugin -mrelax -Wl,--gc-sections -Wl,--section-start=.text=0x0 -mmcu=atmega4809 -o /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/MMRC_depot_grade_xing.ino.elf /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/Lightlib.cpp.o /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/MMRC_depot_grade_xing.ino.cpp.o /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/flash.cpp.o /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/newMainDetection.cpp.o /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/oldMainDetection.cpp.o /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/sketch/trackrelay.cpp.o /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/libraries/Bounce2/Bounce2.cpp.o /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/libraries/elapse/elapse.cpp.o /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/../../cores/55d993ceb577e4287f56613c24a6bf50/core.a -L/tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4 -lm
/home/tdc/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/MMRC_depot_grade_xing.ino.elf /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/MMRC_depot_grade_xing.ino.eep
/home/tdc/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/MMRC_depot_grade_xing.ino.elf /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/MMRC_depot_grade_xing.ino.hex
chmod +x /home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/scripts/create_disassembler_listing.sh
/home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/scripts/create_disassembler_listing.sh /home/tdc/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objdump "--disassemble --source --line-numbers --demangle --section=.text" /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/MMRC_depot_grade_xing.ino.elf /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/MMRC_depot_grade_xing.ino_atmega4809_16000000L.lst
Using library EEPROM at version 2.1 in folder: /home/tdc/.arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/EEPROM
Using library Bounce2 at version 2.71 in folder: /home/tdc/Documents/Arduino/libraries/Bounce2
Using library Elapse at version 1.1.0 in folder: /home/tdc/Documents/Arduino/libraries/elapse
/home/tdc/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /tmp/arduino/sketches/D4C78EF87516FC519F7207A2CF9E52B4/MMRC_depot_grade_xing.ino.elf
Sketch uses 9133 bytes (18%) of program storage space. Maximum is 49152 bytes.
Global variables use 503 bytes (8%) of dynamic memory, leaving 5641 bytes for local variables. Maximum is 6144 bytes.