| Author |
Message |
|
|
Posted: Apr 30, 2010 - 10:39 AM |
|


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark
|
|
@30-apr-2010
Build a toolchain on Ubuntu 10.04 LTS - i386
avr-gcc-4.3.4-avrfreaks-30-apr-2010-u10.04.i386
Get it here
http://www.wrightflyer.co.uk/avr-gcc/
The only change to the toolchain is , the substitution of insight6.8 with insight 6.8.1
I will try to see if i can build an x64 version during the weekend.
/Bingo |
|
|
| |
|
|
|
|
|
Posted: May 01, 2010 - 10:07 AM |
|


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark
|
|
|
|
|
|
|
Posted: May 06, 2010 - 10:21 AM |
|

Joined: Aug 10, 2006
Posts: 43
|
|
Hi all,
however I used winavr on windows, I'm a novice in using avr-gcc on Linux. Winavr gave me the comfort to forget Makefile and now I'm in trouble.
I suppose I got the message below due to the wrong setting of makefile:
steve@apa:~/projects/avr/galvan$ make
avr-gcc -I. -I/usr/local/avr/avr/include -g -mmcu=atmega16 -Os -fpack-struct -fshort-enums -funsigned-bitfields -funsigned-char -Wall -Wstrict-prototypes -Wa,-ahlms=galvan.lst -c galvan.c -o galvan.o
avr-gcc -Wl,-Map,galvan.out.map -mmcu=atmega16 -lm /usr/local/avr/avr/lib -o galvan.out galvan.o
/usr/lib/gcc/avr/4.3.4/../../../avr/bin/ld: crtm16.o: No such file: No such file or directory
make: *** [galvan.out] Error 1
However I've asked Google and man as well, I didn't find the proper switches and paths for the "LIBS=" line of Makefile.
Please help me to start...
Thanks,
Istvan |
|
|
| |
|
|
|
|
|
Posted: May 06, 2010 - 01:17 PM |
|

Joined: Dec 15, 2008
Posts: 923
Location: Brisbane, Australia
|
|
|
dircon wrote:
/usr/lib/gcc/avr/4.3.4/../../../avr/bin/ld: crtm16.o: No such file: No such file or directory
make: *** [galvan.out] Error 1[/i]
Is this installed using one of the above .deb packages, the script, or did you apt-get the avr-gcc ?
-- Damien |
|
|
| |
|
|
|
|
|
Posted: May 06, 2010 - 01:44 PM |
|

Joined: Aug 10, 2006
Posts: 43
|
|
|
Quote:
Is this installed using one of the above .deb packages, the script, or did you apt-get the avr-gcc ?
It was installed by using the .deb package.
Istvan |
|
|
| |
|
|
|
|
|
Posted: May 06, 2010 - 01:45 PM |
|

Joined: Dec 15, 2008
Posts: 923
Location: Brisbane, Australia
|
|
|
dircon wrote:
Quote:
Is this installed using one of the above .deb packages, the script, or did you apt-get the avr-gcc ?
It was installed by using the .deb package.
Istvan
Can you please output the following command?
Code:
damien@damien-desktop:~$ which avr-gcc
/usr/local/avr/bin/avr-gcc
|
|
|
| |
|
|
|
|
|
Posted: May 06, 2010 - 02:35 PM |
|

Joined: Aug 10, 2006
Posts: 43
|
|
|
Quote:
Can you please output the following command?
Code:
damien@damien-desktop:~$ which avr-gcc
/usr/local/avr/bin/avr-gcc
Uhhh... yes, a few hours later. You know, I am working now and the problem is at my home computer. (It is a hobby project.) I will check as I get home.
Istvan |
|
|
| |
|
|
|
|
|
Posted: May 06, 2010 - 08:59 PM |
|

Joined: Aug 10, 2006
Posts: 43
|
|
Damien,
you hit the nail on the head:
The command "which" says avr-gcc is here:
/usr/bin/avr-gcc
but there is another one in:
/usr/local/avr/bin/avr-gcc
Perhaps the first is from an unsuccessful installation - I guess due to the old date.
steve@apa:/usr/bin$ ls -l /usr/bin/avr-gcc
-rwxr-xr-x 2 root root 199912 2009-11-27 15:20 /usr/bin/avr-gcc
steve@apa:/usr/bin$ ls -l /usr/local/avr/bin/avr-gcc
-rwxr-xr-x 2 root root 203932 2010-04-30 10:43 /usr/local/avr/bin/avr-gcc
But "apt-get remove" says there is no avr-gcc file - in contrast of "which" who says avr-gcc is here:
/usr/bin/avr-gcc
Shell I delete all avr related programs from /usr/bin/ manually?
Istvan |
|
|
| |
|
|
|
|
|
Posted: May 07, 2010 - 09:53 AM |
|


Joined: Jul 18, 2005
Posts: 62922
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
To find out what .deb's are installed use:
Code:
dpkg --get-selections
to filter the results maybe try
Code:
dpkg --get-selections | grep gcc
To find out which files "belong" to a specific .deb and will be removed if you either "apt-get remove" or "dpkg -r" it then use:
Code:
dpkg -L <name_of_package_without_.deb_extension>
|
_________________
|
| |
|
|
|
|
|
Posted: May 07, 2010 - 11:19 AM |
|

