Leeds, UK
Offline
God Member
Karma: 35
Posts: 986
Once the magic blue smoke is released, it won't go back in!
|
 |
« Reply #315 on: October 20, 2012, 07:20:46 pm » |
I wasn't sure what values OSCCAL could take, so I hedged my bets. The byte would have been wasted anyway as all opcodes are 2bytes long, so it does no harm being there and it acts as an extra measure of protection.
|
|
|
|
« Last Edit: October 20, 2012, 07:23:56 pm by Tom Carpenter »
|
Logged
|
~Tom~
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 119
Posts: 10172
|
 |
« Reply #316 on: October 20, 2012, 08:26:53 pm » |
The byte would have been wasted anyway as all opcodes are 2bytes long When reading Flash as data it is byte-wise. Check the LPM instruction for details.
|
|
|
|
|
Logged
|
|
|
|
|
Leeds, UK
Offline
God Member
Karma: 35
Posts: 986
Once the magic blue smoke is released, it won't go back in!
|
 |
« Reply #317 on: October 21, 2012, 04:41:08 am » |
Ahh, you were thinking about reading the flag to check it. I was thinking about the byte of program memory it takes to store. If necessary it can be removed later, but at the moment doing so will not reduce the overall size of the bootloader as it will take up an integer number of 64 byte pages. As it stands, the bootloader takes up exactly 9 pages. If at some point more space us needed, I will remove that check.
|
|
|
|
|
Logged
|
~Tom~
|
|
|
|
SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5454
Strongly opinionated, but not official!
|
 |
« Reply #318 on: April 10, 2013, 12:36:26 pm » |
There is now a .zip file for Optiboot 5.0 There are no "important" changes for the core Arduino platforms in 5.0, but it does support the ATmega32, ATmega1284, and has a new makefile structure that should make it much easier to build custom version of optiboot from the source. http://code.google.com/p/optiboot/downloads/detail?name=optiboot-v5.0.zip&can=2&q=
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 119
Posts: 10172
|
 |
« Reply #319 on: April 10, 2013, 01:57:01 pm » |
Excellent! Thank you!
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16499
Don't know what I do
|
 |
« Reply #320 on: April 11, 2013, 04:16:27 pm » |
@westfw: Just a suggestion. You should update the rev. number into the comments of the optiboot.c file . The last modify is still marked as " Mar 2013 - 4.6" 
|
|
|
|
|
Logged
|
|
|
|
|
0
Online
Faraday Member
Karma: 17
Posts: 3925
Arduino rocks
|
 |
« Reply #321 on: April 11, 2013, 06:14:06 pm » |
@westfw: i tried to install optiboot5 on IDE 1.5.2 (windows) in the hardware directory, inside the sketch directory, like your installation guide, but do not work
the "hardware directory method" it is valid for 1.5.x branch of IDE ?
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5454
Strongly opinionated, but not official!
|
 |
« Reply #322 on: April 11, 2013, 11:18:04 pm » |
You should update the rev. number into the comments oops!
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 119
Posts: 10172
|
 |
« Reply #323 on: April 16, 2013, 02:52:52 am » |
make atmega328 AVR_FREQ=16000000 BAUD_RATE=1000000
BAUD RATE CHECK: Desired: 1000000, Real: 1000000, UBRRL = 1, Error=0.0% avr-gcc -g -Wall -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000 -DBAUD_RATE=1000000 -DLED_START_FLASHES=3 -c -o optiboot.o optiboot.c optiboot.c:277:2: error: #error Unachievable baud rate (too fast) BAUD_RATE make: *** [optiboot.o] Error 1
Argh!
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 119
Posts: 10172
|
 |
« Reply #324 on: April 16, 2013, 03:09:44 am » |
Why check for a UBRRn value below 3? The new baud rate check traps troublesome combinations very nicely...
make atmega328 AVR_FREQ=16000000 BAUD_RATE=900000
BAUD RATE CHECK: Desired: 900000, Real: 1000000, UBRRL = 1, Error=-11.1% avr-gcc -g -Wall -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000 -DBAUD_RATE=900000 optiboot.c:252:2: error: #error BAUD_RATE error greater than -5% make: *** [optiboot.o] Error 1
|
|
|
|
|
Logged
|
|
|
|
|
0
Online
Faraday Member
Karma: 17
Posts: 3925
Arduino rocks
|
 |
« Reply #325 on: April 16, 2013, 03:27:53 am » |
@westfw: i tried to install optiboot5 on IDE 1.5.2 (windows) in the hardware directory, inside the sketch directory, like your installation guide, but do not work the "hardware directory method" it is valid for 1.5.x branch of IDE ?
Sorry for the bump, may you confirm that it is not compatible with IDE 1.5x ?
|
|
|
|
|
Logged
|
|
|
|
|
|