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
Toolchains:
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.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Use programmer and Load from MCU. This is the easiest way.
Last edit: Anonymous 2014-09-14
see my full post elsewhere
Last edit: semulum 2014-02-20
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.
Cheers,
Thomas
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.
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/ClockFrequency=16000000
avrtarget/MCUType=atmega328p <- change to the MCU id as used by GCC
avrtarget/perConfig=false
eclipse.preferences.version=1
No guaranties that this works but worth a try.
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.
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 ?
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:
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-3.4.2.939-linux.any.x86.tar.gz 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
Still, a good idea is to strip all the space characters from the beginning of every new line (I don;t know java, so I don't know if there is a special function for that).
The String class in Java provides the trim() method, which removes whitespaces at the start and end of a string.
I've been struggling with the same issue. Would you be so kind to provide the corrected .jar files? I'm not a plugin specialist in any way so if you could do that I'de appreciate a lot!
Last edit: xtal 2013-05-25
Hallo Thomas,
the trim() function resolves that bug, my patch attached.
The same is true here.
Adding the MCUType manually to the prefs works for me. Add least gcc is supplied with the correct options and the generated code and hex works as expected.
Bug #59 mentions the correct options for gcc. But unfortunatly also the output format of the device list has changed from older gcc versions.
Using avr-gcc supplied with Atmel Studio 6:
I would have changed GCC.java to make it work, but I'm not able to build the plugin, with Eclipse Indigo Pluginbuilder does not work either, at least not for me :-(
Try:
avr-gcc "-Wa,--mlist-devices", "--target-help" >C:/mcuList.txt
and check created file mcuList.txt in your C:/ directory
You can read how to edit and build the plugin on Polish site http://forum.atnel.pl/topic1275.html#p9923
or just copy a part of AVR Eclipse Plugin (de.innot.avreclipse.core_2.4.0.201203041437.jar) to your Eclipse/plugins directory and replace the original.
That file you can find here
From now on you can select MCU Type.
Last edit: Veronica 2012-09-10
Hi
I'm using Indigo win32 and Toolchain 3.4.0.1146.
I copied that file to Eclipse/plugins and run Eclipse.
but when i tried to select MCU type from Target Hardware i saw the MCU Type menu disappeared.
i took a screen shot and attached.
thanks for help.
Last edit: Joseph Ma 2012-08-19
Hello Joseph,
1. Delete Eclipse folder
2. Remove all previous Java 2 Runtime Environment from the system
3. Install new Java ( Version 7 Update 5 ) win32
4. Unpack Eclipse Indigo
5. Start Eclipse and choose new workspace
6. Install AVR Eclipse Plugin
7. Change paths to your toolchain and close Eclipse
8. Replace the file de.innot.avreclipse.core_2.4.0.201203041437.jar (eclipse/plugins directory)
9. Start Eclipse and create new project
I hope it will help you
Last edit: Veronica 2012-08-20
Why cannot someone fix this bug?
Hi,
I know how tough it is to find spare time for open source.
But if every user that want's to switch away from the Arduino IDE needs to fix this himself, they simply won't. Many of them don't know how.
I decided to give up after 1 hour trying. Sad, since I love using eclipse e.g. for Java, Python, ... dev.
Regards
didn't knew I can post here directly from my email... so this post become redundant.
Last edit: Vasi 2013-05-25
I have version 2.4.0 of the plug in and replaced the file but it still doesn't work. Maybe it is necessary to replace another .jar file?
Thanks Vasi!
No problem, here is the address
https://sites.google.com/site/funlw65/file-archive/de.innot.avreclipse.core_2.4.0.201203041437.jar?attredirects=0&d=1
Also, if you can use google to translate from Romanian, here is another
page that may be useful somehow
http://myshed.wordpress.com/acasa/evb-4-3-v4-board/programarea-placii-in-c/
On Sat, May 25, 2013 at 8:32 PM, xtal xtalxtal@users.sf.net wrote:
--
Vasi
Related
Support Requests: #25
No, it should work as it works for me and tested it under Linuxmint Debian
Testing, openSUSE 12.3, and currently under Vista and Fedora18. It is
reported to work also for others - a friend of mine followed step by step
the tutorial from here:
http://myshed.wordpress.com/acasa/evb-4-3-v4-board/programarea-placii-in-c/
Don't know your issue but you must restart Eclipse after that .jar
replacement. Of course, you need to provide the
correct paths.
On Sat, May 25, 2013 at 9:28 PM, xtal xtalxtal@users.sf.net wrote:
--
Vasi
Related
Support Requests: #25