RREE / AVRAda_Doc

Documentation for AVR-Ada
2 stars 0 forks source link

avrdude error: cannot find programmer id stk500v1 #1

Open bullyDD opened 1 week ago

bullyDD commented 1 week ago

Hi RREE,

Thank you for your time and this incredible work you have done. I am a teacher and i want to introduce Ada to some of my students. Ada is a great language when comes to teach embedded systems programming.

So I am on Windows OS 10 and i follow your instructions. Currently I am at the last step ; download blink_busy.elf to arduino uno board.

The thing is I can't download the binary file. I get this error : build_error

Here are the setps I made to reach here

  1. I followed your tutorial (install alire on windows, dowload avrada crates, upload alr, alr build)
  2. When I run make blink_busy.prog I said make(e=2) meaning the second arg is invalid. So i figure out that the script can't find avrdude. Bc i already add arduino IDE installed on my computer, I add bin folder to the path so avrdude.exe is visible.
  3. I run the script again (It says can't open avrdude.conf file which is located inside arduino IDE installation folder and I am pretty sure this config has to be done when you use the IDE)
  4. So I decide to copy avrdude.exe file to my alr/cache/toolchains/gnat_avr_elf_xxxxx
  5. Run the script again now i come across this error (the screenshot)

My question is what programmer do you use on windows ? I already I stlink on my computer (when I work with ARM mcu).

RREE commented 1 week ago

Hi,

I am very happy to see that there are still lecturers that try to show Ada to their students. I think it is a good language to teach some computer science and engineering principles.

When I wrote the AVR-Ada crates and the corresponding doc I focused on the Linux environment. I had never tried to make it work on Windows. On Linux it is as easy as "apt install avrdude" and everything is done correctly.

You already located avrdude.exe and avrdude.conf on your computer within the Arduino envornment. I can imagine that the Arduino distributors modified avrdude.conf to better match their environment. I propose that you check one of the avrdude forks that were made for Windows explicitly (https://github.com/mariusgreuel/avrdude or https://github.com/avrdudes/avrdude).

If you want to use your setup with students I recommend to stick to the standard Arduino bootloader and to program via USB cable. I used the "Pocket AVR Programmer" from Sparkfun in former times. But that is only necessary if you somehow bricked your AVR board and need to rescue via the ISP port.

The command line switch for avrdude for the Arduino boards was tricky at some time. I had to try variations of the "programmer"

and of the speed

That all also depends on the bootloader that is already on the Arduino boards. As far as I remember you can somehow inspect the command line that the Arduino environment uses for programming.