(Outdated) Script for building AVR-GCC 4.5.1 on Linux

Go To Last Post
343 posts / 0 new

Pages

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

Jörg has updated the freebsd avr-gcc repos to 4.5.1 and binutils to 2.20.1.

I uploaded a new buildscript here.
http://www.avrfreaks.net/index.p...

Please comment in that thread.

/Bingo

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

Just tried to build after downloading the latest scripts.
Using Linux Mint V9 LTS 64 bit.
Seems to be a patch error....

(./buildavr-no-insight.sh) patching GCC source
Patching with /home/ken/avrfreaks/build-avr-gcc-4.3.4-binutils-2.20-libc-1.7.1-insight6.8-1a-dude-5.11.1-insight-patch/make-avr-gcc/patches/gcc-4.3.4/patch-200-gcc-4.5.1-libiberty-Makefile.in
patching file libiberty/Makefile.in
Hunk #1 succeeded at 344 (offset 23 lines).
Patching with /home/ken/avrfreaks/build-avr-gcc-4.3.4-binutils-2.20-libc-1.7.1-insight6.8-1a-dude-5.11.1-insight-patch/make-avr-gcc/patches/gcc-4.3.4/patch-300-gcc-4.5.1-fixedpoint-3-4-2010
patching file gcc/config/avr/avr.c
Hunk #1 succeeded at 328 with fuzz 2 (offset 136 lines).
Hunk #2 succeeded at 1581 (offset -41 lines).
Hunk #3 succeeded at 1671 (offset -41 lines).
Hunk #4 succeeded at 2416 (offset -21 lines).
Hunk #5 succeeded at 4218 with fuzz 1 (offset -157 lines).
patching file gcc/config/avr/avr-fixed.md
patching file gcc/config/avr/avr.md
Hunk #1 succeeded at 60 (offset -6 lines).
Hunk #2 succeeded at 121 with fuzz 2 (offset -69 lines).
Hunk #3 succeeded at 131 (offset -69 lines).
Hunk #4 FAILED at 237.
Hunk #5 succeeded at 215 (offset -68 lines).
Hunk #6 FAILED at 348.
Hunk #7 succeeded at 283 (offset -89 lines).
Hunk #8 succeeded at 299 (offset -89 lines).
Hunk #9 succeeded at 327 (offset -88 lines).
Hunk #10 succeeded at 336 (offset -88 lines).
Hunk #11 succeeded at 879 (offset -86 lines).
Hunk #12 succeeded at 980 (offset -86 lines).
Hunk #13 FAILED at 1654.
Hunk #14 FAILED at 1690.
Hunk #15 FAILED at 1756.
Hunk #16 FAILED at 1776.
Hunk #17 succeeded at 1469 (offset -328 lines).
Hunk #18 FAILED at 1828.
Hunk #19 FAILED at 1848.
Hunk #20 FAILED at 1869.
Hunk #21 FAILED at 1971.
Hunk #22 succeeded at 1604 with fuzz 2 (offset -395 lines).
Hunk #23 FAILED at 2245.
Hunk #24 FAILED at 2275.
Hunk #25 FAILED at 2286.
Hunk #26 FAILED at 2298.
Hunk #27 FAILED at 2312.
Hunk #28 FAILED at 2334.
Hunk #29 FAILED at 2382.
17 out of 29 hunks FAILED -- saving rejects to file gcc/config/avr/avr.md.rej
patching file gcc/config/avr/avr-modes.def
patching file gcc/config/avr/avr-protos.h
Hunk #1 succeeded at 87 with fuzz 2 (offset 3 lines).
patching file gcc/config/avr/libgcc-fixed.S
patching file gcc/config/avr/libgcc.S
Hunk #1 succeeded at 166 (offset 4 lines).
Hunk #2 succeeded at 194 (offset 4 lines).
Hunk #3 succeeded at 202 (offset 4 lines).
Hunk #4 succeeded at 239 (offset 4 lines).
Hunk #5 succeeded at 594 (offset 4 lines).
Hunk #6 succeeded at 830 with fuzz 2 (offset -119 lines).
patching file gcc/config/avr/t-avr
Hunk #1 succeeded at 2 (offset -34 lines).
Hunk #2 succeeded at 21 (offset -35 lines).
patching file gcc/cse.c
Hunk #1 succeeded at 3494 (offset -209 lines).
patching file gcc/dwarf2out.c
Hunk #1 succeeded at 8692 (offset -3325 lines).
Hunk #2 FAILED at 15488.
1 out of 2 hunks FAILED -- saving rejects to file gcc/dwarf2out.c.rej
patching file gcc/fold-const.c
Hunk #1 succeeded at 11716 (offset -589 lines).
patching file gcc/varasm.c
Hunk #1 succeeded at 2579 (offset -130 lines).
(./buildavr-no-insight.sh) gcc patching failed

