Go Down

Topic: NEWER New Optiboot bootloader (Read 7077 times) previous topic - next topic

somedude

Bill,


Would you mind clarifying one thing?

I tried compiling Optiboot for my 1284p and on github, your boards.txt has this comment and low fuse setting:

# Select full swing crystal oscillator (7F rather than FF)
optiboot1284.bootloader.low_fuses=0x7F

If I look at the fuse calculator here it looks like:
0x7F has CKDIV8 enabled and 0xFF is External Crystal
Now full swing appears to be 0xF7 without changing anything else, so is this a late-night typo?

Thank you very much.


westfw

Quote
Now full swing appears to be 0xF7 without changing anything else, so is this a late-night typo?
Yes, it appears so.  I have the F7 value in the *_isp targets in the Makefile, but the wrong values in boards.txt.
Sigh.  I've created https://github.com/Optiboot/optiboot/issues/174


somedude

#47
Feb 02, 2016, 03:41 pm Last Edit: Feb 02, 2016, 04:32 pm by somedude
I hate to bug you again, but I had trouble burning the bootloader to my 1284P, so I attempted some troubleshooting and read a bunch of other things.

Since lock bits are not clear in my mind, I will simply state my findings, without attempting to comment.
So here it is: maniacbug has the lock bits as 0x0F instead of 0x2F. I was getting a verification error when attempting to burn the bootloader with 0x2F for the lock bit, but I was successful with 0x0F.

I will do some reading in an attempt to understand the lock bits, but I thought I should mention this.
And I apologize for not specifying earlier that I am looking at boards.txt for 1.6



Edit: After spending some time reading the datasheet, I think this is what needs to happen:
Unprogramming (1) bootloader lock bits BLB11 and BLB12 (0x3F) removes any restrictions accessing the boot loader, necessary to be able to write it to the chip.
Programming (0) them both (0x0F) locks writing to the boot loader and reading from it as well.
Only programming BLB11 (0x2F) just locks the bootloader for writing.

So, if I understand this correctly, both 0x0F and 0x2F lock the bootloader for write, which makes sense so that it doesn't get wiped out, but 0x2F allows the program to read from it.

In my case, both lock bit settings should have worked, as both are valid.
I will go back to 0x2F and retry, maybe I messed something else up.


Edit (again - sorry): It worked with 0x2f, so it was me.

Sorry for wasting your time.

somedude

Update - for the sake of closure, I wanted to explain how I got Optiboot compiled for my 1284p.

RTFM was the key here, but I was unable to upload a sketch until I overrode the baud rate.
I noticed that Arduino writes at 19200 through the programmer, so I used that baud rate as a compile option and it finally took the sketch.

Thank you very much for Optiboot, it is amazing.

srinivardhan

Hi,

I thought I should write my own boot loader so that I could boot load through UART1 instead of UART0. I want to flash my hex file via  a bluetooth module HC 05. But then I found bootloader called optiboot. Will the 1284 optiboot compiled for UART1 instead of UART0 (EXPERIMENTAL!) present in the https://code.google.com/archive/... suffice my need ?

I was told by AVR clawson to sort it out with westfw :)
 
I want to run at 9600 baud rate. Do I need to make any changes to the source code and if so how ?
 
Looking forward to hear from you,

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy