How to install avr-libc on Windows 10 for MinGW?

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

I have installed MinGW on Windows 10, and installed and verified installation of GCC, avr-gcc and make in Windows PowerShell ISE, but I couldn't find the way to install avr-libc, the bin file and source file all couldn't be operated as it was said, for example, there was not "./configure" and the "bootstrap" was just a txt file. Any suggestion?

This topic has a solution.
Last Edited: Tue. Jul 19, 2022 - 03:43 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why on earth do you need to use MinGW in Windows simply to use avr-gcc? You can simply get the complete avr-gcc/AVR-Libc built for Windows:

 

https://www.microchip.com/en-us/...

 

Better yet you can get all that wrapped in an IDE (in fact you even get a choice of IDEs: Studio7 or MPLABX):

 

https://www.microchip.com/en-us/...

 

 

Last Edited: Tue. Jul 12, 2022 - 09:34 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I haven't so much disk for studio on this machine, so I want to use CLI tools.

 

I tried to install Simulavr as it was said in this page - https://ccrma.stanford.edu/cours...

 

I ran in these steps:

$ gunzip -c simulavr-<version>.tar.gz | tar xf -
$ cd simulavr-<version>
$ mkdir obj-avr
$ cd obj-avr
$ ../configure --prefix=$PREFIX
$ make
$ make install

but, after I ran "../configure --prefix=$PREFIX", the Windows PowerShell ISE always asked me which tool I want to open this file, I don't know why.

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


MianQi wrote:
I haven't so much disk for studio on this machine, so I want to use CLI tools.
Then, like I say you just need:

 

https://ww1.microchip.com/downlo...

 

That contains a complete installation of avr-gcc.exe and AVR-LibC. Just unzip and add the ./bin/ dierctory to PATH and you are good to go:

 

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

MianQi wrote:
... MinGW ...

... but I couldn't find the way to install avr-libc, ...

Any suggestion?

MSYS2 if AMD64

https://packages.msys2.org/search?q=avr

 

built from the current FSF AVR GCC (AMD64 and x86)

Releases · ZakKemble/avr-gcc-build · GitHub

 

old :

Using the GNU AVR toolchain on Windows 10

 

"Dare to be naïve." - Buckminster Fuller

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

I read the old one, it just hasn't item for avr-libc.

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

AVR Libc is with the Microchip AVR GCC.

AVR 8-Bit Toolchain- Release Notes (Microchip Technology)

[page 6]

2.4 C Library

fyi, now from FSF AVR GCC 7.3 (top of page 5)

 

"Dare to be naïve." - Buckminster Fuller

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

You may find this helpful: https://blog.zakkemble.net/avr-g...

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

I tried the 32-bit edition, it seems works.

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

I downloaded it, but it didn't work well.

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

MianQi wrote:
but it didn't work well.
Tell us about that - in what way did it "not work well" ?

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

I haven't found any file about avr-libc under this folder: C:\...\avr8-gnu-toolchain-win32_x86_64\bin

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Why would avr-libc have executables in ./bin/ ?

 

AVR-LibC is a delivery of .h, .o and .a files. You use the .h (things lihe <avr/interrupt.h> etc) in your code and when it is built it links with the .o and .a to provide the functionality published in the .h files.

 

What AVR-LibC delivers is principally these two directory trees:

 

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

I found them here - C:\Program Files\avr-gcc-12.1.0-x86-windows, thanks.