Go Down

Topic: Optiboot special (Read 1 time) previous topic - next topic

teding

Apr 09, 2013, 10:20 pm Last Edit: Apr 10, 2013, 07:12 am by teding Reason: 1
Dear readers,

How can i make a optiboot version with D13 led move to a other output, Or better removed at all
I tried, omake atmega328 LED_DATA_FLASH=0

westfw

Try omake atmega328 LED_START_FLASHES=0

LED_DATA_FLASHES (which would flash the LED as data is being received, giving you a sort of rx LED function) is off by default (and it turns out that you can only turn it ON on the command line.  Perhaps I should consider that a bug.)

teding

Can I disable the D13 Led function with arg in the makefile, or do i have to
change the makefile

atmega328_NoLed: TARGET = atmega328
atmega328_NoLed: MCU_TARGET = atmega328p
atmega328_NoLed: CFLAGS += '-DLED_START_FLASHES=0' '-DBAUD_RATE=115200'
atmega328_NoLed: AVR_FREQ = 16000000L

westfw

Quote
Can I disable the D13 Led function with arg in the makefile, or do i have to change the makefile

If you've downloaded the latest source code (5.0) from http://code.google.com/p/optiboot/source/checkout (using mercurial), you should be able to do it from the command line with omake atmega328 LED_START_FLASHES=0
If you have older source, you'll need to modify the makefiles.  (but also be aware of http://code.google.com/p/optiboot/issues/detail?id=68 )

pito

Any 5.0 zip available?

westfw

Oh, very well...
http://code.google.com/p/optiboot/downloads/detail?name=optiboot-v5.0.zip&can=2&q=

pito


teding

I went for the mod in optboot.c, But with the arg "LED_START_FLASHES=0"
I get this output.   DLED_START_FLASHES=3' ?

D:\Arduino\arduino-1.0.1\hardware\arduino\bootloaders\optiboot_spec>..\..\..\too
ls\avr\utils\bin\make OS=windows ENV=arduino atmega328 LED_START_FLASHES=0
../../../tools/avr/bin/avr-gcc -g -Wall -Os -fno-inline-small-functions -fno-spl
it-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000L  '-DLED_START_FLA
SHES=3' '-DBAUD_RATE=115200'

So I changed the makeFile aswell to DLED_START_FLASHES=0'

westfw

I was sort-of hoping to get out of the "business" of providing .hex and .lst files from the repository.
Once you get out of "standard" boards, the names/files don't contain enough information about the target, and the diffs resulting from edits are annoyingly large even for minor (or zero) changes in the actual code.

Quote
But with the arg "LED_START_FLASHES=0"
I get this output.   DLED_START_FLASHES=3' ?

Looking into it.  I didn't actually test the builds under windows :-(

westfw

Quote
I went for the mod in optboot.c

You did update both optiboot.c AND the makefile as per the repository, right?  Both files have changed and both changes are needed to get the ability to specify options on the make command line.

What you get is the ability to make "custom" versions of the binaries without ADDITIONAL (user) modifications to either the source or the makefile...

It did work for me:
F:\bin\arduino-1.0.1\hardware\arduino\bootloaders\Optiboot5.0>.\omake atmega328 LED_START_FLASHES=0

F:\bin\arduino-1.0.1\hardware\arduino\bootloaders\Optiboot5.0>..\..\..\tools\avr\utils\bin\make OS=windows ENV=arduino atmega328 LED_START_FLASHES=0
BAUD RATE CHECK: Desired: 115200, Real: 117647, UBRRL = 16, Error=-2.1%
../../../tools/avr/bin/avr-gcc -g -Wall -Os -fno-inline-small-functions -fno-spl
it-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000L  -DBAUD_RATE=1152
00 -DLED_START_FLASHES=0       -c -o optiboot.o optiboot.c
optiboot.c:256:2: warning: #warning BAUD_RATE error greater than -2%
optiboot.c:305: warning: 'flash_led' declared 'static' but never defined
../../../tools/avr/bin/avr-gcc -g -Wall -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000L  -DBAUD_RATE=115200 -DLED_START_FLASHES=0     -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe -Wl,--relax -Wl,--gc-sections -nostartfiles -nostdlib -o optiboot_atmega328.elf optiboot.o
../../../tools/avr/bin/avr-size optiboot_atmega328.elf
   text    data     bss     dec     hex filename
    444       0       0     444     1bc optiboot_atmega328.elf
../../../tools/avr/bin/avr-objcopy -j .text -j .data -j .version --set-section-flags .version=alloc,load -O ihex optiboot_atmega328.elf optiboot_atmega328.hex
..\..\..\tools\avr\bin\avr-objdump -h -S optiboot_atmega328.elf > optiboot_atmega328.lst
rm optiboot.o optiboot_atmega328.elf

F:\bin\arduino-1.0.1\hardware\arduino\bootloaders\Optiboot5.0>


teding

The test I did was with optiboot 4.4,
I will tets with 5.0 later on.

My thanks and respect for all the effort you putting in Optiboot.

Docedison

I also have to Thank You.. Twice, Once for all I've learned from you and the Second is For your "Untiring" work at making OptiBoot the best you know how to do.
Please Keep it up..

Bob
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Go Up