SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #30 on: July 27, 2011, 06:48:22 pm » |
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 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
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16440
Don't know what I do
|
 |
« Reply #31 on: July 28, 2011, 02:30:59 am » |
Thanks. I'll wait for news from you 
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #32 on: July 29, 2011, 12:13:26 am » |
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
Newbie
Karma: 0
Posts: 43
Arduino rocks
|
 |
« Reply #33 on: August 03, 2011, 09:37:13 pm » |
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.htmland http://www.sparkfun.com/tutorials/247I 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
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #34 on: August 04, 2011, 04:19:38 am » |
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
Newbie
Karma: 0
Posts: 43
Arduino rocks
|
 |
« Reply #35 on: August 04, 2011, 07:54:55 am » |
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
Full Member
Karma: 0
Posts: 174
|
 |
« Reply #36 on: August 04, 2011, 12:14:34 pm » |
can i run this bootloader on an atmega8 with its internal oscillator ?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Tesla Member
Karma: 71
Posts: 6603
Arduino rocks
|
 |
« Reply #37 on: August 04, 2011, 02:22:35 pm » |
Selecting board = UNO means '16MHz 328P optiboot', Duemilanova means '16MHz 328P old-bootloader'.
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #38 on: August 04, 2011, 05:45:23 pm » |
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
Newbie
Karma: 0
Posts: 43
Arduino rocks
|
 |
« Reply #39 on: August 04, 2011, 07:12:32 pm » |
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
Full Member
Karma: 0
Posts: 174
|
 |
« Reply #40 on: August 05, 2011, 01:54:02 am » |
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
Full Member
Karma: 0
Posts: 174
|
 |
« Reply #41 on: August 05, 2011, 07:17:52 am » |
so i modified the entry for atmega8 to this 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 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
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #42 on: August 05, 2011, 04:53:14 pm » |
Optiboot uses a 512 byte boot section, leaving 7680 bytes for your sketch.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 91
Arduino rocks
|
 |
« Reply #43 on: August 09, 2011, 05:10:57 pm » |
Can I read/write to EEPROM with avrdude -U option?
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #44 on: August 10, 2011, 01:00:59 am » |
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
|
|
|
|
|
|