Uploaded a "static" avr-gcc Linux for 64bit

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

I just remade the package here , same sources & patches
http://www.avrfreaks.net/index.p...

But hope i have made the package "static" , ie. includung GMP & MPFR. ... etc..

By doing so i hope it can be used for both 32 & 64 bit machines. As there should be no dependencies of shared libs.
And the toolchain should be "self-contained".

Download the avr-gcc-4.3.3-avrfreaks-25-feb-2010-special-static.deb

For 64bit i would suppose you should force an install
with this command.

dpkg --force-architecture -i .deb

For 32bit

dpkg  -i .deb

Or just "Click" on it ....

Get the package here.
http://www.wrightflyer.co.uk/avr...

Please test & report back

If you want to save the already installed compiler , just do a :

sudo mv /usr/local/avr /usr/local/avr-backup 

Install & test the .deb

If you want to restore the old compiler , uninstall (remove)the .deb package.

And just do a :

sudo mv /usr/local/avr-backup /usr/local/avr  

/Bingo

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

Installed and (very) trivially tested on AMD64:

damien@damien-desktop:~/Desktop$ sudo dpkg --force-architecture -i avr-gcc-4.3.3-avrfreaks-25-feb-2010-special-static.deb

Compiles a very simple loop program without complaints:

int main(void)
{
	while(1)
	{
	}
}

Using the following command:

damien@damien-desktop:~/code/avr/test$ avr-gcc hello.c

It's a start :)

-- Damien

EDIT: I had my $PATH variable already set from a previous installation.

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

@damien

Thanx for trying , and write the command for installing :-)

Please report any further success/failures

/Bingo

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

with avr-gcc-4.3.3-avrfreaks-25-feb-2010-special-static.deb

johnny@johnny-desktop:/mnt/winXP/AVR Dev/The Initial Blink Test$ ls -l
total 45
-rwxrwxrwx 1 root root  3597 2010-03-15 10:03 blink.c
-rwxrwxrwx 1 root root 17509 2010-03-10 22:52 Makefile
-rwxrwxrwx 1 root root 17508 2010-03-09 23:56 Makefile.bak
-rwxrwxrwx 2 root root    51 2010-03-10 00:06 programload.bat
-rwxrwxrwx 2 root root    37 2010-03-10 01:14 remake-and-load.bat
johnny@johnny-desktop:/mnt/winXP/AVR Dev/The Initial Blink Test$ make all

-------- begin --------
avr-gcc (GCC) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Compiling C: blink.c
avr-gcc -c -mmcu=attiny84 -I. -gdwarf-2 -DF_CPU=20000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./blink.lst  -std=gnu99 -MMD -MP -MF .dep/blink.o.d blink.c -o blink.o 
blink.c: In function 'main':
blink.c:38: warning: unused variable 'increaseSpeed'

Linking: blink.elf
avr-gcc -mmcu=attiny84 -I. -gdwarf-2 -DF_CPU=20000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=blink.o  -std=gnu99 -MMD -MP -MF .dep/blink.elf.d blink.o --output blink.elf -Wl,-Map=blink.map,--cref     -lm

Creating load file for Flash: blink.hex
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock blink.elf blink.hex

Creating load file for EEPROM: blink.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
	--change-section-lma .eeprom=0 --no-change-warnings -O ihex blink.elf blink.eep || exit 0

Creating Extended Listing: blink.lss
avr-objdump -h -S -z blink.elf > blink.lss

Creating Symbol Table: blink.sym
avr-nm -n blink.elf > blink.sym

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

Program:    2930 bytes (35.8% Full)
(.text + .data + .bootloader)

Data:          2 bytes (0.4% Full)
(.data + .bss + .noinit)



-------- end --------

johnny@johnny-desktop:/mnt/winXP/AVR Dev/The Initial Blink Test$ avrdude -c usbtiny -p attiny84 -U flash:w:blink.hex
avrdude: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory

That makes me a sad panda.

for reference:

johnny@johnny-desktop:/mnt/winXP/AVR Dev/The Initial Blink Test$ uname -a
Linux johnny-desktop 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux

Let me know if you need any more information. After trying many other packages, I was hoping it would go this time around. But hey, at least it compiled the compiler, and the compiler works :D

A step in the right direction (and more than I could achieve).[/b]

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

Can't you jet apt-get the libreadline stuff it's looking to link against then?

Looking at Synaptic it appears an "apt-get libreadline5" should do it. (there's also a "readline-common" which will probably drag it in if you prefer)

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

clawson wrote:
Can't you jet apt-get the libreadline stuff it's looking to link against then?

Looking at Synaptic it appears an "apt-get libreadline5" should do it. (there's also a "readline-common" which will probably drag it in if you prefer)

@Cliff

Didn't damien try that , just to be bitten again ....
I can't remember.

@StkMtd
Try to see what version of avrdude you can "apt-get".

If you are "lucky" it's recent.

Or just build that one from scratch.

But ... I didn't expect avrdude to cause those probs :-(

Maybe it's the same with avarice & avr-insight/gdb

I can't test , as my new 64bit is waiting for new disks.

/Bingo

Last Edited: Thu. Apr 8, 2010 - 09:54 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:

Didn't damien try that , just to be bitten again ....
I can't remember.

My issue was libmpfr.

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

Afaik GCC works ok , as it's build "static"

But if you get into trouble with avrdude , have a look here.
http://www.avrfreaks.net/index.p...

/Bingo

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

Uploaded a "Real" amd64 package . build on Ubuntu 10.04

avr-gcc-4.3.4-avrfreaks-30-apr-2010-u10.04.x64.deb

http://www.wrightflyer.co.uk/avr...

Please test ....

/Bingo