Hi Everyone,
I am having an issue with uploading to a genuine Arduino Mega. It worked fine for weeks… and today it doesn’t, I can not find anything when searching online, so I am asking here, maybe there is something obvious I am missing.
Basically, the project is weeks ok, and worked fine up to today.
I tested on Arduino IDE and I could upload a sketch to this very board, so I am confident the board and cable is working fine.
I am left with a failure inside PlatformIO when trying to upload, here the part of the log where it gets the timout, at the end of this message
I tried to restart the computer, remove the usb com device from the device manager, etc etc, changing port doesn’t change anything. PlatformIO properly detect the device with the right port.
Any help or hint will be greatly appreciated!
Bye,
Jean
LOG:
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [==== ] 36.8% (used 3014 bytes from 8192 bytes)
Flash: [= ] 10.1% (used 25728 bytes from 253952 bytes)
Configuring upload protocol...
AVAILABLE: wiring
CURRENT: upload_protocol = wiring
Looking for upload port...
Auto-detected: COM13
Uploading .pio\build\megaatmega2560\firmware.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: reading input file ".pio\build\megaatmega2560\firmware.hex"
avrdude: writing flash (25742 bytes):
Writing | ####avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
I’m going bump and add my own issues here. I’m running an M3 Pro and PlatformIO sees the usb port. I can read from my Arduino Mega 2560 just fine. However, when I attempt to upload a new sketch, I get a timeout issue. This does not happen when I upload the same sketch using the same cable from my linux server.
Here’s the output from my upload attempts:
Processing megaatmega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/megaatmega2560.html
PLATFORM: Atmel AVR (5.1.0) > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560)
HARDWARE: ATMEGA2560 16MHz, 8KB RAM, 248KB Flash
DEBUG: Current (avr-stub) External (avr-stub, simavr)
PACKAGES:
- framework-arduino-avr @ 5.2.0
- tool-avrdude @ 1.60300.200527 (6.3.0)
- toolchain-atmelavr @ 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 8 compatible libraries
Scanning dependencies...
Dependency Graph
|-- TFT_eSPI @ 2.5.43
|-- Adafruit NeoPixel @ 1.12.5
|-- Meshtastic @ 0.0.7
|-- Wire @ 1.0
Building in release mode
Checking size .pio/build/megaatmega2560/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [=== ] 34.0% (used 2789 bytes from 8192 bytes)
Flash: [=== ] 26.1% (used 66204 bytes from 253952 bytes)
Configuring upload protocol...
AVAILABLE: wiring
CURRENT: upload_protocol = wiring
Looking for upload port...
Auto-detected: /dev/cu.usbmodem101
Uploading .pio/build/megaatmega2560/firmware.hex
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.
*** [upload] Error 1
==================================================== [FAILED] Took 30.98 seconds ====================================================