Go Down

Topic: New optiboot; beta testers welcome... (Read 126408 times) previous topic - next topic

Tom Carpenter

#315
Oct 21, 2012, 02:20 am Last Edit: Oct 21, 2012, 02:23 am by Tom Carpenter Reason: 1
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.
~Tom~

Coding Badly

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.

Tom Carpenter

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.
~Tom~

westfw

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=

Coding Badly


leo72

@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"  ;)

Testato

@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 ?
- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

westfw

Quote
You should update the rev. number into the comments

oops!

Coding Badly

Code: [Select]
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!

Coding Badly


Why check for a UBRRn value below 3?  The new baud rate check traps troublesome combinations very nicely...


[font=Courier New]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[/font]

Testato


@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 ?
- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

westfw

Quote
not compatible with IDE 1.5x

What do you mean by "doesn't work"?  Doesn't compile?  Boards.txt not imported to IDE?  Something else?

The whole multi-platform stuff is still not finalized, so I've been delaying dealing with it.  Actually, it's not working very well with the 1.0 stuff either, at least from a "build" perspective.

westfw

I've put up a 5.0a zip file download, due to problems people were having compiling 5.0 on some unix systems.
(I don't actually fix anything, but I now ignore errors in the "baudcheck" target, so that the build will proceed anyway.)

http://code.google.com/p/optiboot/downloads/detail?name=optiboot-v5.0a.zip

Testato


Quote
not compatible with IDE 1.5x

What do you mean by "doesn't work"?  Doesn't compile?  Boards.txt not imported to IDE.

Board not appear under Ide 1.5
- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

pito

#329
Jun 09, 2013, 09:36 pm Last Edit: Jun 09, 2013, 09:49 pm by pito Reason: 1
I am not a beta tester, but I have a simple question:
I want conditionally bypass the optiboot. At the start of the optiboot I do a check, and if negative I want to exit optiboot properly and I want enter the actual application. Could you advice me on the proper way, plz?
Thanks.

Another one:
I want add few hundreds bytes of code, placed before the actual optiboot show starts (no impact on the optiboot). The stuff compiles about 670bytes today, it will grow.
Q: provided my code works fine, is the only thing to consider the change of the fuses (to 512 words) and its starting address in boards.txt, or shall I be aware of something other as well?

Go Up