Re: PIC/Linux
- From: Allan Adler <ara@xxxxxxxxxxxxxxxxxxxx>
- Date: 10 Nov 2006 22:33:30 -0500
Frank-Christian Kruegel writes:
On 10 Nov 2006 00:00:59 -0500, Allan Adler <ara@xxxxxxxxxxxxxxxxxxxx> wrote:
http://www.linuxjournal.com/article/7289
http://cdk4avr.sourceforge.net/
http://www.tuxgraphics.org/electronics/200411/article352.shtml
Mit freundlichen Gruessen
Since I don't possess an AVR and don't know yet exactly what to get, I think
I need to try to figure out which of these tgz files to open and explore.
For example, cdk-abr-simulavr-0.1.2.2-20060709.tgz, by its name, sounds as
though it will let me simulate the AVR without actually having one.
Exactly.
That's encouraging. I have now untarred it and learned that, even if it can
run without an AVR, it apparently can't run without the rest of the software.
Now that I have a lot of the packages, I'm going back and trying to download
some of the documentation. Some of it is in German and I've made an attempt
to read it. Ich spreche jetzt sehr schlecht Deutsch, aber ich kann es sehr
langsam lesen. Dass is sehr gut weil es is besser die Dokumentation langsam
zu lesen. I don't normally have the patience to do so in English.
The third link, to tuxgraphics.org, is fairly specific about binutils-2.15,
while I have binutils-2.10, and gcc-core-3.42, while I have gcc-2.96.
You've got gcc-2.96 for x86. For AVR programming you'll need tools for AVR.
So just do what they write, download these files and compile them.
OK, the first thing they say to do is:
mkdir /usr/local/avr
mkdir /usr/local/avr/bin
export PATH=/usr/local/avr/bin:${PATH}
I'm very picky about what I install on my machine and where I install it.
When I'm installing something like this, I prefer to keep it in my user
directories, instead of on the system as a whole. That makes it a lot easier
for me to back up my system and also a lot easier for me to remove it in case
I decide I don't like having it. (The other link having directions
http://www.linuxjournal.com/articl/7289 seems to agree with the
tuxgraphics site on this point.)
So, I'm going to pretend they didn't tell me to do that, but I'll keep in
mind that I may eventually need to create some directories and put one of
them in my path.
Now let's look at the GNUbinutils instructions:
tar jxvf binutils-2.15.tar.bz2
cd binutils-2.15/
mkdir obj-avr
cd obj-avr
.../configure --target=avr --prefix=/usr/local/avr --disable-nls
make
# as root:
make install
Since I'm going to put this in my private directories, I won't need to be
root to do the installation. Also, I downloaded the tgz version of binutils,
not the tar.bz2 version. So I have to do this differently from what they say
to do. Actually, I don't know where the directory binutils-2.15 is supposed
to live. I guess I can put it wherever I like. I'll just stick it in my
directory ~/AVR/LINUX as /AVR/LINUX/binutils-2.15. Now, where is the varmint?
Actually, it was cdk-avr-binutils-2.16.1-20060708.tgz and when I untarred it
in ~/AVR/LINUX it created various subdirectories of ~/AVR/LINUX/opt and that
is consistent with that the second link:
http://cdk4avr.sourceforge.net
(which is where I downloaded all the stuff from) said would happen. So, maybe
I don't need to create anything even remotely resembling a binutils-2.15
directory. But let's see: I'm still trying to follow the 3rd link:
http://www.tuxgraphics.org/electronics/200411/article352.shtml
and it does have something to say about creating a subdirectory of the
binutils-2.15 I was supposed to create and cd'ing to it in order to run
configure and make. So, where should I go? Well, probably to wherever the
configure program is, i.e. in .. of the mythical directory obj-avr, which
was created as a subdirectory of the mythical directory binutiles-2.15,
i.e. configure should be in the directory binutils-2.15. Wherever it is,
since I untarred the file cdk-avr-binutils-2.16.1-20060708.tgz in the
directory ~/AVR/LINUX, this file configure which I'm going to execute
as ./configure ought to be in *some* subdirectory of ~/AVR/LINUX. But
when I execute
ls -R | grep configure
in ~/AVR/LINUX there is no mention of any such file named configure.
So, it appears that I can't take the next step and I would not have been
able to take this next step even if I had untarred the file inside some
subdirectory of /usr/local/avr or some other subdirectory of /usr. And
then I would have had a mess to clean up, so now I'm really glad I didn't
follow the directions blindly.
Actually, a lot of the files that have turned up in subdirectories of
~/AVR/LINUX/opt have turned out to be executables. So, maybe there is
no make process involved. Maybe what I have downloaded is binaries and
I just have to use them. For example, from the simulavr package, I wound
up with three files in the subdirectory ~/AVR/LINUX/opt/cdk4avr/bin, namely
simulavr simulavr-disp simulavr-vcd
and I was able to run them, except for not having anything else that they
needed to run. So, I'm going to proceed on the theory that I should ignore
most of the instructions I find on the pages:
http://www.tuxgraphics.org/electronics/200411/article352.shtml
http://www.linuxjournal.com/article/7289
even though their selection of topics is probably quite useful. The problem is
that the 3 pages contradict each other in fundamental ways, but I now have
some sense of what to believe and what to disregard.
After I've experimented with this for a while, I'll have a better idea of
what I know, what I don't know, when I knew it and what I wish I had known.
As that process can be quite verbose, and not very interesting, I'll stop
reporting on it until I have something more definite to say.
I guess you are not very familiar with the Linux/Unix development
environment. This would help you in getting started with AVR, since the
tools are basically the same.
I'm certainly not an expert on Linux/Unix, but I'm not as feeble as I seem
to have made you think. It's more accurate to say that I'm not extremely
good at guessing what is going on by reading the names of the distribution
tgz files instead of the documentation. In particular, I don't know yet which
files refer to the target machine and which refer to my x86 but I expect to
know soon.
--
Ignorantly,
Allan Adler <ara@xxxxxxxxxxxxxxxxxxxx>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.
.
- Follow-Ups:
- Re: PIC/Linux
- From: Allan Adler
- Re: PIC/Linux
- References:
- PIC/Linux
- From: Allan Adler
- Re: PIC/Linux
- From: Frank-Christian Kruegel
- Re: PIC/Linux
- From: Allan Adler
- Re: PIC/Linux
- From: Frank-Christian Kruegel
- PIC/Linux
- Prev by Date: Re: hi
- Next by Date: Re: Looking for a part (again)
- Previous by thread: Re: PIC/Linux
- Next by thread: Re: PIC/Linux
- Index(es):