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

Using USBasp with Deviot #208

Open
m4rcu5 opened this issue Feb 12, 2018 · 9 comments
Open

Using USBasp with Deviot #208

m4rcu5 opened this issue Feb 12, 2018 · 9 comments

Comments

@m4rcu5
Copy link
Contributor

m4rcu5 commented Feb 12, 2018

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

gepd commented Feb 12, 2018

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
Copy link
Contributor Author

m4rcu5 commented Feb 12, 2018

👍 Like a charm!

@gepd
Copy link
Owner

gepd commented Feb 12, 2018

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

@gepd gepd closed this as completed Feb 12, 2018
@jon-daemon
Copy link

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

gepd commented Nov 14, 2018

Are you using the dev version?

@jon-daemon
Copy link

jon-daemon commented Nov 14, 2018

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

gepd commented Nov 16, 2018

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

@gepd gepd reopened this Nov 16, 2018
@gepd gepd added Bug and removed Enhancement labels Nov 16, 2018
@jon-daemon
Copy link

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

@jon-daemon
Copy link

Just an update after isntalling it again on a newer system (MacOS 13, ST4, Deviot dev 2.2.2, avrdude 8).
The file platformio.ini is still not updating itself after selecting the programmer.
I added this in [env:uno] to be able to flash using a usbasp.

upload_flags =
    -C
    ${platformio.packages_dir}/tool-avrdude/avrdude.conf
    -p
    $BOARD_MCU
    -c
    usbasp
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i

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

No branches or pull requests

3 participants