0
Offline
Newbie
Karma: 0
Posts: 41
Arduino DUE rocks
|
 |
« Reply #90 on: September 27, 2011, 02:19:16 pm » |
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
|
|
|
|
|
Central MN, USA
Offline
Faraday Member
Karma: 35
Posts: 5915
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
|
 |
« Reply #91 on: October 02, 2011, 08:31:40 pm » |
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 
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #92 on: October 02, 2011, 08:46:35 pm » |
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
Faraday Member
Karma: 35
Posts: 5915
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
|
 |
« Reply #93 on: October 02, 2011, 09:29:14 pm » |
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
Full Member
Karma: 0
Posts: 143
|
 |
« Reply #94 on: October 24, 2011, 02:16:50 pm » |
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
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #95 on: October 25, 2011, 04:56:20 pm » |
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
Edison Member
Karma: 25
Posts: 1617
|
 |
« Reply #96 on: October 26, 2011, 02:18:16 pm » |
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
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #97 on: October 26, 2011, 02:39:34 pm » |
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
Edison Member
Karma: 25
Posts: 1617
|
 |
« Reply #98 on: October 26, 2011, 02:52:54 pm » |
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=650I 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
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #99 on: October 30, 2011, 02:59:09 pm » |
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
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #100 on: October 30, 2011, 03:10:12 pm » |
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
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #101 on: October 30, 2011, 03:11:08 pm » |
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
Edison Member
Karma: 11
Posts: 1288
Warning Novice on board! 0 to 1 chance of errors!
|
 |
« Reply #102 on: November 13, 2011, 08:49:10 pm » |
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
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #103 on: November 13, 2011, 11:20:02 pm » |
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
Full Member
Karma: 0
Posts: 174
|
 |
« Reply #104 on: November 17, 2011, 03:01:41 pm » |
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 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
|
|
|
|
|
|