Joined: Aug 10, 2006
Posts: 43
|
|
|
Quote:
To find out which files "belong" to a specific .deb and will be removed if you either "apt-get remove" or "dpkg -r" it then use:
Code:
dpkg -L <name_of_package_without_.deb_extension>
Unfortunately it does not help. It seems that avr toolchain was installed from source and was not a .deb package. I've tryed to setup a toolchain earlier and now I am probably hindered due to the rest of that unsuccesful experiment. I have no idea how to remove a program installed from source. So I guess I should
- remove Bingo's package
- then manually clean up /usr/bin directory from all avr-related programs
- and then re-install Bingo's package.
Any better idea? |
|
|
| |
|
|
|
|
|
Posted: May 09, 2010 - 02:37 PM |
|


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark
|
|
|
dircon wrote:
. I have no idea how to remove a program installed from source. So I guess I should
- remove Bingo's package
- then manually clean up /usr/bin directory from all avr-related programs
- and then re-install Bingo's package.
Any better idea?
Technically you could make sure that /usr/local/avr/bin is on your path before the "other" place/package is.
But i'd clean out the "other" place , just to be sure.
There is no need for uninstalling the .deb
The deb only install files in /usr/local/avr , and as long as you don't touch anything there , you can leave it installed.
/Bingo |
|
|
| |
|
|
|
|
|
Posted: May 10, 2010 - 10:54 AM |
|

Joined: Aug 10, 2006
Posts: 43
|
|
|
Quote:
There is no need for uninstalling the .deb
The deb only install files in /usr/local/avr , and as long as you don't touch anything there , you can leave it installed
Thanks for all the answers.
The key of the mystery was the path. I've supposed the /usr/local/avr/bin path will be added to my path by the script - and even worse, there was that forgotten, partly aborted version of avr toolchain.
Now as I set the path, everything is right. Thanks for the script, Bingo!
Istvan |
|
|
| |
|
|
|
|
|
Posted: May 10, 2010 - 11:11 AM |
|


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark
|
|
| [quote="dircon"]
Quote:
I've supposed the /usr/local/avr/bin path will be added to my path by the script
Istvan
Nope
Neither the buildscript , nor the .deb packages adds /usr/local/avr/bin to the path.
This is left for the "user" to do , and will prob never change.
/Bingo |
|
|
| |
|
|
|
|
|
Posted: May 10, 2010 - 11:59 AM |
|


Joined: Jul 18, 2005
Posts: 62922
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
Bingo,
It took me a while to remember how to do PHP but I've updated the index.php on the website to give some very brief instructions including a note about setting the PATH
Cliff |
_________________
|
| |
|
|
|
|
|
Posted: May 10, 2010 - 03:51 PM |
|


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark
|
|
|
clawson wrote:
Bingo,
It took me a while to remember how to do PHP but I've updated the index.php on the website to give some very brief instructions including a note about setting the PATH
Cliff
Naajzzz
Thanx Cliff
/Bingo |
|
|
| |
|
|
|
|
|
Posted: May 14, 2010 - 09:53 AM |
|

Joined: Apr 27, 2010
Posts: 103
|
|
Hi,
I'm using avr-gcc-4.3.4-avrfreaks-09-mar-2010.deb package and I'm trying to program an avr ATXMega256A3. Compiling with avr-gcc and flashing with avrdude works great. I use an MKII Jtag ICE to upload the application on the flash and I'm trying on chip debugging. It looks like on chip debugging is working right as when I hit CTRL+C it stops running and gdb tells me the instruction where the application stopped.
However I can't watch / display variables nor set/delete breakpoints.
Xmega256A3 data is store in SRAM (0x802000 <-> 0x805FFF). when I try to print a variable, and watch avarice debug, I see something like this:
Code:
GDB: <m800001,2>
GDB: Read 2 bytes from 0x800001
jtagRead
command[tries: 1, size: 10]:
0x05 0xA0 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00
recv: 0x1b
recv: 0x19
recv: 0x00
recv: 0x03
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 3 bytes
read: 82 20 00
recv: 0xde
recv: 0xea
CRC OK
Got message seqno 25 (command_sequence == 25)
response: 82 20 00
->GDB: 0020
As you can see from the debug information, gdb asks for location (0x800000 + 1) and does not account for the data offset NOR for the fact that data is stored on the ATXMega starting from the higher addresses (0x805FFF) up to the lower ones).
I wonder if it's gdb or avarice responsibility to account for these offsets...
I'd really appreciate your help guys...
Thankx in advance
I'm be waiting for any comment help hint or scolding me..
R |
|
|
| |
|
|
|
|
|
Posted: May 14, 2010 - 08:29 PM |
|


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark
|
|
|
|
|
|
|
Posted: Jun 04, 2010 - 06:58 PM |
|


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark
|
|
@04-jun-2010
Updated the buildscript to build insight 6.8-1
/Bingo |
|
|
| |
|
|
|
|
|
Posted: Jun 30, 2010 - 08:35 PM |
|


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark
|
|
|
|
|
|
|
Posted: Sep 17, 2010 - 03:03 PM |
|


Joined: Nov 16, 2001
Posts: 411
Location: Grimstad, NO(r)WAY!
|
|
FYI.
Xubuntu 10.04 are missing a few dependencies in its default setup which will make the buildscript fail.
For example does xubuntu not have Patch as a part of its default setup. Nor does it have libx11-dev. You will also find the build complain about termcap missing. In Ubuntu this has been replaced by ncurses lately which should be there. However, the dev package is missing and must be installed.
Code:
Patch:
sudo apt-get install patch
libx11-dev:
sudo apt-get install libx11-dev
Termcap:
sudo apt-get install libncurses5-dev
expat:
sudo apt-get install expat
libbfd.a:
sudo apt-get install libbfd-dev
yacc:
sudo apt-get install bison
flex:
sudo apt-get install flex
|
_________________ Regards
Vidar (Z)
"There is nothing new to be discovered in physics now, All that remains is more and more precise measurement." Lord Kelvin
|
| |
|
|
|
|
|