lost in GCC GNU AVR-GCC LAND!

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

I am using avr-studio 4, with AVR-GCC, and am interested in programming in C-language. It takes me a very long time to learn this (from programming professionally for years in Microsoft Visual studio, mainly in visual basic).

So question #1 is, AVR-GCC and GNU-GCC are not the same, and that GNU-GCC is a completely different set of libraries just for AVR and GNU-GCC is a universal set of libraries for C, am I correct?

And question #2 is - WHAT program do I use to unzip and manage "TAR" files, because winzip doesnt work and eveything on downloads.com seems to expire in 5 hours or has some other form of limitation that kills me. Also is there a .zip download of gnu-gcc somewhere or not? Because that site appears to be an ftp list of downloads with only tar files.

Please help, thanks

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

I can awnser question 2, I use winrar it opens .tar.

for question 1, I don't personally want to talk about winAVR when the authors of it are here, im sure they can help much better then I, plus to tell you the truth I dont know much about the internals, nor do I need to learn at the moment. :) <3 winAVR

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

Well "GNU GCC" is a bit of an oddity anyway as the G in GCC already stands for GNU. GCC is the GNU Compiler Collection (and GNU itself is that wonderfully recursive acronym for "GNU Not Unix"!)

The GCC toolchain are a set of tools that can be ported to many architectures. You can get variants for x86 (both Windows and Linux), ARM, 68K, MIPS, ... (and almost all CPU varieties you can think of). AVR-GCC is just the port of GCC to the AVR. You can get the sources of the package to compile it for what ever CPU/OS you choose to use it on. It just so happens that some helpful chaps have done just this to make an x86 build of it to run in the Windows environment (with some OS "helper" stuff in the background) and this comes nicely packaged in WinAVR which also takes the opportunity to add some other AVR tools into the package that will be of use such as simulavr, avrdude, srecord, programmer's notepad etc. One very important thing that is delivered with the WinAVR package is avr-libc which is the set of header files and libraries that provide much of the "day to day" functionality needed to actually do stuff on the AVR (the compiler itself wouldn't be much use if you didn't have itoa(), sprintf(), malloc() already written and built for you in an AVR variant)

Cliff

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

I seem to remember being able to use my copy of WinZip to open TAR files in the past. Maybe I'm mistaken.

But if you've got WinAVR installed, then the GNU tar utility has already been installed along with it. tar is a command line utility for creating and extracting .tar archives.

From a DOS command line:
1) go to the directory where the tar archive lives
2) type "tar -xf your_tar_file.tar"
3) The contents of the tar archive will be extracted to a subdirectory, typically having the same name.

Personally, I avoid WinRAR because I don't like using obscure file formats which most people in the world can't read. As such, I cannot speak to its ability to read .tar archives.

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

Quote:

Also is there a .zip download of gnu-gcc somewhere or not? Because that site appears to be an ftp list of downloads with only tar files.

If you're downloading something called "gnu-gcc" in a .tar archive, then it's probably *not* what you're looking for. It may be a binary distribution of GCC intended to be used as a native compiler for some obscure variant of a Unix-like operating system. Or it may be the raw source code of the GCC compiler, which you'd need to compile from scratch yourself with appropriate patches and configuration switches to produce a working AVR-GCC cross-compiler.

Avoid it.

If you're running Windows and you want to use GCC to compile programs for use on an AVR, then your best choice is probably to download WinAVR -- it packages everything you need in a convenient InstallShield .exe file.

-Luke

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

And when you do download WinAVR, then please read the WinAVR User Manual that comes with it. There's a section in there that gives an overview of the included tools and how it all fits together.
http://sourceforge.net/projects/...

Quote:
...it packages everything you need in a convenient InstallShield .exe file.

(Oh, and a small nit: the installer is not created by InstallShield, but it is a single file, executable installer. :))

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

Yes I have been using winavr for a while, but getting confused with some online examples and tutorials. I now understand alot better, thanks for advice!