binutils-avr-2.19

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I want to upgrade my binutils to 2.19. But there are no packages, so I wanted to compile it.

I get the exact same error like here: [PATCH][AVR] fix unsafe uses of sprintf

But that patch doesn't work! It can't be applied, the files are different!

Any ideas? :?

-Angel Angelov
"Humans are stupid."
I'm probably working on a scratch-build rocket or on a PCB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
But that patch doesn't work! It can't be applied, the files are different!

Any ideas?

Take a look at the patch. You only have to modify a few sprintf calls, or alternatively replace "sprintf" by "strcpy" in that lines. You can do this by hand in less than a minute.

Stefan Ernst

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, it works. Now executing "avr-size --version" gives 2.19

But I'm still not satisfied! :P

avr-size under WinAVR under Windoze gives the following output:

AVR Memory Usage
----------------
Device: atmega8

Program:     576 bytes (7.0% Full)
(.text + .data + .bootloader)

Data:          0 bytes (0.0% Full)
(.data + .bss + .noinit)

with the --mcu=atmega8 option.
But the linux version doesn't support the --mcu option, and without it gives this:

   text	   data	    bss	    dec	    hex	filename
    576	      0	      0	    576	    240	remotelauncher.elf

AND I am completely sure that I built it with the AVR target!!!

-Angel Angelov
"Humans are stupid."
I'm probably working on a scratch-build rocket or on a PCB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The avr-size patch that adds -C is included in the WinAVR package

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
The avr-size patch that adds -C is included in the WinAVR package

Do you know where I can find that patch? :)
I googled but found nothing

-Angel Angelov
"Humans are stupid."
I'm probably working on a scratch-build rocket or on a PCB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just said - download WinAVR, it's in there

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did that, and compiled it, but avr-size still doesn't have -C :(

-Angel Angelov
"Humans are stupid."
I'm probably working on a scratch-build rocket or on a PCB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The patch I'm talking about is:

\winavr\source\binutils\2.19\30-binutils-2.19-avr-size.patch

I'll attach it here (with extension changed to .txt)

Cliff

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, that one works. There's only one more problem left: no coff file support in avr-objcopy like in the windoze version.... :(

-Angel Angelov
"Humans are stupid."
I'm probably working on a scratch-build rocket or on a PCB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess that will be this one (I RARd it because its quite big)

Attachment(s):