Build avr-libc (v1.2.1) using cygwin and WinAVR

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

Finally I managed to build the last avr-libc using cygwin, WinAVR_20040720 and the manual from avr-libc documentation. The only thing which is missing are the folders "ldscripts" inside include and lib.

What did I wrong? Ho can I make this files and folders?

[Edit]

I think my problem are errors like this during final "make install":

C:\cygwin\home\MIC\local\bin\avr-ranlib.exe: '/home/MIC/local/avr/avr/lib/avr5/l
ibc.a': No such file
avr-ranlib /home/MIC/local/avr/avr/lib/avr5/libm.a
C:\cygwin\home\MIC\local\bin\avr-ranlib.exe: '/home/MIC/local/avr/avr/lib/avr5/l
ibm.a': No such file

Curious, because the files are there and not missing.

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

Your problem is that you didn't know that the ldscripts comes from binutils. :)

If you already have binutils 2.15 from the WinAVR release then you should be fine.

Check back in a week or less for a full install including avr-libc 1.2.1. :wink:

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

Quote:
Your problem is that you didn't know that the ldscripts comes from binutils.

I searched the forum and found a similar posting, but I was not sure if I can use the existing ldscipts with a new build.
So the ldscripts are depending on binutils and not avr-libc, right?

Quote:
Check back in a week or less for a full install including avr-libc 1.2.1.

Nice, I will wait then. Meanwhile I will try my own build of avr-libc.

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

Mr MIC wrote:

So the ldscripts are depending on binutils and not avr-libc, right?

Hi Mr MIC !

Exactly- you have ldscripts just after compiling binutils ( without gcc and avr-libc ).
And, avr-libc requires binutils to be compiled. You have it in WinAvr folder and you
should supply an appropriate path to your Cygwin environment. Cygwin uses
a quite different path notation; assuming you have WinAvr installed in C:\WinAvr
you should do under Cygwin :

PATH=/cygdrive/c/WinAvr/bin:$PATH
export PATH

Then, from the avr-libc-1.2.1 source location, run :

./doconf --target=avr --prefix=/avrlibc
./domake all
./domake install

Under windows you'll find a new avr-libc in C:\cygwin\avrlibc - ready to copy to
WinAvr folder.

HTH
Best regards Jurek S.

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

Thank you very much, Jurek. This one was different from my approach. Works like a dream :wink:
I copied the ldscripts from v1.2.0 to the new build.

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

He..He

Was "hit" by exactly same thing :-)

/Bingo

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

EW..

Can I have Your baby?

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

Hello all!

I've just build the complete toolchain including binutils 2.15, gcc 3.4.3 and the new avr-libc 1.2.1 using cygwin. Based on installation info of avr-libc, I've created a script for building the toolchain. I was wondering because this was my first try using cygwin, but it works. After adding and exporting the binaries path in the shell, I was able to build my own sample project without any changes.
Next step has been isntallation of Programmers Notepad. I just added the necessary cygwin utils and DLLs to the binarys path. Last thing is to add the correct PATH to the Windows PATH-variable. Then it was possible to build a complete project from the Notepad.

So if anybody is interested in my scripts just tell me!
Maybe this could lead to a documentation on creating and installing the toolchain on a cygwin-based environment.

Regards, Christian

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

ignoramus wrote:
EW..

Can I have Your baby?

No.

Next question?

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

CAFlights wrote:
Hello all!

I've just build the complete toolchain including binutils 2.15, gcc 3.4.3 and the new avr-libc 1.2.1 using cygwin. Based on installation info of avr-libc, I've created a script for building the toolchain. I was wondering because this was my first try using cygwin, but it works. After adding and exporting the binaries path in the shell, I was able to build my own sample project without any changes.
Next step has been isntallation of Programmers Notepad. I just added the necessary cygwin utils and DLLs to the binarys path. Last thing is to add the correct PATH to the Windows PATH-variable. Then it was possible to build a complete project from the Notepad.

So if anybody is interested in my scripts just tell me!
Maybe this could lead to a documentation on creating and installing the toolchain on a cygwin-based environment.

Regards, Christian

Please note: your GCC is probably linked to the Cygwin DLL isn't it? You can check by running "cygcheck" on the resulting executables in the \bin directory and the program components too.

WinAVR's GCC does not link to the Cygwin DLL. :wink: