gepd / Deviot

Sublime Text plugin for IoT development based in PlatformIO ecosystem (Arduino IDE)
Apache License 2.0
307 stars 55 forks source link

Using USBasp with Deviot #208

Open m4rcu5 opened 6 years ago

m4rcu5 commented 6 years ago

I'd like to use a USBasp to program my Atmega chip, for which I am using the following configuration in my platformio.ini file:

[env:prod]
platform = atmelavr
board = atmega328pb
board_f_cpu = 8000000L
framework = arduino
upload_protocol = usbasp
upload_flags = -Pusb

This way of uploading does not need a serial port, as USBasp shows up as a device in /dev/bus/usb/.... However the Deviot interface still prompts for a serial port on upload, blocking the process.

gepd commented 6 years ago

Please check the changes in the last release -dev14

It shouldn't ask you to select a port, but you should select the protocol in Deviot Menu > Programmer > Usbasp

If you don't do this last step, upload_protocol and upload_flags will be removed from platformio.ini I will fix this in the next release.

m4rcu5 commented 6 years ago

👍 Like a charm!

gepd commented 6 years ago

fixed in dev.15, now it will automatically detect the programmer in platformio.ini

jon-daemon commented 5 years ago

I still cannot use usbasp to upload my sketch. I select usbasp from the programmer menu but I get the "select port" window when I hit upload. What am I missing?

gepd commented 5 years ago

Are you using the dev version?

jon-daemon commented 5 years ago

I am. I added

upload_protocol = usbasp
upload_flags = -Pusb

in platformio.ini and now I am able to upload. I thought it would be have done automatically when I chose USBasp as my programmer. Sorry to bother

gepd commented 5 years ago

It should be done automatically, I'll check to commit a fix

jon-daemon commented 5 years ago

Any news on this? Have you tried to replicate it?