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

Upload and programming a Leonardo board fails #287

Closed
gslender opened this Issue Sep 10, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@gslender

gslender commented Sep 10, 2015

I'm not sure if this has been specifically tested, but on OS X, you cannot successfully program/upload to a Leonardo Arduino board. The board works fine with the Arduino IDE, but fails every time using Platformio!

The first issue is that it doesn't sequence the port detection correctly/simply (like Arduino IDE) but you can mostly get around that (by timing the reset of the board to have the port show up and then execute the upload command, but it is very hard and painful).

The second issue is that it fails checksum for some unknown reason.

avrdude: Device signature = 0x1e9587
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB
avrdude: reading input file ".pioenvs/leonardo/firmware.hex"
avrdude: writing flash (32156 bytes):

Writing | ################################################## | 100% 2.23s

avrdude: 32156 bytes of flash written
avrdude: verifying flash memory against .pioenvs/leonardo/firmware.hex:
avrdude: load data flash data from input file .pioenvs/leonardo/firmware.hex:
avrdude: input file .pioenvs/leonardo/firmware.hex contains 32156 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.29s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x7000
0x55 != 0xc3
avrdude: verification error; content mismatch

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB
avrdude: safemode: Fuses OK (H:CB, E:D8, L:FF)

avrdude done.  Thank you.

scons: *** [upload] Error 1

@ivankravets ivankravets self-assigned this Sep 10, 2015

@ivankravets

This comment has been minimized.

Member

ivankravets commented Sep 10, 2015

Do you have problem when specify --upload-port option for platformio run command?

P.S: We have this board in our team (@valeros has it). However, he uses it under Windows and doesn't have any problems.

@ivankravets

This comment has been minimized.

Member

ivankravets commented Sep 10, 2015

Could you try this new build?

pip install -U https://github.com/platformio/platformio/archive/develop.zip

@ivankravets ivankravets added bug and removed help wanted labels Sep 10, 2015

@ivankravets

This comment has been minimized.

Member

ivankravets commented Sep 10, 2015

I merged it to main branch. Use update command above

pip install -U https://github.com/platformio/platformio/archive/develop.zip
@gslender

This comment has been minimized.

gslender commented Sep 10, 2015

Yep. All sorted. Much better upload now. The 2nd issue was due to me hitting the leonardo flash limit. I forgot about the huge 4K boot loader and the program hit the 0x7000 memory limit.

@gslender gslender closed this Sep 10, 2015

@ivankravets ivankravets added this to the 2.3.2 milestone Sep 11, 2015

ivankravets added a commit that referenced this issue Sep 11, 2015

@ivankravets

This comment has been minimized.

Member

ivankravets commented Sep 11, 2015

Please upgrade to stable 2.3.2 where this issue is fixed:

platformio upgrade

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment