If the Shield is unplugged in, program upload successes. The board, processor and port are all correct
The board info:
BN: Arduino Mega or Mega 2560
VID: 2341
PID: 0042
SN: 558383230363517192B1
Error:
Sketch uses 2914 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 246 bytes (3%) of dynamic memory, leaving 7946 bytes for local variables. Maximum is 8192 bytes.
C:\Users\xxxx\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\xxxx\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM8 -b115200 -D -Uflash:w:C:\Users\xxxx\AppData\Local\Temp\arduino_build_724801/Arduino_XBee_Led_No_Sensor_sketch_apr27a.ino.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\Magnix\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf”
Using Port : COM8
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
An error occurred while uploading the sketch
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude done. Thank you.