Jorg's latest scripts DID work.
http://www.avrfreaks.net/index.p...

So now I have a nice new GCC 4.5.1 avr toolset. (I left out the insight build, I'll probably use GDB with eclipse.)

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

@kscharf

Patching with /home/ken/avrfreaks/build-avr-gcc-4.3.4-binutils-2.20-libc-1.7.1-insight6.8-1a-dude-5.11.1-insight-patch/make-avr-gcc/patches/gcc-4.3.4/patch-200-gcc-4.5.1-libiberty-Makefile.in

This looks like a "MixUp" to me.
The extract directory indicates 4.3.4 and the patches indicates 4.5.1

Ahh . Cr...pppp , i think Jörg (FreeBSD) only have one set of active patches , and they're now for 4.5.1

I'll have to update the buildscript in the sticky to 4.5.1

Thanx for reporting

/Bingo

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

Updated the script in the sticky

And replaced avr-insight with avr-gdb , as insight is alwaus giving troubles with the patches.
This will be the end of avr-insight in the buildscript.

Comments & Tips should go here
http://www.avrfreaks.net/index.p...

/Bingo

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

Basically added the new avr-libc-1.8.0 to the "old 4.5.1" version.

See & comment here

http://www.avrfreaks.net/index.p...

/Bingo

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

Ubuntu 11.10's repositories, have in them:

avr-binutils 2.20.1
avr-gcc 4.5.3
avr-libc 1.7.1
avr-gdb 7.2 (no avr insight, but ddd can be used with this)
avrdude 5.10
avarice 2.10

Are these basically the same as the debs and build scripts here or are they missing something? Or are these fine?

They seem to be being maintained by a guy called Hakan Ardo of Debian.

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

Quote:

or are they missing something?

Who knows! (which is the problem). In the past the Ubuntu repo maintainers were crap (worse than Atmel's "toolchain" team!) and hadn't a clue about building an avr-gcc distribution. That may have changed - I think there was a post here recently from someone newly assigned to take on the work and looking for advice.

Meanwhile folks such as Joerg, Eric, Georg-Johan, Bingo know a whole lot more about which patches are an absolute necessity for any particular version of GCC/AVR-LibC so I'd tend to stick to builds they've had a hand in if I were you.

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

Hm, Håkan Ardö you say. I'll ask him next time I see him.

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

I just got this PM from a gentoo guy.

Quote:

Hi Bingo,

I saw your post [1] and also your toolchain repository [2]. Good work and thanks for making the build scripts open source. I took your patches fetched from one of your build scripts [3] and created a small gentoo overlay for them, they applied cleanly. I built and packaged the toolchain for x86_64 [4].

If you have any gentoo users ,needing gentoo packages , just point them here so they can get a *proper* toolchain for gentoo.

Sorry, but I don't have an x86 machine at my disposal right now, otherwise I would have packaged an i386 toolchain as well. There are instructions at [4] for building from source though.

Cheers,

Chris

http://www.avrfreaks.net/index.p...
[2] http://www.wrightflyer.co.uk/avr...
[3] build-avr-gcc-4.5.1-binutils-2.20.1-libc-1.8.0-gdb-7.3.1-dude-5.11.1-avarice-2.12.zip
[4] http://code.google.com/p/gentoo-...

So there should be a gentoo build here
http://code.google.com/p/gentoo-...

/Bingo

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

Hi, for CentOS look at this build script:
http://www.avrfreaks.net/index.p...

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

Thread diversion about GCC/Linux/256K moved to here:

GCC versions for use on 256K (Linux)

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

Hi All,

There is a problem still exist when you try to use avr-gcc with devices which has more than 64k of the flash memory.

Whole problem is described in the thread:
http://www.avrfreaks.net/index.p...

Is it possible to apply patches from above thread ?

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

But did you follow the link to the GCC bug report?

http://gcc.gnu.org/bugzilla/show...

Georg-Johann Lay (SprinterSB on this board) fixed it in April 2011. So GCC versions issued after that should have the problem fixed. Maybe try one of his 4.7 builds?

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

Can someone apply above patch (for 256k devices) to 4.5.1 ???

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

I can't ...
I'm tracking the FreeBSD repos , and won't change that decision.

/Bingo

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

What about it? It has its status set to "RESOLVED INVALID", i.e. it is not a bug. Did you read the complete bug report including the lengthy explanation at the end by Georg-Johann?

EDIT: And PLEASE do not cross post! (http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=937032&highlight=#937032)

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

I built the avr-gcc tools using the script on this thread to build the 4.5.1 version. It built several compiler executables including avr-gcc, avr_g++, avr_c++. Arduino is giving me the following error:
error: Cannot run program "avr-g++":, the manual states a missing avr-gcc-c++ program. Maybe it expects a simlink to avr-c++ or avr-g++? Any ideas?

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

@kscharf

I have an avr-g++ in my dir ,built from the same script

$ ls -l /usr/local/avr/bin 
total 19940
-rwxr-xr-x 1 root root  126332 2012-03-08 17:33 avarice
-rwxr-xr-x 1 root root  598352 2012-03-08 17:33 avr-addr2line
-rwxr-xr-x 2 root root  626868 2012-03-08 17:33 avr-ar
-rwxr-xr-x 2 root root  813460 2012-03-08 17:33 avr-as
-rwxr-xr-x 2 root root  236996 2012-03-08 17:33 avr-c++
-rwxr-xr-x 1 root root  598160 2012-03-08 17:33 avr-c++filt
-rwxr-xr-x 1 root root  232900 2012-03-08 17:33 avr-cpp
-rwxr-xr-x 1 root root  297380 2012-03-08 17:33 avrdude
-rwxr-xr-x 2 root root  236996 2012-03-08 17:33 avr-g++
-rwxr-xr-x 2 root root  232900 2012-03-08 17:33 avr-gcc
-rwxr-xr-x 2 root root  232900 2012-03-08 17:33 avr-gcc-4.5.1
-rwxr-xr-x 1 root root   15975 2012-03-08 17:29 avr-gccbug
-rwxr-xr-x 1 root root   30244 2012-03-08 17:33 avr-gcov
-rwxr-xr-x 1 root root 4169544 2012-03-08 17:36 avr-gdb
-rwxr-xr-x 1 root root 4169549 2012-03-08 17:36 avr-gdbtui
-rwxr-xr-x 1 root root  668752 2012-03-08 17:33 avr-gprof
-rwxr-xr-x 2 root root 1063540 2012-03-08 17:33 avr-ld
-rwxr-xr-x 1 root root    1737 2012-03-08 17:33 avr-man
-rwxr-xr-x 2 root root  611024 2012-03-08 17:33 avr-nm
-rwxr-xr-x 2 root root  813232 2012-03-08 17:33 avr-objcopy
-rwxr-xr-x 2 root root  878352 2012-03-08 17:33 avr-objdump
-rwxr-xr-x 2 root root  626900 2012-03-08 17:33 avr-ranlib
-rwxr-xr-x 1 root root  295296 2012-03-08 17:33 avr-readelf
-rwxr-xr-x 1 root root  650224 2012-03-08 17:36 avr-run
-rwxr-xr-x 1 root root  609616 2012-03-08 17:33 avr-size
-rwxr-xr-x 1 root root  602416 2012-03-08 17:33 avr-strings
-rwxr-xr-x 2 root root  813232 2012-03-08 17:33 avr-strip
-rwxr-xr-x 1 root root    1071 2012-03-08 17:12 ice-gdb
-rwxr-xr-x 1 root root      51 2012-03-08 17:12 ice-insight
-rwxr-xr-x 1 root root     264 2012-03-08 17:12 kill-avarice
-rwxr-xr-x 1 root root     225 2012-03-08 17:12 start-avarice

/Bingo

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

I seem to have avr-c++, avr-g++, and avr-gcc in /usr/local/avr/bin as you do but the arduino ide gives me the error:
"Cannot run program "avr-g++" java:io Exception:error=2, No such file or directory. My path is set so I can find these files from a user terminal shell why can't the Arduino IDE find it? Maybe it's looking on a specific path but I don't know what that is?

The arduino site says to install avr-gcc-c++ whatever THAT is.
Maybe a simlink to something else?

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

NB Atmel have a 4.6.2 for Linux (and Windows) available at:

http://www.atmel.com/tools/ATMEL...

this is the same toolchain that is found in the first release of AVR Studio and is not bad (like some of their previous attempts) and has the advantage of supporting a lot of new AVR models like the USB enabled Xmegas and the small tiny4/5/9/10/20/40 devices.

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

clawson wrote:
NB Atmel have a 4.6.2 for Linux (and Windows) available at:

Cliff,

We're current users of 30-Apr-2010 toolchain (gcc version 4.3.4), though we really only use the compiler, not the debugger or loader (we just use avr studio for a bootloader once).

Is there much of an advantage to Atmel's new toolchain to warrant changing for new projects (targets are generally xmega A4 series).

I did see a code space saving:

Old:

Size after:
AVR Memory Usage
----------------
Device: atxmega128a1

Program:   29822 bytes (21.4% Full)
(.text + .data + .bootloader)

Data:       2478 bytes (30.2% Full)
(.data + .bss + .noinit)

New:

Size after:
AVR Memory Usage
----------------
Device: atxmega128a1

Program:   28844 bytes (20.7% Full)
(.text + .data + .bootloader)

Data:       2478 bytes (30.2% Full)
(.data + .bss + .noinit)

-- Damien

p.s. The script and the ubuntu package is excellent. It saves us a huge number of hours in sorting out our own toolchain on Linux. The effort is deeply appreciated.

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

I wouldn't change for changes sake but if you pick one of the new AVRs then I think this is the only toolchain that has support for the additional models.

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

Ugly hack to build the Atmel 3.4.0 toolchain

http://www.avrfreaks.net/index.p...

Read the whole thread

/Bingo

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

why can't read the script?

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

For building on Fedora 17 see here
http://www.avrfreaks.net/index.p...

/Bingo

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

ftp://ftp.dkuug.dk (for binutils and gcc) Seems to be down. Permanent or just wait?

Its the getfiles.sh that fails.

I may resolve it for binutils by using this link instead (or?)
ftp://ftp.gnu.org/gnu/binutils/b...

And for gcc link
ftp://ftp.gnu.org/gnu/gcc/gcc-4....

Or has it been done changes to the archives that would bring me troubles if using the mentioned ones... I downloaded today, 5.aug...

By the way, if no changes, why not use the above as default in the script?

Regards
Vidar (Z)

----------------------------------------------------------

"The fool wonders, the wise man asks"

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

Goodnight, today I have tried to intall the latest .deb package under ubuntu 12.04 LTS and got this error:

dpkg: error processing avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.i386.deb (--install):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 10 package 'avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.i386':
 blank line in value of field 'Description'
Errors were encountered while processing:
 avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.i386.deb
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

keepcool wrote:
Goodnight, today I have tried to intall the latest .deb package under ubuntu 12.04 LTS and got this error:

dpkg: error processing avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.i386.deb (--install):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 10 package 'avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.i386':
 blank line in value of field 'Description'
Errors were encountered while processing:
 avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.i386.deb

Actually, I got something similar too, though it was on an upgrade from 11.10 to 12.04. The fix is to remove the blank lines in the offending control files (mine were the dpkg cache files over an upgrade where it broke), but it should be fixed more permanently.

-- Damien

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

Personally I'd call that a regression by Canonical in their dpkg utility. They shouldn't have issued a version that cannot install what were considered previously to be valid .debs

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

damien_d wrote:
keepcool wrote:
Goodnight, today I have tried to intall the latest .deb package under ubuntu 12.04 LTS and got this error:

dpkg: error processing avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.i386.deb (--install):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 10 package 'avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.i386':
 blank line in value of field 'Description'
Errors were encountered while processing:
 avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.i386.deb

Actually, I got something similar too, though it was on an upgrade from 11.10 to 12.04. The fix is to remove the blank lines in the offending control files (mine were the dpkg cache files over an upgrade where it broke), but it should be fixed more permanently.

-- Damien

Could you explain how to do that?

Yes, I think the dpkg throwing an error because a blank description line is a bit dumb.

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

You can use:

ar x package.deb

to gain access to the control and data files inside a .deb and then

tar xvzf control.tar.gz

to (for example) access the control files.

Within that control.tar.gz I only see one file ("control") and to be honest I cannot actually see what's wrong with the Description field in that but I downloaded the x64 version of 4.5.1, perhaps it's different in the i386 one. Having said that I'm not sure what the rules are about "Decription:" (the Debian packager manual will say). Maybe it needs line continuation characters or something?

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

I'm trying to build an older version for compatibility with Arduino-0023.

//ftp.dkuug.dk/pub/gnu/ftp/gnu/binutils/binutils-2.19.1.tar.bz2 isn't loading, wonder if the site is down?

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

I think I have 0023 on my machine, do you want a zipped copy of the WinAVR within it?

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

clawson wrote:
I think I have 0023 on my machine, do you want a zipped copy of the WinAVR within it?

Thanks, but I need it for Linux. I'm running Mint/Ubuntu (Mint uses Ubuntu packages) and the current version doesn't work with 0023 for some reason.

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

Edit the getfiles.sh and for binutils use the following

wget -c ftp://ftp.gnu.org/gnu/binutils/binutils-2.19.1a.tar.bz2

dkuug.dk has never worked for me so I have latest year been editing the file with above. I am using mint aswell as ubuntu on diferent machines.

Regards
Vidar (Z)

----------------------------------------------------------

"The fool wonders, the wise man asks"

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

Thanks. Had to do that for the gcc-4.2.4.tar.bz2 files as well...

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

I modified your link to get binutils-2.19.1 instead of 1a since that is what the script called for. Alas no joy....

$ sudo ./buildavr-no-insight.sh
(./buildavr-no-insight.sh) about to build and install avr GNU development tools using
(./buildavr-no-insight.sh) the following settings (override via the command line):
(./buildavr-no-insight.sh)
(./buildavr-no-insight.sh) archive=/home/ken/avr/avrtools/build-avr-gcc-4.2.4-libc-1.6.7-insight6.8-arch25-fix/make-avr-gcc (location of source tarballs)
(./buildavr-no-insight.sh) prefix=/usr/local/avr (installation prefix/directory)
(./buildavr-no-insight.sh) buildlog=/tmp/buildavr.log (build log)
(./buildavr-no-insight.sh)
(./buildavr-no-insight.sh) proceed? [y/n] y
(./buildavr-no-insight.sh)
(./buildavr-no-insight.sh) /usr/local/avr already exists, continue? [y/n] y
(./buildavr-no-insight.sh) installing avarice source
avarice-2.10
avarice-2.10/config-aux
avarice-2.10/configure.ac
avarice-2.10/aclocal.m4
avarice-2.10/Makefile.am
avarice-2.10/Makefile.in
avarice-2.10/avarice.spec.in
avarice-2.10/configure
avarice-2.10/AUTHORS
avarice-2.10/COPYING
avarice-2.10/ChangeLog
avarice-2.10/INSTALL
avarice-2.10/NEWS
avarice-2.10/scripts
avarice-2.10/src
avarice-2.10/doc
avarice-2.10/avarice.spec
avarice-2.10/doc/Makefile.am
avarice-2.10/doc/Makefile.in
avarice-2.10/doc/ice-gdb.1
avarice-2.10/doc/ice-insight.1
avarice-2.10/doc/avarice.1
avarice-2.10/doc/README.cygwin
avarice-2.10/doc/avrIceProtocol.txt
avarice-2.10/doc/running.txt
avarice-2.10/doc/todo.txt
avarice-2.10/src/Makefile.am
avarice-2.10/src/Makefile.in
avarice-2.10/src/autoconf.hin
avarice-2.10/src/avarice.h
avarice-2.10/src/crc16.h
avarice-2.10/src/crc16.c
avarice-2.10/src/devdescr.cc
avarice-2.10/src/ioreg.cc
avarice-2.10/src/ioreg.h
avarice-2.10/src/jtag.h
avarice-2.10/src/jtag1.h
avarice-2.10/src/jtag2.h
avarice-2.10/src/jtag2bp.cc
avarice-2.10/src/jtag2io.cc
avarice-2.10/src/jtag2misc.cc
avarice-2.10/src/jtag2prog.cc
avarice-2.10/src/jtag2run.cc
avarice-2.10/src/jtag2rw.cc
avarice-2.10/src/jtag2_defs.h
avarice-2.10/src/jtag2usb.cc
avarice-2.10/src/jtagbp.cc
avarice-2.10/src/jtaggeneric.cc
avarice-2.10/src/jtagio.cc
avarice-2.10/src/jtagmisc.cc
avarice-2.10/src/jtagprog.cc
avarice-2.10/src/jtagrun.cc
avarice-2.10/src/jtagrw.cc
avarice-2.10/src/main.cc
avarice-2.10/src/remote.cc
avarice-2.10/src/remote.h
avarice-2.10/src/utils.cc
avarice-2.10/src/gnu_getopt.c
avarice-2.10/src/gnu_getopt.h
avarice-2.10/src/gnu_getopt1.c
avarice-2.10/scripts/Makefile.am
avarice-2.10/scripts/Makefile.in
avarice-2.10/scripts/ice-gdb.in
avarice-2.10/scripts/gdb-avarice-script
avarice-2.10/scripts/start-avarice
avarice-2.10/scripts/kill-avarice
avarice-2.10/scripts/ice-insight
avarice-2.10/config-aux/depcomp
avarice-2.10/config-aux/install-sh
avarice-2.10/config-aux/missing
(./buildavr-no-insight.sh) configuring avarice source
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for perl... /usr/bin/perl
checking for library containing gethostbyname... none required
checking for socket... yes
checking for library containing inet_aton... none required
checking for iconv_open in -liconv... no
checking for libiconv_open in -liconv... no
checking for dcgettext in -lintl... no
checking for xmalloc in -liberty... yes
checking for bfd_init in -lbfd... yes
checking for usb_get_string_simple in -lusb... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking bfd.h usability... yes
checking bfd.h presence... yes
checking for bfd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for socklen_t... yes
checking whether libbfd requires libz... no
checking for error_at_line... yes
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for working memcmp... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for vprintf... yes
checking for _doprnt... no
checking for atexit... yes
checking for gethostbyname... yes
checking for inet_ntoa... yes
checking for memmove... yes
checking for memset... yes
checking for select... yes
checking for socket... (cached) yes
checking for strcasecmp... yes
checking for strerror... yes
checking for strtol... yes
configure: creating ./config.status
config.status: creating scripts/Makefile
config.status: creating scripts/ice-gdb
config.status: WARNING: '../../source/avarice-2.10/scripts/ice-gdb.in' seems to ignore the --datarootdir setting
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating avarice.spec
config.status: creating Makefile
config.status: creating src/autoconf.h
config.status: src/autoconf.h is unchanged
config.status: executing depfiles commands
(./buildavr-no-insight.sh) building avarice
Making all in scripts
make[1]: Entering directory `/usr/local/avr/build/avarice-2.10/scripts'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/avr/build/avarice-2.10/scripts'
Making all in src
make[1]: Entering directory `/usr/local/avr/build/avarice-2.10/src'
make all-am
make[2]: Entering directory `/usr/local/avr/build/avarice-2.10/src'
g++ -DHAVE_CONFIG_H -I. -I../../../source/avarice-2.10/src -g -O2 -MT jtag2usb.o -MD -MP -MF .deps/jtag2usb.Tpo -c -o jtag2usb.o ../../../source/avarice-2.10/src/jtag2usb.cc
../../../source/avarice-2.10/src/jtag2usb.cc: In function ‘usb_dev_handle* opendev(const char*, emulator, int&)’:
../../../source/avarice-2.10/src/jtag2usb.cc:98:42: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
../../../source/avarice-2.10/src/jtag2usb.cc: In function ‘void childhandler(int)’:
../../../source/avarice-2.10/src/jtag2usb.cc:249:34: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
make[2]: *** [jtag2usb.o] Error 1
make[2]: Leaving directory `/usr/local/avr/build/avarice-2.10/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/avr/build/avarice-2.10/src'
make: *** [all-recursive] Error 1

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

Quote:

error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]

So change that option perhaps?

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

clawson wrote:
Quote:

error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]

So change that option perhaps?

You mean edit the sources? Or is the problem due to a change in GCC since the script was written (IE: the GCC I'm using to compile the tools)? Editing the sources worries me, I'd wonder if I might have introduced bugs into the tools. I'd like to have some guidance from someone who knows the tool sources.

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

No change that -fpermissive option passed to the compiler. The user manual says:

Quote:
-fpermissive
Downgrade some diagnostics about nonconformant code from errors to warnings. Thus, using -fpermissive will allow some nonconforming code to compile.

On the whole if you convert "const char *" to "char *" it doesn't matter as long as you don't attempt to WRITE through the pointer. I'll bet the code doesn't write and the dropping of "const" was just an oversight.

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

Is it an error or deliberate that you use the old toolchain ?
archive=/home/ken/avr/avrtools/build-avr-gcc-4.2.4-libc-1.6.7-insight6.8-arch25-fix/make-avr-gcc (location of source tarballs)

The current is this one :
build-avr-gcc-4.5.1-binutils-2.20.1-libc-1.8.0-gdb-7.3.1-dude-5.11.1-avarice-2.12-aw.zip
http://www.avrfreaks.net/index.p...

The older toolchains are not tested against the newer compilers (and their "canonicals" strange way to enforce the fix of warnings) , by defaulting to break the build.

So any of the older toolchains is expected to have some "hands on" , when building on a Mint 12 or the likes.

Ohh , and here i'd prob just build avarice-2.12 , instead of 2.10 , and maybe the new avrdude 5.11.1

It has to be the compiler & avr-libc that has to be "old" , not the support programs or ?

/Bingo

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

Well the whole thing started because I'm working on a contract project that started out using Arduino-0023. I saved my source code and the Arduino IDE environment when I upgraded my computer to the latest version of the OS (went from Linux Mint 9 LTS to Mint 13 LTS ... both were 64 bit). What I forgot was that the Arduino Linux IDE didn't come with the avrtools. I had simply used the avr-gcc and related packages from the repository. This worked with the older toolset, but Arduino-0023 seems to have syntax problems with the latest version of GCC. So I'm trying to build the older tools from source.

I may just have to change my project source code to use the newer Arduino IDE. That my actually be easy to do, but the project is now at a state where I'd rather not change too many things at once to avoid some back sliding....

The whole thing stinks of Windows DLL Hell....Deja-vu all over again!

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

Quote:

That my actually be easy to do

I would have thought so. Are the errors anything to do with "const" in the presence of PROGMEM by any chance?

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

Ken try this one (the patches are included , so no get-patches)
I just tried , t builds avarice & avrdude ok

Should be something along (WinAVR 2010)

/Bingo

Attachment(s): 

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

The older TC 2.4

Patches included (afaik they're not in the script in "original" post in the front) , but this one hasn't got the avarice patch (so it'll break somewhere i think).

/Bingo

Attachment(s): 

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

Ohh the reason i include the patches , are ... That they are not on the (get-patches.sh) FreeBSD path anymore.

If available at all (i think the previous set is on the FreeBSD "Attic")

/Bingo

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

Thanks, I'll try the version with the patches for 4.3.3 later this evening when I get home (G job).

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

kscharf wrote:
Thanks, I'll try the version with the patches for 4.3.3 later this evening when I get home (G job).

Did it work ?

/Bingo

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

Thanks Bingo. Didn't get to try it at home, but it just built fine here in the office. A bit scary with all the warnings being spit out, mostly not strict type checking stuff though. Seems to work fine though.

Pages