MHV AVR Tools - an AVR toolchain for Windows

47 posts / 0 new
Last post
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have put together a development environment and a set of scripts to build the latest GNU toolchain for Windows.

Please note that EW states that GCC 4.4.x is tested far more throughly than GCC 4.5.1 used in my release, so I would not recommend it for any production situation.

The build scripts and compiled binaries are available at:
http://www.makehackvoid.com/group-projects/mhvavrtools

I'm happy to accept community patches, in particular:
- porting new device patches to GCC 4.5.1
- creating a Nullsoft installer for the package

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

May I suggest you bundle it with your library? That way your toolchain would have a distinguishing feature.

Stealing Proteus doesn't make you an engineer.

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

Thanks Arnold, thats a good suggestion.

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

Updated recently to include a real installer and smatch for C linting.

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

Updated to GCC 4.5.2 & AVR LibC 1.7.1.

Also includes GNU Win32 utilities such as rm & friends.

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

Can your binary installed *.exe tool co-exist with studio 4.18 ?

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

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

Hi. First of all, let me say that it's great to have distributions like this that are plain vanilla, leight-weight and come without the additional plethora of GUIs like AStudio!

I tried the 4.5.2 released 2011-03-06 and observed the problem that libgmp-10.dll could not be found. I did not add the path of the toolchain to PATH because I prefer to use the tools by specifying absolute path names like e:/absolute-install-path/bin/avr-gcc directly. (It worked after I added /bin to PATH, but if there are many toolchains installed it might be impossible to find the right order to add their paths to PATH and some toolchains will always use false DLLs).

The problem seem to be that you supply gmp/mpfr/mpc as shared libraries, so I propose adding --disable-shared to your configure options.

Moreover, the process of building avr-gcc is easier and straight forward if you do a in-tree build of the support libraries gmp/mpfr/mpc. To do that, just copy the sources of gmp/mpfr/mpc as "gmp", "mpfr" resp. "mpc" in the top-level gcc source tree (or, at your option, soft-link them).

That way you do not need seperate build steps for these libraries: gcc build machinery will recognize and configure, build and install them as needed. You don't have to give --with-gmp/-mpfr/-mpc any more. It's all handled automatically.

Moreover, some people might want to play around with link time optimization. I didn't try to build avr-gcc-4.5 with LTO yet, but maybe it works out of the box. To do that, just get appropriate version of libelf, link/copy it into gcc top-level source and say --enable-lto.

As GCC 4.6.0 is already released: is there also a 4.6.0 distribution? This might establish a narrower release-test-bugfix cycle. However, note that DWARF2 is broken in avr-gcc >= 4.6, so you would have to remove --with-dwarf2 from configure. See

http://gcc.gnu.org/PR48459

As Eric said, the 4.4 release is far more tested, but how are people supposed to test if there are no easily available distributions that can switched back and forth by changing some path name? Is everyone supposed to instell 3 versions of AStudio 5 just to test 3 releases of avr-gcc? I installed your version on Win2000 and it runs smooth!

Thanks for your work!

avrfreaks does not support Opera. Profile inactive.

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

@SprinterSB

Speaking about avr-gcc-4.5.x :-)

Could you mention a good combination of "options" for producing "small code"
Aka. Best practice GCC options for gcc-4.5.x

ie. -fno-split-wide-types

etc ...

/Bingo

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

Bingo600 wrote:
Could you mention a good combination of "options" for producing "small code"
Aka. Best practice GCC options for gcc-4.5.x

I don't think there is a magic combination of options that deflates you code by 10%, except -Os.

There are plenty of options and params; it's almost impossible to test all combinations. You can try to deactivate some of the following switches that are turned on with optimization:

-finline-small-functions
-fmove-loop-invariants
-fsplit-wide-types
-ftree-loop-optimize
-ftree-scev-cprop

It will depend on the code if or if not some switch might safe some bytes.

The biggest impact will have -Os and your coding style.

avrfreaks does not support Opera. Profile inactive.

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

New release:
- Upgrade to GCC 4.6.2
- Upgrade to AVR LibC 1.7.2rc2252
- Upgrade to AVRDUDE 5.11.1

The URL has changed, it can now be found at:
http://www.makehackvoid.com/project/mhvavrtools

I have not yet made the changes that Sprinter suggested.

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

evildeece wrote:
- Upgrade to GCC 4.6.2
There is PR50063 that leads to wrong code. Did you disable that pass?

Moreover, -fno-caller-saves might be a good idea.

avrfreaks does not support Opera. Profile inactive.

Pages