OpenLog - open locked - how DO I update the firmware?

I’m trying to get avrdude to download (and ultimately upload) code to a new Openlog. It works for the application, but the serial bootloader won’t respond to anything I’ve thrown at it.

(stk500? v1? v2? baud rate? Any special flags?)

I have the same problem. I’m using the FTDI-Basic USB serial programmer, which works fine within the Arduino environment on COM1. I can download an Arduino blink program to Openlog and this will run perfectly.

However, attempting to use the same avrdude to download the Openlog main.hex file fails using the makefile supplied with Openlog-V11 (programmer port changed to com1, corrected link to arduino avdude.conf, etc.)

messages:

avrdude: stk500_getsync(): not in syn: resp=0x00

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

Suggestions would be much appreciated.

Thanks, Jim

The reset wiggler is unreliable. Remove the uSD card and use a bit of wire to short the square connector hole to the shield or to ground on the FTDI breakout a fraction of a second before hitting enter on the computer. I haven’t been able to hold it in reset, so I usually tap it and hit enter.

Also, it seems inserting an SD card can reset it (power surge, I think), so you might just want to have it plugged in but with the SD card clicked out, and click it in and hit return immediately.

It tends to timeout the bootload (on the openlog end) rather quickly.

tz:

I agree that the bootloader times out way too quickly, so something is wrong with it. On the other hand, the Arduino environment seems to be able to deal with this short timeout and program small segments of code. I’ll try the reset tactic and report back.

What baud rates & version of STK500 protocol were you using?

Jim

57600 - and stk500v1. You can see the avrdude line in GitHub - tz1/sparkfun: projects for sparkfun hardware in they hyperlog directory.

Thanks! I finally got it to work by writing a batch file “flash.bat” and executing this from the command line.

flash.bat contains the single line:

C:\arduino\hardware\tools\avr\bin\avrdude -p atmega328p -P COM1 -c stk500v1 -b 57600 -CC:\arduino\hardware\tools\avr\etc\avrdude.conf -U flash:w:main.hex

Don’t know what was wrong with the makefile.

Cheers, Jim

The Makefile should do the same thing but might take some variable time to get to it (at which point the Arduino might exit the bootloader).

Usually make shows the line it is executing, but it might take some quick fingers to do a reset.

Hey, thanks to both of you. I have been facing this issue for a while. And I had no idea regarding this. But after reading the notes by both of you, I got the issue to be resolved. So is it ok to do a reset? I am hoping to get a reply soon.