Pages: 1 2 [3] 4 5 ... 23   Go Down
Author Topic: New optiboot; beta testers welcome...  (Read 103529 times)
0 Members and 3 Guests are viewing this topic.
SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 135
Posts: 6763
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
FuseBytes: I got:
"pgm_read_byte" was not declared in this scope at line 83
You probably need to download the Flash library from the playground, or remove the #define of USEFLASHLIB
Quote
OptiLoader:
I got: variable or field "read_image" declared void
That one I can't explain.  yeah, read_image is declared void, and it is consistently used that way too.

I'll try to take a look at the compiles on a "virgin" system and see if I can duplicate the problems...

Logged

Global Moderator
Italy
Online Online
Brattain Member
*****
Karma: 332
Posts: 22811
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks. I'll wait for news from you  smiley-wink
Logged


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

I've confirmed that fusebytes works without the USEFLASHLIB (and I've uploaded a new version that makes this the default.)

I couldn't duplicate the problem with optiLoader on either virgin WXP or Unbuntu10 arduino installs (ok, the Unbuntu version was the v18 installed by the package manager with the arduino parts overwritten by the v22 download.)
Logged

GA
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

westfw,

I burned the optiboot_atmega328.hex file (attached at the beginning of this thread) onto a 328P DIP chip and on an Arduino Duemilanove.  I did this twice, following the instructions listed here:
http://arduino.cc/forum/index.php/topic,65099.0.html
and
http://www.sparkfun.com/tutorials/247

I used avrdude 5.10 on Windows Vista and on my Linux machine (Fedora 15).

No errors whatsoever during the burning of the bootloader, but I then couldn't communicate with either of the chips.  I got this error when trying to upload the "fade" sketch from the "examples":

Binary sketch size: 1252 bytes (of a 30720 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I then burned the standard bootloader using the Arduino 0022 IDE, choosing the Arduino Duemilanove board and finally selecting "Burn Bootloader -> w/ Arduino as ISP".  Again, no errors during the burn AND was able to communicate with the board and load a sample program.

Am I doing anything wrong here?  I must be the only one that hasn't been able to make this work!
Logged

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

Did you change the board type (Tools/Board) to Uno after putting optiboot on the chip?  Once a 328 has optiboot, it acts more like an Uno than an Duemilanove (the upload speed is different.)   (hmm.  I don't think I mentioned that, did I?) (similarly, if you put optiboot on an Atmega8 or Atmega168, you need to create NEW board entries to reflect the change in upload speed (and memory available.)

Logged

GA
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh...  No I didn't select UNO from the board list.  Thanks, I'll try that tonight when I get home from work and I'll let you know.

Thanks again.
Logged

Romania
Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

can i run this bootloader on an atmega8 with its internal oscillator ?
Logged


0
Offline Offline
Shannon Member
****
Karma: 207
Posts: 12200
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Selecting board = UNO means '16MHz 328P optiboot',  Duemilanova means '16MHz 328P old-bootloader'.
Logged

[ I won't respond to messages, use the forum please ]

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

Quote
can i run this bootloader on an atmega8 with its internal oscillator ?
In theory.  The makefile claims to support old-style Lilypads (m168 running on 8MHz internal osc), but there is not current makefile entry for the m8 in that configuration.  None of the internal oscillator (or other non-16MHz) options have been tested with the latest code (efforts are focused on the production Arduinos...)
Logged

GA
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Success.  Just selected Arduino UNO from the board menu, loaded the sample fade sketch, and all is working OK.

Thanks for the help, MarkT and westfw.
Logged

Romania
Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
can i run this bootloader on an atmega8 with its internal oscillator ?
In theory.  The makefile claims to support old-style Lilypads (m168 running on 8MHz internal osc), but there is not current makefile entry for the m8 in that configuration.  None of the internal oscillator (or other non-16MHz) options have been tested with the latest code (efforts are focused on the production Arduinos...)


ok ill try to change the make file for the atmega8 and try to compile it - ill post my results here
Logged


Romania
Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so i modified the entry for atmega8 to this
Code:
atmega8: TARGET = atmega8
atmega8: MCU_TARGET = atmega8
atmega8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
atmega8: AVR_FREQ = 8000000L
atmega8: LDSECTIONS  = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe
atmega8: $(PROGRAM)_atmega8.hex
atmega8: $(PROGRAM)_atmega8.lst

atmega8_isp: atmega8
atmega8_isp: TARGET = atmega8
atmega8_isp: MCU_TARGET = atmega8
# SPIEN, CKOPT, Bootsize=512B
atmega8_isp: HFUSE = CC
# 2.7V brownout, 8mhz int rc osc 6ck+64ms
atmega8_isp: LFUSE = A4
atmega8_isp: isp

then i had to edit this line
Code:
ISPFUSES    = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
-e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m -U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m
because atmega8 doesn't support the efuse
but i can upload only once after i burn the bootloader - any ideas ?
im testing from ubuntu 10.10 32bit

later that day - after a few more tries (burning the bootloader) finally i can upload more than one sketch on the atmega8
tested via the ftdi chip and via a serial port (with an max232 adapter)

also what its the bootloader size so i can change the value in board.txt file ?
« Last Edit: August 05, 2011, 12:48:10 pm by putyn » Logged


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

Optiboot uses a 512 byte boot section, leaving 7680 bytes for your sketch.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can I read/write to EEPROM with avrdude -U option?
Logged

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

Optiboot cannot read or write EEPROM at all.
You could use AVR dude with a "real device programmer" connected to the ISP connector to read/write EEPROM.

Hmm.  A variation of the ArduinoISP sketch could be used to let the device program it's own EEPROM ...
Logged

Pages: 1 2 [3] 4 5 ... 23   Go Up
Jump to: