搜索
bottom↓
回复: 3

Eclipse + AVR Toolchain + Atmel Studio不能选择CPU型号了

[复制链接]

出0入0汤圆

发表于 2012-11-30 00:51:04 | 显示全部楼层 |阅读模式


如图,是不是就出现这样,怎么回事呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

阿莫论坛20周年了!感谢大家的支持与爱护!!

曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……

出0入0汤圆

 楼主| 发表于 2012-11-30 18:40:48 | 显示全部楼层
没人知道么?

出0入0汤圆

 楼主| 发表于 2013-4-16 23:39:30 | 显示全部楼层
http://sourceforge.net/p/avr-eclipse/support-requests/25/

http://arduino.cc/forum/index.php/topic,62094.0.html

出0入0汤圆

 楼主| 发表于 2013-4-17 10:27:57 | 显示全部楼层
原讨论地址

Creator: Curryman

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.

---------------
Thomas Holland
2012-07-14

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

---------------
Markus Baertschi
2012-07-23

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.

Markus Baertschi
2012-07-23
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
2012-07-23
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.

--------------
Thomas Holland
2012-07-23
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()

--------------
Markus Baertschi
2012-07-30
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 ?

--------------
michaelb
2012-07-28
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:
>avr-gcc --version
avr-gcc (AVR_8_bit_GNU_Toolchain_3.4.0_663) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

>avr-gcc --target-help -mlist-devices

[...]
  -mtiny-stack                Change only the low 8 bits of the stack pointer

List of parts supported by avr-gcc:
at90s2313           __AVR_AT90S2313__
at90s2323           __AVR_AT90S2323__
at90s2333           __AVR_AT90S2333__
at90s2343           __AVR_AT90S2343__
attiny22            __AVR_ATtiny22__
attiny26            __AVR_ATtiny26__
at90s4414           __AVR_AT90S4414__
[...]
attiny11            __AVR_ATtiny11__
attiny12            __AVR_ATtiny12__
attiny15            __AVR_ATtiny15__

Assembler options
=================
[...]
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 :-(

----------------
Veronica
2012-08-01
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.

----------------
Joseph Ma
2012-08-19
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.

-----------------
Veronica
2012-08-20
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


...........
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-8-27 01:23

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表