Pages: 1 ... 17 18 [19] 20 21 ... 23   Go Down
Author Topic: New optiboot; beta testers welcome...  (Read 96381 times)
0 Members and 1 Guest are viewing this topic.
GA
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks!
Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I wanted to try this on some 328p ICs but the sketch doesn't run and I've tried programming the hex file onto the IC with my AVR ISP Mk2 but the IDE refuses to upload the sketch.

Questions

I tried programming the file "optiboot_atmega328.hex" from hardware/arduino/bootloaders/optiboot - Is this the right file?

What sketch space SHOULD be available if optiboot is working?

I'm assuming that maybe it isn't working because the fuses are wrong. - What do I set the fuses to under AVR Studio 5 and the AVR ISP Mk2, I've tried just changing the BOOTSZ to 512W_3E00 but it didn't have an affect and I don't know much about the fuses.

Thanks....

Searches find different answers, tried Ex = FF,  hi = DE & lo = D6 but still comes up with 30720 free and doesn't program
« Last Edit: March 15, 2012, 11:28:41 am by cowasaki » Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Whoops.......

and then set board type to UNO smiley

It is working after all.
Logged

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

I've added (at least theoretically) support for UARTs otehr than UART0 on m644, m1284, and m1280 cpus.  But I don't have hardware that makes it convenient to test such support.  Did some of you say that you had HW that wanted to upload sketches over the 2nd uart?  If so, I can email you a .hex file to try out...
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 524
Posts: 26443
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's interesting. So if a USB/Serial adapter was on either port sketches could be uploaded?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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

It only supports one port at a time; you have to have an optiboot compiled for the specific port that is connected.  I'm not entirely sure when on why you'd want to use some other uart for the bootloader, but then I'm not sure why anyone should be restricted to only uart 0, either...
Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This optiboot is great.  I have a sketch on the 328 that only fits everything using it.

Thanks to everyone involved.....


Just received a bag of mega8u SMD chips and programmed optibook with the fuses as per makefile and all is well.....

Connected a FTDI lead as I would on a 328p ie 0-gnd, 2-VCC, 3-TX, 4-RX, 5 - RESET via 100nF cap

Trying to upload the LED flash sketch with LED connected to pin 17 SCK but upload fails as Arduino NG or older w/ ATmega 8..........

also tried UNO as that is what worked on 328p


Any ideas, at least I know the FTDI lead and IC work.
Logged

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

Quote
upload fails as Arduino NG or older w/ ATmega 8

Yes.  You'll need to modify your boards.txt file to explain to the Arduino system that you have an ATmega8 with extra space and increased speed.  There are several different ways to do this these days, and I haven't quite kept track of them.  But you need to add something like:

Code:
##############################################################

opti8.name=ATmega8 w optiboot
opti8.upload.protocol=stk500
opti8.upload.maximum_size=7680
opti8.upload.speed=115200
opti8.bootloader.low_fuses=0xbf
opti8.bootloader.high_fuses=0xdc
opti8.bootloader.path=optiboot
opti8.bootloader.file=optiboot_mega8.hex
opti8.bootloader.unlock_bits=0x3F
opti8.bootloader.lock_bits=0x0F
opti8.build.mcu=atmega8
opti8.build.f_cpu=16000000L
opti8.build.core=arduino
Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, I will give that a try in the morning, makes sense.
Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually, I managed to try it tonight.....

Added the entry as stated and then..

Compiled it and it says...

Code:
In file included from Blink.cpp:8:
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:212:26: error: pins_arduino.h: No such file or directory

So I copied the file called pins_arduino.h into the directory stated.....

and the error became:

