Loading...
Pages: 1 ... 20 21 [22]   Go Down
Author Topic: New optiboot; beta testers welcome...  (Read 39297 times)
0 Members and 2 Guests are viewing this topic.
Leeds, UK
Offline Offline
God Member
*****
Karma: 35
Posts: 983
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Shannon Member
*****
Karma: 118
Posts: 10153
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
God Member
*****
Karma: 35
Posts: 983
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Faraday Member
**
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Shannon Member
*****
Karma: 118
Posts: 10153
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Excellent!  Thank you!
Logged

Italy
Offline Offline
Brattain Member
*****
Karma: 219
Posts: 16462
Don't know what I do
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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"  smiley-wink
Logged


0
Offline Offline
Faraday Member
**
Karma: 17
Posts: 3918
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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

- [GUIDA] IDE1.x - Nuove Funzioni - Sketch Standalone - Bootloader - VirtualBoard
http://arduino.cc/forum/index.php/topic,88546.0.html
- [LIBRERIA] ST7032i LCD I2C Controller Library
http://arduino.cc/forum/index.php/topic,96163.0.html

SF Bay Area (USA)
Offline Offline
Faraday Member
**
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You should update the rev. number into the comments
oops!
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 118
Posts: 10153
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
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 Offline
Shannon Member
*****
Karma: 118
Posts: 10153
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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
Offline Offline
Faraday Member
**
Karma: 17
Posts: 3918
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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

- [GUIDA] IDE1.x - Nuove Funzioni - Sketch Standalone - Bootloader - VirtualBoard
http://arduino.cc/forum/index.php/topic,88546.0.html
- [LIBRERIA] ST7032i LCD I2C Controller Library
http://arduino.cc/forum/index.php/topic,96163.0.html

Pages: 1 ... 20 21 [22]   Go Up
Print
 
Jump to: