EnviroDIY / ModularSensors

An Arduino library to give environmental sensors a common interface of functions for use with Arduino-framework dataloggers, such as the EnviroDIY Mayfly.
https://envirodiy.github.io/ModularSensors/
Other
79 stars 47 forks source link

Mayfly sketch compiles and looks like it uploads, but it doesn't #449

Closed tahickson closed 5 months ago

tahickson commented 1 year ago

I have a Mayfly sketch that worked great two weeks ago, uploaded fine using VS Code and Platformio. Now, it compiles fine, but when I upload the sketch to the Mayfly I get the (typical) message below and the indication that the sketch has successfully uploaded, but the upload takes almost no time (which it did not do in the past) and the sketch is not uploaded. I have checked and re-checked my ports, switched out cables, uploaded other (simpler) sketches that work, to no avail. Wondering if anyone out there has any ideas as to how to get my sketch to upload? The behavior feels like something that may be due to an update in either Platformio or VSCode, but that's just a hunch.

*  Executing task in folder ESCI430Projects: platformio run --target upload --environment mayfly 

Processing mayfly (board: mayfly; platform: atmelavr; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/mayfly.html
PLATFORM: Atmel AVR (4.2.0) > EnviroDIY Mayfly
HARDWARE: ATMEGA1284P 8MHz, 16KB RAM, 127KB Flash
DEBUG: Current (simavr) External (simavr)
PACKAGES: 
 - framework-arduino-avr @ 5.1.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 ~ deep+, Compatibility ~ soft
Found 38 compatible libraries
Scanning dependencies...
Dependency Graph
|-- EnviroDIY_ModularSensors @ 0.34.0+sha.751ed46
|-- Adafruit BME280 Library @ 2.2.2
|-- TSOC_GROVEY_ADC @ 1.0.0+sha.a719397
|-- Adafruit AM2315 @ 2.2.1+sha.bb0b77d
|-- DHT sensor library @ 1.4.4+sha.be6915c
|-- AltSoftSerial @ 1.4.0+sha.8e86f89
|-- NeoSWSerial @ 3.0.6+sha.5a0daf7
|-- SoftwareSerial_ExtInts @ 1.0.0+sha.4ddf9fb
|-- SDL_Arduino_SSD1306 @ 0.0.0+20230804105933.sha.2eb9eb3
Building in release mode
Checking size .pio/build/mayfly/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   0.1% (used 9 bytes from 16384 bytes)
Flash: [          ]   0.4% (used 510 bytes from 130048 bytes)
Configuring upload protocol...
AVAILABLE: arduino
CURRENT: upload_protocol = arduino
Looking for upload port...
Auto-detected: /dev/cu.usbserial-0001
Uploading .pio/build/mayfly/firmware.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9705 (probably m1284p)
avrdude: reading input file ".pio/build/mayfly/firmware.hex"
avrdude: writing flash (510 bytes):

Writing | ################################################## | 100% 0.12s

avrdude: 510 bytes of flash written
avrdude: verifying flash memory against .pio/build/mayfly/firmware.hex:
avrdude: load data flash data from input file .pio/build/mayfly/firmware.hex:
avrdude: input file .pio/build/mayfly/firmware.hex contains 510 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.10s

avrdude: verifying ...
avrdude: 510 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.

============================================================== [SUCCESS] Took 4.98 seconds ==============================================================
 *  Terminal will be reused by tasks, press any key to close it. 
neilh10 commented 5 months ago

I think this is the same problem as described here. https://www.envirodiy.org/topic/mayfly-sketch-compiles-seems-to-upload-but-doesnt/ So probably a driver error. I think it should be closed.