I have a number of old Atmega8s gathering dust that I'd like to use as I2C-reachable dedicated keyboard scanners (since this always uses a lot of pins). The problem is that I want to use my old Pony Serial programmer to install a bootloader. I'm having problems getting my Arduino IDE (version 1.6.5) to install the bootloader using Pony Serial. I've put this in my boards.txt file:
(note the speculative part!!), but no matter what I put in there, Arduino insists on using the stk500 protocol through USB, not the Pony Serial through com4. Mind you, PonySer and Com4 work great when I just issue Avrdude commands manually in a shell window. Why won't the Arduino IDE pick up my configuration from boards.txt? What am I doing wrong? Thanks!
Select the ponyserial programmer from tools -> programmers. I don't think that programmer is supported by default, though, so you'd need to add appropriate entries to... I think programmers.txt
Or you could just bootload from commandline with avrdude. There are other issues with bootloading the atmega8 on 1.6.x because it doesn't have an extended fuse...
Also, the ponyserial programmer looks like something like the FTDI-ISP hack, where they get the extra pins from the control lines on standard serial, and it's agonizingly slow. Why not just get a $3 USB ASP isp programmer on ebay? They're fast, they work, they're supported by the IDE, they have a handy windows GUI (which you can use to manually bootload chips), and they're available for the price of a latte including shipping.
that was helpful! i forgot about the arduino programmer menu. now, though, it insists on talking on port com1 -- i guess i have to find where ponyser is configged. too bad it just can't look at boards.txt or the current serial setting of the IDE.
this is now what it is trying to do on my windows 7 system:
avrdude: ser_open(): can't open device "com1": The system cannot find the file specified.
I don't know where that com1 is coming from; it is nowhere in boards.txt or programmers.txt
How, in programmers.txt, do I tell the IDE which com port to use? I'm sure this information will be very valuable for people arriving on this page from Google searches.
As for why i use ponyser instead of a USB programmer: it's because i have a board i created back in 2008 that has a 28 pin socket with pins attached to a switch. In one position, the switch connects a serial cable to the Atmega's RX & TX pins, allowing me to use an Atmega chip in that 28 pin socket as an Arduino. In the other position, the switch allows the Atmega to be connected to the serial port via a Pony Serial interface, allowing me to install bootloaders or do AVRDude stuff directly. This system works great (even if it's slow, a bootloader is a small piece of code) and I would love to have it work for my Atmega8s with an 8MHz no-crystal bootloader.
I don't know what that is. I just want to use the Arduino IDE -- which seems like it should be configurable to do what I want to do. I already can get AVRDude to work correctly from the command line, but in this case I'm not sure how to translate that boards.txt fuse info into an AVRDude instruction. I'm sure I could figure it out, but last time I tried to figure out a fuse setting I bricked an Atmega32. So I'm understandably gun-shy.
So wait, does this mean there is no way to tell the IDE which com port to use when burning a bootloader? Hmm, well, I think I just found the answer to that question: no. You have to use the PROGRAMMERNAME.program.extra_params setting in boards.txt. This allows you to pass anything you want to AVRDude. Good to know!! So the ponyser block in my boards.txt now looks like this:
As far as I can tell, 1.6.5 is not going to be able to program bootloaders onto ATmega8 without significant changes "somewhere." You'd be better off learning how to use avrdude directory, or the ponyprog GUI.
(The big problem is this: "-Uefuse:w:{bootloader.extended_fuses}:m" - 1.6.4 doesn't understand that some chips don't have "extended" fuses.)
bigfun:
I don't know what that is. I just want to use the Arduino IDE -- which seems like it should be configurable to do what I want to do. I already can get AVRDude to work correctly from the command line, but in this case I'm not sure how to translate that boards.txt fuse info into an AVRDude instruction. I'm sure I could figure it out, but last time I tried to figure out a fuse setting I bricked an Atmega32. So I'm understandably gun-shy.
Ponyprog gui is the original interface for the ponyserial. I even googled it.
the m8 efuse error can be quickly suppressed by just commenting that entry in platform.txt. then put back in if needed. or the more involved method of creating a new core as drazzy suggested in the other thread a few days ago.
as far as ponyprog i used it for a short time some years ago but switched to avrdude as the lesser of two evils. pony took around 35 min to flash the same chip dude took about 4 sec. winders dont like some of its serial bits wiggled. at least not very fast. maybe its better now. the dos version was very fast but still a crummy flashing utility.