搭建基于eclipse平台的ARM开发环境[续]
时间:2007-03-03
来源:互联网
下一步:Downloading the GNUARM Compiler Suite
At this point, we have all the GNU tools needed to compile and link software for Windows/Intel computers. It is possible to use all this to build a custom GNU compiler suite for the ARM processor family. The very informative book “Embedded System Design on a Shoestring” by Lewin A.R.W. Edwards ?2003 describes how to do this and it is rather involved.
Fortunately, Pablo Bleyer Kocik and the people at gnuarm.com have come to the rescue with pre-built GNU compiler suite for the ARM processors. Just download it with the included installer and you’re ready to go.
Click on the following link to download the GNUARM package.
http://www.gnuarm.com
The GNUARM web site will display and you should click on the “Files” tab.
The appropriate toolchain to select is Binaries – Cygwin - GCC-3.4.1
The correct package to download is Binaries Cygwin – GCC- 4.0 toolchain
Just like all the other downloads we’ve done, we direct this one to our empty download directory on the hard drive. Here we click “Save” and then specify the download destination.
As you can see, this download has a very long name!
This download is a 18 megabyte file and takes 30 seconds on a cable modem.
The download directory now has the following setup application with the following unintelligible filename: bu-2.15_gcc-3.4.1-c-c++-java_nl-1.12.0_gi-6.0.exe
Click on that filename to start the installer.
Click on this application to start the GNUARM installer
The GNUARM installer will now start. Click “Next” to continue.
Accept the GNU license agreement – don’t worry, it’s still free. Click “Next” to continue.
We’ll take the default and let it install into the “Program Files” directory. Click “Next” to continue.
We’ll also take the defaults on the “Select Components” window. Click “Next” to continue.
Take the default on this screen. Click “Next” to continue.
注意:It’s very important that you don’t check “Install Cygwin DLLs”. We already have the Cygwin DLL installed from our Cygwin environment installation. Since all operations are called from within Eclipse, we don’t need a “desktop icon” either. Click “Next” to continue.
Click on “Install” to start the GNUARM installation
Sit back and watch the GNUARM compiler suite install itself.
When it completes, the following screen is presented. Make sure that “Add the executables directory to the PATH variable” is checked. This is crucial.
This completes the installation of the compiler suites. Since Eclipse will call these components via the make file, you won’t have to think about it again.
It’s worth mentioning that the GNUARM web site has a nice Yahoo user group with other users posing and answering questions about GNUARM. Pay them a visit. The GNUARM web site also has links to all the ARM documentation you’ll ever need.
下一步:Installing the Philips LPC2000 Flash Utility into Eclipse
The Philips LPC2000 Flash Utility allows downloading of hex files from the COM1 port of the desktop computer to the Olimex LPC-P2106 board’s flash (or RAM) memory.
We need to download the latest version of this program from the Philips web site and unzip and install it into the program files directory. Then we will start Eclipse and add the LPC2000 Flash Utility as an external tool to be invoked.
Click on the following link to access the Philips LPC2106 web page.
http://www.semiconductors.philips.com/pip/LPC2106.html
If you scroll down this page, you will see a link to the LPC2000 Flash Utility download. Click on the ZIP file LPC2000 Flash Utility
As before, we’ll save the downloaded zip file in our empty c:/scratch directory. This is a fairly short download, only about 2 megabytes.
We’ll use WinZip to unzip this into the c:/scratch directory.
Now you can see that the download directory has a setup utility and another zip file containing the LPC2000 Hex Utility. Click on the setup.exe application to start the installer.
The following web page for the LPC2106 should open.
Click on setup to start the installer
The LPC2000 Flash Utility setup now starts. Click on OK to proceed.
Take the default on this screen below and let it install the LPC2000 Flash Utility into the Program Files directory.
In a very few seconds, the installer will complete 。
Now that the Philips LPC2000 Flash Utility is properly installed on our computer, we’d like to install it into Eclipse so that it can be invoked from the RUN pull-down menu under the “external tools” option. Start Eclipse by clicking on the desktop icon.
The layout of the Eclipse screen is called a “perspective.” The default perspective is the “resource” perspective, as shown below.
We need to change it into the C/C++ perspective. In the Window pull-down menu, select Window – Open Perspective – Other – C/C++ and then click OK.
Eclipse will now switch to the C/C++ perspective shown below and will remember it when you exit.
Now we want to add the Philips LPC2000 Flash Utility to the “External Tools” part of the Run pull-down menu. Select RUN – External Tools – External Tools.
We want to add a new program to the External Tools list, so click on Program and then New.
Note below that there’s a new program under the “program” tree with the name New_configuration and there’s no specifications as to what it is.
In the Name text box, replace New-configuration with LPC2000 Flash Utility.
In the Location text box, use the “Browse File System” tool to find the Philips LPC2000 Flash Utility in the Program Files directory. Its name is LPC210x_IPC.exe.
Here’s the External Tools window before editing.
Click on Apply to accept.
Close everything out and return to the Run pull-down menu. Select Run – External Tools – Organize Favorites.
We’re now going to put the Philips PLC2000 Flash Utility into the “favorites” list. Click on “Add” in the window below.
Click the selection box for LPC2000 Flash Utility. This will add it to the favorites list.
Now when we click on the Run pull-down menu and select “External Tools,” we see the LPC2000 Flash Utility at the top of the list.
下一步:Installing the Macraigor OCDremote Utility
OCDRemote is a utility that listens on a TCP/IP port and translates GDB monitor commands into Wiggler JTAG commands. This permits Eclipse/GDB to communicate to the Olimex LPC-P2100 board as a target monitor accessed via Ethernet. Macraigor has always made this utility available on the internet as “freeware.” The OCDRemote utility can be downloaded at:
http://www.macraigor.com/full_gnu.htm
If you scroll the above screen down a bit, you should see the download for OCDRemote. Click on the link “DOWNLOAD Windows OCDRemote v2.12”.
Click on “Run” so it will download and immediately install OCDRemote.
The download phase is quick since the OCDRemote is only a couple of megabytes.
The Macraigor installer should start up; just click “Next” to continue.
The next screen lets you choose where OCDRemote is installed. OCDRemote normally installs in c:/cygwin/usr/local/bin.
We’ll have to make sure that this directory is on a Windows Path.
Click on “Next” to accept c:/cygwin/usr/local/bin as the OCDRemote installation directory.
Clicking on “Install” will complete the OCDRemote installation.
Click on the RUN button. The application will start and breakpoint at the main() routine.
Just like the Philips ISP Flash Utility, we should install the Macraigor OCDremote utility as an “external tool” that can be accessed easily from the Eclipse CDT RUN pull-down menu.
Start up Eclipse and, if necessary, switch to the C/C++ perspective by clicking “Window – Open Perspective – Other – C/C++.”
The Wizard completion screen lets you restart your computer to put OCDRemote into the Windows registry.
The Insight Debugger has the following toolbar buttons associated with executing the application.
Switching perspectives brings up the C/C++ window (perspective) and this will be remembered when you re-enter Eclipse.
In a procedure similar to installing the Philips Flash Utility as an “External Tool”, click on “Run – External Tools – External Tools …” This will bring up the External Tools dialog.
Click on “New” and replace the name with OCDremote. Use the “browse file system” to find it. It should be in the directory c:/cygwin/usr/local/bin.
The arguments needed to properly start the OCDremote are as follows:
-cARM7TDMI-S specifies the CPU being accessed
-p8888 specifies the pseudo TCP-IP port being used
-dWIGGLER specifies the JTAG hardware being used
-a1 specifies LPT1 for the Wiggler
-s7 specifies next-to-slowest speed
It’s a good idea to not tamper with these values. Click on “Apply” to finish the setup.
Just like the Philips LPC2000 Flash Utility, we’d like to include the OCDremote application in our list of “favorite” External Tools. This allows us to quickly start the OCDremote JTAG server from within Eclipse.
Click on “Run – External Tools – Organize Favorites”
Now click on “Add…” in the Organize External Tools … window and follow that by checking “OCDremote” in the Add External Tools Configurations: window. Click on “OK” to add the OCDremote to the list of favorites.
Now verify that the OCDremote is in the list of External Tools favorites. Click on “Run – External Tools” and see that it’s now included in the list of favorites.
Now is a good time to point out that there’s a handy shortcut button in Eclipse to run the External Tools. Click on the External Tools button’s down arrow to expand the list of available tools.
下一步:Installing the INSIGHT Graphical Debugger
Eclipse CDT has its own debugger, employing the GDB serial protocol. The truth is, I’ve been unable to get it to work reliably with the Wiggler using OCDremote and with the Segger J-Link USB JTAG interface using the J-Link server written by Nick Randell. As far as JTAG debugging goes, the Eclipse debugger is just not ready for prime time (they are working on it).
Insight is a pretty good open-source debugger that can be made to work with the Wiggler JTAG interface. It is already present in the GNUARM directory on C:/Program Files/ installed earlier.
Let’s install the Insight Debugger as an Eclipse External Tool.
Click on “Run – External Tools – External Tools …”
In the External Tools dialog window below, click on “New-configuration” on the left.
Now fill this dialog in as shown below. The Insight Debugger is the executable file “arm-elf-insight.exe” and it’s in the c:/Program Files/GNUARM/bin folder.
You can leave these two text boxes blank for now.
In the External Tools window above, the Insight executable is typed into the Location: text box. You can use the “Browse File System” button to hunt for it.
The “Working Directory” and “Arguments” text box will contain the project’s workspace file folder and the project’s arm-elf executable, in this example “main.out”. For the moment, you can leave these two text boxes blank, we’ll return to them later when we get ready to run the Insight debugger.
Similar to the Philips Flash Utility and the Macraigor OCDremote, we’d like to add the Insight debugger to our list of “favorite” External Tools.
Click on “Run – External Tools – Organize Favorites …”.
In the “Organize External Tools …” window on the left below, click on “Add …” and then “OK”.
In the “Add External Tools Favorites” window on the right below, click and check-mark the Insight debugger select box and then click “OK” to add it as a favorite.
Finally, click on “OK” to officially add Insight as a favorite External Tool.
As one final confidence check, click on the “Run External Tools” button and verify that all three tools are properly installed.
It’s worth mentioning that to run the Insight Graphical Debugger; you will click on OCDremote first to get it running and then click on Insight to start the debugger.
At this point, we have all the GNU tools needed to compile and link software for Windows/Intel computers. It is possible to use all this to build a custom GNU compiler suite for the ARM processor family. The very informative book “Embedded System Design on a Shoestring” by Lewin A.R.W. Edwards ?2003 describes how to do this and it is rather involved.
Fortunately, Pablo Bleyer Kocik and the people at gnuarm.com have come to the rescue with pre-built GNU compiler suite for the ARM processors. Just download it with the included installer and you’re ready to go.
Click on the following link to download the GNUARM package.
http://www.gnuarm.com
The GNUARM web site will display and you should click on the “Files” tab.
The appropriate toolchain to select is Binaries – Cygwin - GCC-3.4.1
The correct package to download is Binaries Cygwin – GCC- 4.0 toolchain
Just like all the other downloads we’ve done, we direct this one to our empty download directory on the hard drive. Here we click “Save” and then specify the download destination.
As you can see, this download has a very long name!
This download is a 18 megabyte file and takes 30 seconds on a cable modem.
The download directory now has the following setup application with the following unintelligible filename: bu-2.15_gcc-3.4.1-c-c++-java_nl-1.12.0_gi-6.0.exe
Click on that filename to start the installer.
Click on this application to start the GNUARM installer
The GNUARM installer will now start. Click “Next” to continue.
Accept the GNU license agreement – don’t worry, it’s still free. Click “Next” to continue.
We’ll take the default and let it install into the “Program Files” directory. Click “Next” to continue.
We’ll also take the defaults on the “Select Components” window. Click “Next” to continue.
Take the default on this screen. Click “Next” to continue.
注意:It’s very important that you don’t check “Install Cygwin DLLs”. We already have the Cygwin DLL installed from our Cygwin environment installation. Since all operations are called from within Eclipse, we don’t need a “desktop icon” either. Click “Next” to continue.
Click on “Install” to start the GNUARM installation
Sit back and watch the GNUARM compiler suite install itself.
When it completes, the following screen is presented. Make sure that “Add the executables directory to the PATH variable” is checked. This is crucial.
This completes the installation of the compiler suites. Since Eclipse will call these components via the make file, you won’t have to think about it again.
It’s worth mentioning that the GNUARM web site has a nice Yahoo user group with other users posing and answering questions about GNUARM. Pay them a visit. The GNUARM web site also has links to all the ARM documentation you’ll ever need.
下一步:Installing the Philips LPC2000 Flash Utility into Eclipse
The Philips LPC2000 Flash Utility allows downloading of hex files from the COM1 port of the desktop computer to the Olimex LPC-P2106 board’s flash (or RAM) memory.
We need to download the latest version of this program from the Philips web site and unzip and install it into the program files directory. Then we will start Eclipse and add the LPC2000 Flash Utility as an external tool to be invoked.
Click on the following link to access the Philips LPC2106 web page.
http://www.semiconductors.philips.com/pip/LPC2106.html
If you scroll down this page, you will see a link to the LPC2000 Flash Utility download. Click on the ZIP file LPC2000 Flash Utility
As before, we’ll save the downloaded zip file in our empty c:/scratch directory. This is a fairly short download, only about 2 megabytes.
We’ll use WinZip to unzip this into the c:/scratch directory.
Now you can see that the download directory has a setup utility and another zip file containing the LPC2000 Hex Utility. Click on the setup.exe application to start the installer.
The following web page for the LPC2106 should open.
Click on setup to start the installer
The LPC2000 Flash Utility setup now starts. Click on OK to proceed.
Take the default on this screen below and let it install the LPC2000 Flash Utility into the Program Files directory.
In a very few seconds, the installer will complete 。
Now that the Philips LPC2000 Flash Utility is properly installed on our computer, we’d like to install it into Eclipse so that it can be invoked from the RUN pull-down menu under the “external tools” option. Start Eclipse by clicking on the desktop icon.
The layout of the Eclipse screen is called a “perspective.” The default perspective is the “resource” perspective, as shown below.
We need to change it into the C/C++ perspective. In the Window pull-down menu, select Window – Open Perspective – Other – C/C++ and then click OK.
Eclipse will now switch to the C/C++ perspective shown below and will remember it when you exit.
Now we want to add the Philips LPC2000 Flash Utility to the “External Tools” part of the Run pull-down menu. Select RUN – External Tools – External Tools.
We want to add a new program to the External Tools list, so click on Program and then New.
Note below that there’s a new program under the “program” tree with the name New_configuration and there’s no specifications as to what it is.
In the Name text box, replace New-configuration with LPC2000 Flash Utility.
In the Location text box, use the “Browse File System” tool to find the Philips LPC2000 Flash Utility in the Program Files directory. Its name is LPC210x_IPC.exe.
Here’s the External Tools window before editing.
Click on Apply to accept.
Close everything out and return to the Run pull-down menu. Select Run – External Tools – Organize Favorites.
We’re now going to put the Philips PLC2000 Flash Utility into the “favorites” list. Click on “Add” in the window below.
Click the selection box for LPC2000 Flash Utility. This will add it to the favorites list.
Now when we click on the Run pull-down menu and select “External Tools,” we see the LPC2000 Flash Utility at the top of the list.
下一步:Installing the Macraigor OCDremote Utility
OCDRemote is a utility that listens on a TCP/IP port and translates GDB monitor commands into Wiggler JTAG commands. This permits Eclipse/GDB to communicate to the Olimex LPC-P2100 board as a target monitor accessed via Ethernet. Macraigor has always made this utility available on the internet as “freeware.” The OCDRemote utility can be downloaded at:
http://www.macraigor.com/full_gnu.htm
If you scroll the above screen down a bit, you should see the download for OCDRemote. Click on the link “DOWNLOAD Windows OCDRemote v2.12”.
Click on “Run” so it will download and immediately install OCDRemote.
The download phase is quick since the OCDRemote is only a couple of megabytes.
The Macraigor installer should start up; just click “Next” to continue.
The next screen lets you choose where OCDRemote is installed. OCDRemote normally installs in c:/cygwin/usr/local/bin.
We’ll have to make sure that this directory is on a Windows Path.
Click on “Next” to accept c:/cygwin/usr/local/bin as the OCDRemote installation directory.
Clicking on “Install” will complete the OCDRemote installation.
Click on the RUN button. The application will start and breakpoint at the main() routine.
Just like the Philips ISP Flash Utility, we should install the Macraigor OCDremote utility as an “external tool” that can be accessed easily from the Eclipse CDT RUN pull-down menu.
Start up Eclipse and, if necessary, switch to the C/C++ perspective by clicking “Window – Open Perspective – Other – C/C++.”
The Wizard completion screen lets you restart your computer to put OCDRemote into the Windows registry.
The Insight Debugger has the following toolbar buttons associated with executing the application.
Switching perspectives brings up the C/C++ window (perspective) and this will be remembered when you re-enter Eclipse.
In a procedure similar to installing the Philips Flash Utility as an “External Tool”, click on “Run – External Tools – External Tools …” This will bring up the External Tools dialog.
Click on “New” and replace the name with OCDremote. Use the “browse file system” to find it. It should be in the directory c:/cygwin/usr/local/bin.
The arguments needed to properly start the OCDremote are as follows:
-cARM7TDMI-S specifies the CPU being accessed
-p8888 specifies the pseudo TCP-IP port being used
-dWIGGLER specifies the JTAG hardware being used
-a1 specifies LPT1 for the Wiggler
-s7 specifies next-to-slowest speed
It’s a good idea to not tamper with these values. Click on “Apply” to finish the setup.
Just like the Philips LPC2000 Flash Utility, we’d like to include the OCDremote application in our list of “favorite” External Tools. This allows us to quickly start the OCDremote JTAG server from within Eclipse.
Click on “Run – External Tools – Organize Favorites”
Now click on “Add…” in the Organize External Tools … window and follow that by checking “OCDremote” in the Add External Tools Configurations: window. Click on “OK” to add the OCDremote to the list of favorites.
Now verify that the OCDremote is in the list of External Tools favorites. Click on “Run – External Tools” and see that it’s now included in the list of favorites.
Now is a good time to point out that there’s a handy shortcut button in Eclipse to run the External Tools. Click on the External Tools button’s down arrow to expand the list of available tools.
下一步:Installing the INSIGHT Graphical Debugger
Eclipse CDT has its own debugger, employing the GDB serial protocol. The truth is, I’ve been unable to get it to work reliably with the Wiggler using OCDremote and with the Segger J-Link USB JTAG interface using the J-Link server written by Nick Randell. As far as JTAG debugging goes, the Eclipse debugger is just not ready for prime time (they are working on it).
Insight is a pretty good open-source debugger that can be made to work with the Wiggler JTAG interface. It is already present in the GNUARM directory on C:/Program Files/ installed earlier.
Let’s install the Insight Debugger as an Eclipse External Tool.
Click on “Run – External Tools – External Tools …”
In the External Tools dialog window below, click on “New-configuration” on the left.
Now fill this dialog in as shown below. The Insight Debugger is the executable file “arm-elf-insight.exe” and it’s in the c:/Program Files/GNUARM/bin folder.
You can leave these two text boxes blank for now.
In the External Tools window above, the Insight executable is typed into the Location: text box. You can use the “Browse File System” button to hunt for it.
The “Working Directory” and “Arguments” text box will contain the project’s workspace file folder and the project’s arm-elf executable, in this example “main.out”. For the moment, you can leave these two text boxes blank, we’ll return to them later when we get ready to run the Insight debugger.
Similar to the Philips Flash Utility and the Macraigor OCDremote, we’d like to add the Insight debugger to our list of “favorite” External Tools.
Click on “Run – External Tools – Organize Favorites …”.
In the “Organize External Tools …” window on the left below, click on “Add …” and then “OK”.
In the “Add External Tools Favorites” window on the right below, click and check-mark the Insight debugger select box and then click “OK” to add it as a favorite.
Finally, click on “OK” to officially add Insight as a favorite External Tool.
As one final confidence check, click on the “Run External Tools” button and verify that all three tools are properly installed.
It’s worth mentioning that to run the Insight Graphical Debugger; you will click on OCDremote first to get it running and then click on Insight to start the debugger.
作者: wdefu 发布时间: 2007-03-03
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28