tag 标签: eclipse

相关博文
  • 热度 10
    2020-11-18 16:27
    10031 次阅读|
    0 个评论
    一、 安装eclipse IDE for C/C++ developers 1.准备工作 需要下载两个软件包 ( 1)JDK:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html JDK是Eclipse的必要运行环境,这里我使用的是jdk-8u231-linux-x64.tar.gz ( 2)Eclipse:https://www.eclipse.org/downloads/packages/ Eclipses根据开发语言选择合适的安装包,这里我主要用来做C/C++开发,使用的是 Eclipse IDE for C/C++ Developers linux 64-bit 注:安装包版本可自行选择,但要注意一点就是新版本的 eclipse 可能会与低版本的 JDK 不兼容 2. JAVA环境 1)在/opt文件夹下新建一个jvm目录 sudo mkdir /opt/jvm 2)将解压后得到的 jdk1.8.0_231 (取决于JDK版本)移动到上一步新建的jvm目录下 3)添加java路径 在终端中键入命令 sudo gedit .profile 在文件最后添加如下内容(JDK版本号可能有所不同) # java path export JAVA_HOME=/opt/jvm/jdk1.8.0_231 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$PATH 最后 source .profile 使得路径生效。此时,在终端中键入 java -version 会看到如下信息 即说明JAVA环境配置成功 : 3.安装Eclipse 1)解压eclipse的软件包会得到一个 eclipse 的文件夹 2)将其移动到/opt目录下 3)建立jre软连接 sudo mkdir /opt/eclipse/jre s udo ln -s /opt/jvm/jdk1.8.0_231/bin /opt/eclipse/jre/ 4)添加eclipse的桌面图标 sudo gedit /usr/share/applications/eclipse.desktop 在打开的文件中键入(注意Exec和Icon路径是否正确) Encoding=UTF-8 Name=Eclipse Comment=Eclipse Exec=/opt/eclipse/eclipse Icon=/opt/eclipse/icon.xpm Terminal=false StartupNotify=true Type=Application Categories=Application;Development; 接着 ctrl+s 保存文件,然后赋予可执行权限 sudo chmod u+x /usr/share/applications/eclipse.desktop 最后将 eclipse.desktop 其复制到桌面或者固定在 dock上就可以通过图标启动eclipse 二、 安装交叉编译链arm-none-eabi-gcc 在此我们从 ARM官方下载链接选择合适的版本下载(这里我选择Linux64):https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads 解压下来是 tar.ba2 格式包,使用命令 tar -jxf 解压到我们要安装的目录: 为了以后使用方便,将文件夹重命名: 它下面的 bin目录就是我们要使用的编译工具链: 接下来我们要将 bin目录添加到环境变量,这样可以直接在命令行输入要使用的工具名,然后系统就可以找到该工具,在此我们仅为当前用户添加环境变量,使用gedit ~/.bashrc编辑当前用户配置文件,在最后添加export PATH=$PATH:/home/neomissing/gcc-arm-none-eabi/bin 然后使用命令 source ~/.bashrc 更新系统路径,使添加的环境变量立即生效: 然后输入命令 arm-none ,然后按三下 Tab (一定不要输入全部),检查系统是否可以自动补全: 如果系统可以提示,说明环境变量配置成功,可以开心的使用 arm-none-eabi工具链。 三、 安装 GNU ARM Eclipse插件包 The recommended way to install these plug-ins is to use the Eclipse standard install/update mechanism: In the Eclipse menu: Help → Install New Software… · in the Install window, click the Add… button (on future updates, just select the URL in the Work with: combo) · fill in Name: with GNU ARM Eclipse Plug-ins · fill in Location: with http://gnuarmeclipse.sourceforge.net/updates · click the A dd button · normally the main window should list a group named CDT GNU Cross Development Tools ; expand it · select all the plug-ins (the one marked End of life is needed only for compatibility with previous version, normally can be safely skipped) · click the Next buttonand follow the usual installation procedure Once you define the update site URL, further updates are greatly simplified ( Help → Check For Updates ).   四、 安装 OpenOCD 安装 openocd 打开Ubuntu终端(alt+ctrl+t)输入 sudo apt install openocd 完成之后 输入 openocd 查看版本信息 目前默认安装的 openocd芯片支持不全,找到openocd安装路径删除,复制替换 M indMotion提供的openocd即可。 五、 检查 M M32 DAPLink连接正常 打开 Ubuntu终端(alt+ctrl+t)输入lsusb,查看连接如下: 如上图所示,查看到 2 f81 : 0001 ,说明调试工具连接正常。 六、 创建 M M32工程并配置、编译 打开 eclipse,创建一个c工程, 点击 file,新建New Project,选择C Project , 点击 next , 输入工程名字 test,如下配置 , 连续点击 next , 选择选择工具链路径,这一路径就是我们第二步中 arm-none-eabi-gdb的路径,需要匹配。点击finish 。 添加自己的工程文件, 然后指定头文件路径以及配置路径 在工程浏览器中选中工程,右键单击选择 Settings,跳出如下界面 , 配置汇编器 Cross ARM GNU Assembler , 主要是添加预处理宏 , 配置编译器 Cross ARM C Compiler, 添加预处理宏 添加头文件搜索目录 , 配置连接器 Cross ARM C Linker , 主要是选择连接脚本文件 编译 Build Project 在 eclipse中配置OpenOCD,连接目标板。 点击 External Tools Configurations。 双击 Program选项。 然后 打开终端输入如下命令 which openocd , 找可执行文件 openocd的路径,然后把路径复制到Location一栏,在 Arguments一栏中输入如下配置信息: -f /usr/share/openocd/scripts/interface/cmsis-dap . cfg -f /usr/share/openocd/scripts/target/mm32f1x.cfg 其中的 mm32f1x . cfg需要根据你的目标板上的MCU不同而会改变。 此配置文件路径是安装 openocd通过命令sudo apt install openocd安装的,是系统默认路径。如果你在此路径中找不到相关文件,那么请自行查找与修改路径。 然后点击 Apply,Run后会在窗口出现信息,表示连接成功。 断开连接,接下来我们终于来到了 debug环节。 配置 debug环境: 点击 Debug Configurations选项 双击 GDB OpenOCD Debugging 在窗口点击 Debugger一栏 分别修改如下三个窗口的内容,第一个为可执行 openocd命令所在路径,第二个为openocd连接stlink与目标板的命令,第三个为工具链arm-none-eabi-gdb等所在的路径。 点击 Apply,Debug就可以开始愉快的调试。
  • 热度 3
    2019-10-20 22:13
    6890 次阅读|
    0 个评论
    《RISC-V架构与嵌入式开发快速入门》Windows开发环境IDE eclipse 插件安装
    从 eclipse 官网下载最新的 eclipse 软件安装,安装软件前还要安装 Java 软件 JDK ,否则 eclipse 无法正常安装。安装完成后我们要把 GNU MCU ECLIPSE 插件安装。 eclipse下载地址 https://download.eclipse.org/ java软件JDK下载地址 https://www.oracle.com/technetwork/java/javase/downloads/jdk13-downloads-5672538.html 下载最新的软件安装就可以了 。 选择 eclipse marketplace 可以在 search 中输入 GNU MCU 搜索 insert安装就可以了 也可以在help 里选择 install new software 然后选择 add 添加ADD location:http://gnu-mcu-eclipse.netlify.com/v4-neon-updates这是eclipse插件地址 然后根据需要添加就可以了 我这里只选择了risc-v 。根据软件提示完成插件的安装,直到软件能正常重启。 我电脑里安装的还要quartus ii 软件 里面包含了eclipse mars ii 软件 本来我打算直接在里面添加插件,但是插件安装再最后重启时就会报错 !SESSION 2019-10-12 13:04:20.990 ----------------------------------------------- eclipse.buildId=4.5.2.M20160212-1500 java.version=1.8.0_05 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN Framework arguments: -product org.eclipse.epp.package.cpp.product -pluginCustomization C:/intelfpga/18.1/nios2eds/bin/eclipse_nios2/plugin_customization.ini Command-line arguments: -data file:******/sbt4e-18.1-workspace/ -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.cpp.product -pluginCustomization C:/intelfpga/18.1/nios2eds/bin/eclipse_nios2/plugin_customization.ini !ENTRY org.eclipse.osgi 4 0 2019-10-12 13:04:24.687 !MESSAGE Application error !STACK 1 java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench" could not be found in the registry. The applications available are: org.eclipse.cdt.codan.core.application, org.eclipse.cdt.core.GeneratePDOM, org.eclipse.cdt.managedbuilder.core.headlessbuild, org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.equinox.app.error, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool. at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248) at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515) at org.eclipse.equinox.launcher.Main.main(Main.java:1488) 总之这个日志查找了好多网上教程也没有解决。其实在https://gnu-mcu-eclipse.github.io/plugins/install/这个网站上提供了详细的安装说明,但是我也没能解决。如果谁有好的解决办法还请多指教,谢谢。
  • 热度 16
    2012-4-20 18:29
    1619 次阅读|
    0 个评论
    I am quite fond of the Reader's Digest , perhaps because I am into nuggets of knowledge and tidbits of trivia. First of all there are usually a few "funnies" that make me smile, such as the one I just read in the May 2012 issue: "I love being married. When I was single I got so sick of finishing my own sentences." Comedian Brian Kiley. There was another good one in a previous issue, but I can't recall who said it. That one went something like "I was one of seven children. I didn't know what it was like to sleep on my own until I got married." (grin) But that's not what I wanted to talk about. One interesting snippet in this month's issue was a reminder that the next Transit of Venus will occur on June 5 or 6, 2012, depending on your where you are. Observers in North America see it on the evening of June 5. This is something we don't want to miss, because it will be the last transit of Venus to occur in our lifetimes. As an aside, there's even a Transit of Venus Phone App (both iPhone and Android) that will allow you to send your observations of the 2012 transit of Venus to a global experiment to measure the size of the solar system. You can find out more about this on TransitOfVenus.org . But what is a Transit of Venus? Well, when Venus passes directly between earth and the sun, we see the distant planet as a small dot gliding slowly across the face of the sun. Historically, this rare alignment is how we measured the size of our solar system. The duration of such transits is usually measured in hours. A transit is similar to a solar eclipse by the Moon. However, although the diameter of Venus is almost four times that of the Moon, Venus appears smaller, and travels more slowly across the face of the Sun, because it is much farther away from Earth.   As another aside, I just read about an interesting Black Drop effect while rooting around the TransitOfVenus.org website, which says: "Just before or after the circular black dot of Venus seems to touch the edge of the sun, a peculiar 'black drop effect' sometimes occurs between the contact points. A ligament of darkness smears the juncture of Venus and the sun as shown in this image." Well, I'm certainly going to be looking out for this! Transits of Venus are among the rarest of predictable astronomical phenomena. They occur in a pattern that repeats every 243 years, with pairs of transits eight years apart separated by long gaps of 121.5 years and 105.5 years. A transit of Venus took place on 8 June 2004 and (as noted above) the next will be on 5 or 6 June 2012. The previous pair of transits were in December 1874 and December 1882. After 2012, the next pair of transits will be in December 2117 and December 2125, but (sad to relate) I think I will be otherwise engaged on both of those occasions. Of course, we all know that staring at the brilliant disk of the Sun (the photosphere) with the unprotected eye can quickly cause serious and often permanent eye damage. Fortunately, the forthcoming transit of Venus can be safely observed by taking the same precautions used when observing the partial phases of a solar eclipse. One cheap-and-cheerful solution is to don special Solar Eclipse Shades as shown below:   You can get this type of thing all over the place, but you do want to make sure they are "legit" and will do the job. The cheapest I've found so far is from Woodland Hills Telescopes at $0.95 each, falling to $0.85 for 25 pairs, with bigger price breaks the more you buy. (I just ordered 25 pairs so that (a) I can share them with my family and friends and (b) I won't have to give up my own pair .) As it says on the Woodland Hills website: "The lenses used in these Eclipse Shades are made of scratch resistant, optical density 5, 'Black Polymer' material. These shades filter out 100% of harmful ultra-violet, 100% of harmful infrared, and 99.999% of intense visible light. These premium filters also create a sharper ORANGE colored image of the sun." Also of interest is the fact that all proceeds from the sale of these glasses are going to support programs by Astronomers Without Borders , whose mission is to: "Fosters understanding and goodwill across national and cultural boundaries by creating relationships through the universal appeal of astronomy."  
  • 热度 16
    2012-4-18 16:25
    1959 次阅读|
    0 个评论
    I like the Reader's Digest so much, perhaps because I am into nuggets of knowledge and tidbits of trivia. First of all there are usually a few "funnies" that make me smile, such as the one I just read in the May 2012 issue: "I love being married. When I was single I got so sick of finishing my own sentences." Comedian Brian Kiley. There was another good one in a previous issue, but I can't recall who said it. That one went something like "I was one of seven children. I didn't know what it was like to sleep on my own until I got married." (grin) But that's not what I wanted to talk about. One interesting snippet in this month's issue was a reminder that the next Transit of Venus will occur on June 5 or 6, 2012, depending on your where you are. Observers in North America see it on the evening of June 5. This is something we don't want to miss, because it will be the last transit of Venus to occur in our lifetimes. As an aside, there's even a Transit of Venus Phone App (both iPhone and Android) that will allow you to send your observations of the 2012 transit of Venus to a global experiment to measure the size of the solar system. You can find out more about this on TransitOfVenus.org . But what is a Transit of Venus? Well, when Venus passes directly between earth and the sun, we see the distant planet as a small dot gliding slowly across the face of the sun. Historically, this rare alignment is how we measured the size of our solar system. The duration of such transits is usually measured in hours. A transit is similar to a solar eclipse by the Moon. However, although the diameter of Venus is almost four times that of the Moon, Venus appears smaller, and travels more slowly across the face of the Sun, because it is much farther away from Earth.   As another aside, I just read about an interesting Black Drop effect while rooting around the TransitOfVenus.org website, which says: "Just before or after the circular black dot of Venus seems to touch the edge of the sun, a peculiar 'black drop effect' sometimes occurs between the contact points. A ligament of darkness smears the juncture of Venus and the sun as shown in this image." Well, I'm certainly going to be looking out for this! Transits of Venus are among the rarest of predictable astronomical phenomena. They occur in a pattern that repeats every 243 years, with pairs of transits eight years apart separated by long gaps of 121.5 years and 105.5 years. A transit of Venus took place on 8 June 2004 and (as noted above) the next will be on 5 or 6 June 2012. The previous pair of transits were in December 1874 and December 1882. After 2012, the next pair of transits will be in December 2117 and December 2125, but (sad to relate) I think I will be otherwise engaged on both of those occasions. Of course, we all know that staring at the brilliant disk of the Sun (the photosphere) with the unprotected eye can quickly cause serious and often permanent eye damage. Fortunately, the forthcoming transit of Venus can be safely observed by taking the same precautions used when observing the partial phases of a solar eclipse. One cheap-and-cheerful solution is to don special Solar Eclipse Shades as shown below:   You can get this type of thing all over the place, but you do want to make sure they are "legit" and will do the job. The cheapest I've found so far is from Woodland Hills Telescopes at $0.95 each, falling to $0.85 for 25 pairs, with bigger price breaks the more you buy. (I just ordered 25 pairs so that (a) I can share them with my family and friends and (b) I won't have to give up my own pair .) As it says on the Woodland Hills website: "The lenses used in these Eclipse Shades are made of scratch resistant, optical density 5, 'Black Polymer' material. These shades filter out 100% of harmful ultra-violet, 100% of harmful infrared, and 99.999% of intense visible light. These premium filters also create a sharper ORANGE colored image of the sun." Also of interest is the fact that all proceeds from the sale of these glasses are going to support programs by Astronomers Without Borders , whose mission is to: "Fosters understanding and goodwill across national and cultural boundaries by creating relationships through the universal appeal of astronomy."  
  • 热度 12
    2011-3-9 16:16
    2221 次阅读|
    0 个评论
    What a difference several years make. In 1999, every embedded systems tool provider who had an RTOS and a set of tools supported them with a proprietary integrated development environment (IDE), tying everything into a neat tightly connected tool chain. Now, one of the last holdouts—Texas Instruments—has abandoned its proprietary IDE in favor of one based on open source Eclipse. The transition is complete, with virtually every major embedded software vendor to varying degrees supporting their own implementation of Eclipse or providing links to it from their own proprietary IDEs, including Express Logic, Wind River, Green Hills, QNX, Lynux Works, and Mentor Graphics, among others. But it was not always that way. In 1999, in addition to the variety of IDEs jerry-rigged out of a combination of command line interfaces and various Microsoft and Unix windowing kludges, three offered the potential of becoming the defacto industry IDE: Integrated System's Prisim+, Wind River's Tornado and IBM's VisualAge Micro Edition. What all three had in common was an easy to use "software backplane" into which developers with a minimum of programming effort could plug the various tools needed to do code development quickly and efficiently on each vendor's RTOS. ISI used the Common Object Request Broker Architecture (CORBA) as its common API. Wind River used an object module format built around the very C-like Tool Command Language (TCL). Somewhere in the middle in terms of complexity and ease of use was IBM's VisualAge which used a Java-based object-oriented software backplane. All three also allowed third party vendors and even customers and users of the various IDEs to add in their own tools with varying degrees of coupling. By 2004, everything had changed. IBM open-sourced Visual Age Micro Edition as Eclipse, Wind River acquired ISI and abandoned further development its TCL backplane in favor of Eclipse. What is next for Eclipse? Just a few years ago, Eclipse was used to integrate model-centric systems development with the traditional code-centric approach, allowing developers to move code back and forth between the two environments. What are some of the other things we can look forward to? What are the drawbacks to Eclipse? To complicated? Too open? Not open enough? What areas of improvement would you like to see? New plug-ins? Are, as Mike McCullough suggests in one of his articles, many implementations of Eclipse offered by software vendors "open" in name only?  
相关资源