Closed selcuksarii closed 7 years ago
I think I have the same issue (#35). Same behavior, except I have the bug on W7. I thought it may be OS dependent, but as you have it on a other OS.. Can you try on W7 ?
İ tried on W10 , leonardo works as it should, but I dont have W7 pc right now :(
An other test I did : platformio + leonardo work fine on Ubuntu, but the leonardo flashed on Ubuntu bugs as previously back to W7. Have you the same with yours OS ? ( flash on window 10, test with linux).
I think my leonardo works fine if the upload is done without any errors on both OS's. But i did not exactly understand what you mean by flash on Windows and test with linux. Do you mean serial communication ?
For me platformio doesn't upload exactly like the Arduino toolchain, and it's seems to cause problem on certain OS. To see that, upload your code on the working OS with platformio. Then, switch to the other OS and connect the board and check if upload work with platformio.
My situation is not the same, only at Manjaro i cant upload twice, even if i upload on Windows, i can upload one more time at linux with platformio
@selcuksarii @The00
Please re-test:
pio platform uninstall atmelavr
pio platform install https://github.com/platformio/platform-atmelavr/archive/develop.zip
If you still have a problem, please make first uploading with Arduino IDE.
@ivankravets Hello
I have the same issue both with default atmelavr
and with yours.
My platform is vscode on win10. Here is an upload log:
> Executing task in folder 200704-001116-leonardo: C:\Users\Paul\.platformio\penv\Scripts\platformio.exe run --verbose --target upload <
Processing leonardo (platform: atmelavr; board: leonardo; framework: arduino; lib_extra_dirs: ~/Documents/Arduino/libraries)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/leonardo.html
PLATFORM: Atmel AVR 2.2.0 (https://github.com/platformio/platform-atmelavr/archive/develop.zip) > Arduino Leonardo
HARDWARE: ATMEGA32U4 16MHz, 2.50KB RAM, 28KB Flash
DEBUG: Current (simavr) On-board (simavr)
PACKAGES:
- framework-arduino-avr 5.0.0
- tool-avrdude 1.60300.200527 (6.3.0)
- toolchain-atmelavr 1.50400.190710 (5.4.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 6 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <sound> (C:\Users\Paul\Documents\PlatformIO\Projects\200704-001116-leonardo\lib\sound)
Building in release mode
MethodWrapper(["checkprogsize"], [".pio\build\leonardo\firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 7.5% (used 191 bytes from 2560 bytes)
Flash: [== ] 24.7% (used 7076 bytes from 28672 bytes)
.pio\build\leonardo\firmware.elf :
section size addr
.data 48 8388864
.text 7028 0
.bss 143 8388912
.comment 48 0
.note.gnu.avr.deviceinfo 64 0
.debug_info 2548 0
.debug_abbrev 2410 0
.debug_line 26 0
.debug_str 881 0
Total 13196
<lambda>(["upload"], [".pio\build\leonardo\firmware.hex"])
AVAILABLE: avr109
CURRENT: upload_protocol = avr109
BeforeUpload(["upload"], [".pio\build\leonardo\firmware.hex"])
Auto-detected: COM9
Forcing reset using 1200bps open/close on port COM9
Waiting for the new upload port...
avrdude -v -p atmega32u4 -C C:\Users\Paul\.platformio\packages\tool-avrdude\avrdude.conf -c avr109 -b 57600 -D -P "COM10" -U flash:w:.pio\build\leonardo\firmware.hex:i
avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Paul\.platformio\packages\tool-avrdude\avrdude.conf"
Using Port : COM10
Using Programmer : avr109
Overriding Baud Rate : 57600
avrdude: ser_open(): can't open device "\\.\COM10": The system cannot find the file specified.
avrdude done. Thank you.
*** [upload] Error 1
========================================================================================== [FAILED] Took 23.77 seconds ==========================================================================================
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.
@p-hash I think the problem resides in \.\COM10, check the platformio.ini file for "upload_port" variable and set it to the port your board is connected to. if you can't find that variable, add it to your boards settings, it should look similar to the one below.
[env:uno]
platform = atmelavr
framework = arduino
upload_port = COM[10]
P.S if you can post the content of the platformio.ini file, it will be easier to help.
@selcuksarii Hello Here is my platformio.ini
[platformio]
default_envs = leonardo
[env:leonardo]
platform = atmelavr
board = leonardo
framework = arduino
lib_extra_dirs = ~/Documents/Arduino/libraries
When I add upload_port = COM[9]
to it, it fails with the same error as before, and when I add upload_port = COM[10]
, it fails with following:
Looking for upload port...
Error: Please specify `upload_port` for environment or use global `--upload-port` option.
For some development platforms it can be a USB flash drive (i.e. /media/<user>/<device name>)
*** [upload] Explicit exit, status 1
========================================================================================== [FAILED] Took 8.00 seconds ==========================================================================================
The terminal process terminated with exit code: 1
tried on both but same result..
Problem
I am trying to use atom-platformio-ide to program my arduino leonardo but there is a problem uploading the code; the problem is, I can upload the code only once, after that for each trial platformio cant find the board. the only thing that lets the platformio to upload is upload some sample code from arduino ide, then platformio can upload for once again, but no more.
i did the following to prepare the environment to run properly and there is no permission issue after this.
First Run
Second Run
Any help would be appreciated
Additional Notes :