Pages: 1 ... 5 6 [7] 8 9 ... 23   Go Down
Author Topic: New optiboot; beta testers welcome...  (Read 107105 times)
0 Members and 4 Guests are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 41
Arduino DUE rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, do I have something wrong or this bootloader used on Arduino 2009 doesn't auto reset after uploading a new sketch?

Is this problem fixed anywhere?

Thanks.
Logged

Check all my projects based on Atmel/Arduino -> www.aqualed-light.com

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 74
Posts: 7255
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Everything works great! Just a suggestion:

Add a sound effect for success and failure. I modified your code to feed back on whether bootloading was successful or not with a buzzer. This way the arduino needs not to be connected to a PC. Just plug in to ac adapter and pay attention to the sound played on the buzzer smiley
Logged


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

Quote
Add a sound effect for success and failure.
You're talking about optiLoader rather than bootloader itself, right?
Interesting idea.  An LED is more likely (I supposed I could do either.)
Actually, there are all sorts of possibilities if I want the loader to become a featureful stand-alone AVR programmer
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 74
Posts: 7255
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Add a sound effect for success and failure.
You're talking about optiLoader rather than bootloader itself, right?
Interesting idea.  An LED is more likely (I supposed I could do either.)
Actually, there are all sorts of possibilities if I want the loader to become a featureful stand-alone AVR programmer

Yes yes. I meant optiloader. With an audio feedback, you don't have to keep your eyes on the setup. Just go ready the next chip and wait for the tune. Here is my setup using your optiloader:

Here is my setup:



I just freed my UNO from this setup after putting the ATMEGA328P on the breadboard and added a TTL USB adapter, just in case if the failure tone plays.
Logged


Berks, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 153
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is the hexfile attached in the first post the latest version? Or if not, where specifically can I download it from?

TIA
Texy
Logged

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

Yes, the hexfile attached should be the same as the most recent version.
There has been one edit since then that changed the way builds work on windows systems with WINAVR installed that wanted to use the Arduino-provided compiler instead, bu no change to the actual bootloader.

(the "most recent" is always going to be the one in the source code repository at github/westfw rather than any one static spot.
Also, as of earlier this month, this version has been "pulled" into the Arduino 1 beta repository, so the same hex file should be there as well.  That would be the latest "official" version, consistently.)
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2738
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Given that it sounds like this is moving into the official tree now,
what about the updates to the makefile to use a single avrdude command vs 2 commands when burning the bootloader?
Its a very small change that allows the AVR Dragon to function and also speeds up the overall burning process
for all ISP devices.

--- bill
Logged

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

Quote
single avrdude command vs 2 commands
I can look at doing that within the optiboot makefiles ("make target_isp"), but I think having it take effect when using the "burn bootloader" command from the IDE is beyond the scope of what's included in "optiboot" maintenance.  (I'll look at it anyway.  I'm worried that the current multi-step process is catering to some once-popular-but-now-obscure programmer that won't work with a single command.)
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2738
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's a pretty small change to the makefile.
I posted a sample working makefile in arduino issue #650:
http://code.google.com/p/arduino/issues/detail?id=650

I hear you on the backward compatibility issue. Off the top of my head, I'm not
quite sure what would trip up with the new stuff as I think it essentially does the same
thing just in a single command.
However, you never know.

It is a bit ironic that the avrdude command doesn't properly support the Atmel AVR dragon....
and that the avrdude maintainers seem uninterested in fixing it, especially since it is less
than 6 lines of code to fix it.

If you have some pull on the IDE and they are concerned about making the change to single command,
can they at least up the delay between the two commands?
(They already have a delay, it just isn't long enough to allow the Dragon to work with the existing avrdude command)

But since they already ship a version of avrdude with the IDE, would they be interested in shipping a fixed avrdude?
I have patches for that fix as well - see issue #650.

If avrdude is fixed, then you don't have to modify the IDE or the Makefiles.

--- bill
Logged

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

Just a note about the "official" google code repository at http://code.google.com/p/optiboot/
This was the repository maintained by the original Optiboot Author (Peter Knight), but he's been uncontactable for a while now.  @"Coding Badly" discovered that it's relatively easy to transfer ownership of a google code repository, so it now has new owners until when and if Peter comes back.

I've added a v4.4 zip file to the downloads section there (based on the Arduino file structure) and updated the sources so that they now match (and produce identical binaries for the official Arduino platforms.)

My intent is that source updates (especially those that don't affect Arduino ofifcial platforms) may appear there first, while awaiting the additional testing and release cycle requirements of the Arduino repository, but the general idea is to keep the distributions in sync.  A new .zip file should appear each time changes appear in an Arduino "release", but the optiboot source base itself may be slightly unstable...
Logged

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

Quote
do I have something wrong or this bootloader used on Arduino 2009 doesn't auto reset after uploading a new sketch?
It should auto-reset;  I haven't seen any problems.  Can you be more specific about what you are seeing ?
Logged

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

Quote
It turns out that avrdude resets the USB device when it closes the connection
on all operating system other than FreeBSD
so the USB device (the dragon in this case) must re-enumerate.
This enumeration takes time, if a second avrdude command comes in before
the device is fully enumerated with the OS, the usb device will not be seen.
This causes the second avrdude command to fail.
I've submitted http://code.google.com/p/optiboot/issues/detail?id=46
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

  I have yet to master using Arduino Uno as ISP.   Is there a how-to that shows were all the Optiboot files go? I have downloaded it and I have no idea were to put the files.

Thanks in advance.
Mark


:removed accidental "!"
« Last Edit: November 14, 2011, 09:09:36 am by cyclegadget » Logged


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

In general, find the hardware/arduino/bootloaders/optiboot directory that is part of your arduino distribution, and replace the files in there with the new version (you can always get the old version back, from the original distribution file, if you need it.)
Logged

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

hello, im trying to recompile optiboot for  atmega8 running at  8mhz (int osc),  but i want to set the baud rate at 9600 and when i compile i get this error
Code:
putyn@koala:~/optiboot$ make atmega8
avr-gcc -g -Wall -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega8 -DF_CPU=8000000L   '-DLED_START_FLASHES=3' '-DBAUD_RATE=9600'   -c -o optiboot.o optiboot.c
optiboot.c: In function ‘main’:
optiboot.c:318: error: ‘UART_DDR’ undeclared (first use in this function)
optiboot.c:318: error: (Each undeclared identifier is reported only once
optiboot.c:318: error: for each function it appears in.)
optiboot.c:318: error: ‘UART_TX_BIT’ undeclared (first use in this function)
optiboot.c: In function ‘putch’:
optiboot.c:525: error: ‘UART_PORT’ undeclared (first use in this function)
optiboot.c:526: error: ‘UART_TX_BIT’ undeclared (first use in this function)
optiboot.c: In function ‘getch’:
optiboot.c:563: error: ‘UART_PIN’ undeclared (first use in this function)
optiboot.c:564: error: ‘UART_RX_BIT’ undeclared (first use in this function)
make: *** [optiboot.o] Error 1
putyn@koala:~/optiboot$

any idea how to fix it ?
thanks
Logged


Pages: 1 ... 5 6 [7] 8 9 ... 23   Go Up
Jump to: