#25 no MCU-Type


I worked in the past with Helios and AVR Plugin for Eclipse 2.3.4 without big problems so far.

Now I decided to change to AVR Plugin 2.4.0 the latest tool chain from ATMEL and Indigo.
I started from scratch and loaded the last Eclipse Indigo Version (win32). I installed it and started with an empty workspace. Then I performed a update check to ensure Eclipse is on the latest version.
Then I loaded avreclipse.2.4.0.final.p2repository.zip unzipped it and stored it on the HDD.
After that I loaded the current ATMEL Tool chain and installed it.

Then I installed the AVR Plugin to Eclipse (Help/Install new Software).
That process worked fine so far.
After installing I restarted Eclipse as recommended.

Now I can see the typical buttons and so on are available and things are looking fine.
Under Window/Preferences/AVR/Paths I keyed in the path to th AVR Toolchain.

AVR-GCC ==> C:\Program Files (x86)\Atmel\AVR Tools\AVR Toolchain\bin
GNU make ==> C:\Program Files (x86)\Atmel\AVR Tools\AVR Toolchain\bin
AVR Header Files ==> C:\Program Files (x86)\Atmel\AVR Tools\AVR Toolchain\avr\include
AVRDude ==> C:\Program Files (x86)\Atmel\AVR Tools\AVR Toolchain\bin
Atmel Part Description Files are not available and so far I know not necessary.

Finally I disabled search for system path at startup and click the button Apply

To be sure everything is correct I restarted Eclipse.

When I now start to create a new C project (File/New/C Project)
For Project name I key in "Test"

Project type:
AVR Cross Target Application
Empty Project

AVR-GCC Toolchain

Click Button Next
I unselected Debug

Click Button Next

I see the dialogue AVR Target Hardware Properties

Here is the MCU Type: empty and the MCU Frequency (Hz): is 1000000

When I click to the MCU Type nothing is to select.


Support Requests: #25


1 2 3 > >> (Page 1 of 3)

  • Anonymous

    Use programmer and Load from MCU. This is the easiest way.

    Last edit: Anonymous 2014-03-29
    • semulum

      see my full post elsewhere

      Last edit: semulum 2014-02-20
  • Thomas Holland
    Thomas Holland

    Hi, I think the reason for the missing MCU type lies with the toolchain.
    Some Toolchains by Atmel do not report the supported MCUs when queried with "avr-gcc --target-help".
    Until I get around to find a different way of extracting the known MCUs from the Atmel avr-gcc I have to refer you to a different toolchain, e.g. the old WinAVR toolchain (https://sourceforge.net/projects/winavr/files/) or the really current MHV Toolchain (http://www.makehackvoid.com/project/mhvavrtools) which IIRC requires manual setting of the paths but works great otherwise.



  • I have the same problem on Linux (Ubuntu). Is there a workaround, like manually provide a list of MCU types ?

    The problem is that the older toolchains do not support the more recent MCUs, like my xmega32A4U.

    Also, in the past I found that listbox a real pain to use, there are just too many MCU types now for it to be practical, I would prefer a simple textfield.

  • One more question. At what moment does the plugin run the 'avr-gcc --target-help' command ?

    I've replaced avr-gcc with a shell script to intercept the --target-help parameter and supply an answer. On the command-line this works, but the plugin does not seem to run the command anymore.

  • Thomas Holland
    Thomas Holland

    Sorry, but there is currently no easy workaround for this issue. While I would like to fix this issue I basically have no time for working on the plugin anymore.

    A little untested hack that you might want to try is to manually edit the AVR Plugin preferences. They are stored in the .settings Folder of your project, named de.innot.avreclipse.core.prefs and editing should be self explanatory. Just make sure that Eclipse is not running while editing this file.
    If it does not already contain the following lines you can try to just add them

    avrtarget/MCUType=atmega328p <- change to the MCU id as used by GCC

    No guaranties that this works but worth a try.

    • John Warren
      John Warren

      Why can't you just get rid of the drop down selection and let us just enter the MCU type into the field. Simple and I but it's a 5 minute fix.

      Why make this any harder that it should be. This way you don't have to figure out some fancy workaround.

  • Thomas Holland
    Thomas Holland

    As to your second question -- I just checked with the debugger: "avr.gcc --target-help" is called whenever the list is required for the first time, either on startup when the "AVR Supported MCUs" View is open or when the Project Properties -> AVR -> Target Hardware page is opened.
    Unless the path to the compiler is changed avr-gcc will only be called once and the results are cached.
    BTW if someone wants to fix this bug: the relevant code is located in the file de/innot/avreclipse/core/toolinfo/GCC.java in the method loadMCUList()

    • Was away for a week, so a bit late. Is there a way of forcing the plugin to re-read this ?
      How do I invalidate the cache ?

      At the moment it looks to me like I must re-install Eclipse to re-executa the gcc command. Any better way ?

    • Vasi

      Hi Thomas,
      The last version of ATMEL avr8 toolchain (for linux at least) is based on avr-gcc 4.7.2 and accepts the option "--target-help". The problem is that the returned list it have a two space characters before "Known MCU names:" string, as " Known MCU names:" and that is the only change which must be made to the parser of the result from console. It will work for both variants of avr-gcc, ATMEL and GNU. Specifically, this line modified as it follows:

              if ("  Known MCU names:".equals(line)) {

      See the two spaces introduced inside string.

      EDIT: Just tested and indeed that is the only modification needed. It works perfectly well with avr8-gnu-toolchain- downloaded from ATMEL site! Hopefully, you will read this and will make a little effort to make the change and publish the archive for all who can not do for themselves (I was able to generate the jar file only for the core, as the entire project can't be generated due to some errors).

      Last edit: Vasi 2013-05-02
1 2 3 > >> (Page 1 of 3)