Arduino Mega 2560 - Error compiling while using web editor

Please I've been receiving this errors

</>/usr/local/bin/arduino-cli compile --fqbn arduino:avr:mega:cpu=atmega2560 --libraries /home/builder/opt/libraries/latest --build-cache-path /tmp --output-dir /tmp/187434251/build --build-path /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086 -v /tmp/187434251/HC-SR501

Using board 'mega' from platform in folder: /home/builder/.arduino15/packages/arduino/hardware/avr/1.8.4

Using core 'arduino' from platform in folder: /home/builder/.arduino15/packages/arduino/hardware/avr/1.8.4

Detecting libraries used...

/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/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=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.4/cores/arduino -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.4/variants/mega /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/sketch/HC-SR501.ino.cpp -o /dev/null

Generating function prototypes...

/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/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=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.4/cores/arduino -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.4/variants/mega /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/sketch/HC-SR501.ino.cpp -o /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/preproc/ctags_target_for_gcc_minus_e.cpp

/home/builder/.arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/preproc/ctags_target_for_gcc_minus_e.cpp

Compiling sketch...

/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.4/cores/arduino -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.4/variants/mega /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/sketch/HC-SR501.ino.cpp -o /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/sketch/HC-SR501.ino.cpp.o

Compiling libraries...

Compiling core...

Using precompiled core: /tmp/core/core_arduino_avr_mega_cpu_atmega2560_f1d675a35cb302d87396e400c56d2f7e.a

Linking everything together...

/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega2560 -o /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/HC-SR501.ino.elf /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/sketch/HC-SR501.ino.cpp.o /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/../core/core_arduino_avr_mega_cpu_atmega2560_f1d675a35cb302d87396e400c56d2f7e.a -L/tmp/arduino-build-EC5966C752334D4230BAD108C15C4086 -lm

/home/builder/.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-build-EC5966C752334D4230BAD108C15C4086/HC-SR501.ino.elf /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/HC-SR501.ino.eep

/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/HC-SR501.ino.elf /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/HC-SR501.ino.hex

/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /tmp/arduino-build-EC5966C752334D4230BAD108C15C4086/HC-SR501.ino.elf

Sketch uses 1688 bytes (0%) of program storage space. Maximum is 253952 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.

Upload started

Programming with: Serial

Flashing with command:C:/Users/EAGLE BLISS EMPIRE/.arduino-create/arduino/avrdude/6.3.0-arduino17/bin/avrdude.exe -CC:/Users/EAGLE BLISS EMPIRE/.arduino-create/arduino/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM11 -b115200 -D -Uflash:w:C:/Users/EAGLEB~1/AppData/Local/Temp/arduino-create-agent650602662/HC-SR501.hex:i

avrdude: Version 6.3-20190619

Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:/Users/EAGLE BLISS EMPIRE/.arduino-create/arduino/avrdude/6.3.0-arduino17/etc/avrdude.conf"

Using Port : COM11

Using Programmer : wiring

Overriding Baud Rate : 115200

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done. Thank you.</>

if using Windows use the device manager to check you have the correct COM port
e.g. when plugging/unplugging the USB connector the COM should appear/disappear

@marshalldrone12
Your code compiled fine.
You have a problem with uploading.

Yes, it has like dat for some days now

Yes it does

sounds like you have a damaged board
is it a standard Mega 2560?
try a different USB cable
try plugging into a different USB socket
have you another mega you can try?

Yes, it's a Std board
I've 3 and All are saying the same thing

when I had similar problems I uninstalled all the COM drivers
unplug every COM device
run device manager (I assume Windows)
click View>Show hidden drvices
cliick each COM device in turn and click uninstal device
e.g. looks like
DeviceManager_1

when you plug in the Mega it should reinstal the driver

ALL PROCESSES HAD BEEN DONE BUT SAME OUTCOME
I don't know if the board is bad,
but it is still a old code that I had put in it

And even when I tried uploading with web editor same outcome
how

have you any other devices? can you upload to them?

No I don't

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.