Skip to content
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
Closed

Upload and programming a Leonardo board fails #287

gslender opened this issue Sep 10, 2015 · 5 comments
Assignees
Labels
Milestone

Comments

@gslender
Copy link

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
Copy link
Member

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
Copy link
Member

Could you try this new build?

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

@ivankravets
Copy link
Member

I merged it to main branch. Use update command above

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

@gslender
Copy link
Author

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.

@ivankravets
Copy link
Member

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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants