Skip to content

PlatformIO doesn't upload firmware correctly to Arduino Leonardo #904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
The00 opened this issue Feb 17, 2017 · 2 comments
Closed

PlatformIO doesn't upload firmware correctly to Arduino Leonardo #904

The00 opened this issue Feb 17, 2017 · 2 comments
Labels

Comments

@The00
Copy link

The00 commented Feb 17, 2017

Configuration

Operating system: Windows 7 64bit

PlatformIO Version (platformio --version): 3.2.1

Description of problem

Hi !
When uploading code to an arduino leonardo, the normal serial port doesn't re-appears after uploading. Instead, the arduino stays on the bootloader serial port.

Steps to Reproduce

  1. create project for Eclipse IDE: platformio init --ide eclipse --board leonardo
  2. Import project in Eclipse and add main.cpp source code
  3. Upload a first time. It should work, but the serial port is lost. You will see instead "Arduino leonardo bootloader" in the device manager.
  4. Re-upload. It will fail.
  5. You can unbrick the board by uploading a sketch using Arduino IDE(1.8.1). (set the port corresponding to Arduino leonardo bootloader). The normal serial port re-appears (Arduino Leonardo).

Actual Results

After an upload, the serial COM present is the bootloader, not the normal COM port. The uploaded code is running (blink demo code, tested with several delay). But the Serial communication doesn't work, and it's not possible to re-upload using Platformio.

Expected Results

For a normal uploading, the IDE reset the board. The bootloader shows up, the code is uploaded, and then the normal serial port goes on. Here, it doesn't, even after manual reset.

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:leonardo]
platform = atmelavr
board = leonardo
framework = arduino

Source file to reproduce issue:

#include <Arduino.h>
#define WLED	13  // Most Arduino boards already have an LED attached to pin 13 on the board itself

void setup()
{
  pinMode(WLED, OUTPUT);  // set pin as output
  Serial.begin(9600);
}

void loop()
{
  digitalWrite(WLED, HIGH);
  delay(200);
  digitalWrite(WLED, LOW);
  delay(200);
  Serial.println("test");
}

Additional info

This problem looks like #178 , but according to the thread, the issue should have been solved in the 1.5.0 version. I tried with two Leonardo, same result on both.

@The00
Copy link
Author

The00 commented Feb 17, 2017

I tried on Linux, and it's work. So it may be a compatibility problem with the windows driver of the board (installed by the arduino IDE).

@ivankravets
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants