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

use avrdude linuxspi/linuxgpio programmer #4

Open
chrstphrchvz opened this issue Nov 19, 2017 · 2 comments
Open

use avrdude linuxspi/linuxgpio programmer #4

chrstphrchvz opened this issue Nov 19, 2017 · 2 comments

Comments

@chrstphrchvz
Copy link

As long as the linuxspi or linuxgpio programmers were enabled at compile time, there shouldn't be a need for patching avrdude with a separate programmer for alamode. Arduino IDE (not through Raspbian) includes avrdude with the linuxgpio programmer, and the Raspbian build of avrdude also includes the linuxspi programmer.

I haven't figured out all the steps to successfully use this myself, but it would probably involve updating the avrdude.conf and/or programmers.txt.

(n.b.: I think this is what ArduBerry is using.)

@chrstphrchvz
Copy link
Author

Update: I successfully flashed the optiboot_atmega328.hex bootloader and uploaded a sketch to the alamode using the both the linuxgpio and linuxspi programmers. E.g. for linuxspi, in avrdude.conf I specified reset on gpio pin 18 (header pin 12):

programmer
  id = "linuxspi";
  desc = "Use Linux SPI device in /dev/spidev*";
  type = "linuxspi";
  reset = 18;
  baudrate=400000;
;

To clarify, the linuxspi programmer is not yet officially included in avrdude nor the official Arduino IDE download's avrdude, rather it is a patch that debian and probably others downstream include by popular demand.

I haven't yet figured out how to have this appear in the Arduino IDE, but there might also still be a bug in either avrdude or udev that pose an issue trying it out anyways (sleeping long enough for udev to fix permissions on the gpio sysfs stuff; I ran avrdude as root as a workaround).

@chrstphrchvz
Copy link
Author

Update: as of sometime later in 2018, Arduino's avrdude now includes linuxspi.

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

No branches or pull requests

1 participant