Code:
In file included from /Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:212,
                 from /Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring_private.h:33,
                 from /Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring_digital.c:28:
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:90: error: 'DDRA' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:94: error: 'DDRE' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:95: error: 'DDRF' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:96: error: 'DDRG' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:97: error: 'DDRH' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:99: error: 'DDRJ' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:100: error: 'DDRK' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:101: error: 'DDRL' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:106: error: 'PORTA' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:106: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:106: error: (near initialization for 'port_to_output_PGM[1]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:110: error: 'PORTE' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:110: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:110: error: (near initialization for 'port_to_output_PGM[5]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:111: error: 'PORTF' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:111: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:111: error: (near initialization for 'port_to_output_PGM[6]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:112: error: 'PORTG' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:112: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:112: error: (near initialization for 'port_to_output_PGM[7]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:113: error: 'PORTH' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:113: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:113: error: (near initialization for 'port_to_output_PGM[8]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:115: error: 'PORTJ' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:115: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:115: error: (near initialization for 'port_to_output_PGM[10]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:116: error: 'PORTK' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:116: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:116: error: (near initialization for 'port_to_output_PGM[11]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:117: error: 'PORTL' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:117: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:117: error: (near initialization for 'port_to_output_PGM[12]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:122: error: 'PINA' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:122: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:122: error: (near initialization for 'port_to_input_PGM[1]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:126: error: 'PINE' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:126: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:126: error: (near initialization for 'port_to_input_PGM[5]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:127: error: 'PINF' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:127: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:127: error: (near initialization for 'port_to_input_PGM[6]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:128: error: 'PING' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:128: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:128: error: (near initialization for 'port_to_input_PGM[7]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:129: error: 'PINH' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:129: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:129: error: (near initialization for 'port_to_input_PGM[8]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:131: error: 'PINJ' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:131: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:131: error: (near initialization for 'port_to_input_PGM[10]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:132: error: 'PINK' undeclared here (not in a function)
.....and more.....
Logged

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

Looks like my "not keeping up" caught up with me.  Add the following line as well:
Code:
opti8.build.variant=standard
Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok added that line and removed the file added earlier....

I'm trying to upload blink

This is the error I now get:


Blink.cpp:8:21: error: Arduino.h: No such file or directory
Blink.cpp: In function 'void setup()':
Blink:10: error: 'OUTPUT' was not declared in this scope
Blink:10: error: 'pinMode' was not declared in this scope
Blink.cpp: In function 'void loop()':
Blink:14: error: 'HIGH' was not declared in this scope
Blink:14: error: 'digitalWrite' was not declared in this scope
Blink:15: error: 'delay' was not declared in this scope
Blink:16: error: 'LOW' was not declared in this scope


If I #include the Arduino.h file in the first line I still get the same error ie the Ardunio.h file is still missing.....

Logged

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

Code:
opti8.build.variant=standard
How about:
Code:
opti8.build.variant=arduino:standard
The first line should work OK when added to the boards.txt in the arduino distribution, but the second will be needed if you're adding to one of the boards.txt in the user sketch directories...
Logged

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

Hey, guys.  I have a newbie question...  I'm using a Duemilanove Arduino as my ISP and would like to burn the Optiboot v4.4 bootloader on a new chip.  I've succesfully burned the optiboot bootloader using the avrdude commands in a terminal window.  What I would like to do is use the Arduino 1.0 IDE to do this.

I'v read the instructions here, but how do I confirm that the optiboot bootloader was loaded, as opposed to the standard one?
http://code.google.com/p/optiboot/

Under the Tools -> Board menu, do I choose the Arduino Uno (which is what I'd need to choose when loading sketches with the optiboot bootloader) or Arduino Duemilanove w/ Atmega328 (my Arduino ISP)?

Thanks, in advance.
Logged

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

Quote
do I choose the Arduino Uno
Yes.  Once you have optiboot on an ATmega328, you can start calling it an Arduino Uno.
(If you were to put optiboot on an ATmega8 or ATmega168, you would have to create a new boards.txt entry to change at least the upload bitrate...)
Logged

Pages: 1 ... 17 18 [19] 20 21 ... 23   Go Up
Jump to: