Menu
Eclipse is an open-source Integrated Development Environment (IDE) supported by IBM. The mother site is @ www.eclipse.org.Eclipse is popular for Java project development. It also supports C/C++, PHP, Python, Perl, and other web project developments via extensible plug-ins. Eclipse is cross-platform and runs under Windows, Linux and Mac. Eclipse CDT on Mac OS X January 17, 2008 Dirk Raffel 9 Comments Nowadays, it seems that the Eclipse C/C++ Development Tools (CDT) is quickly becoming a de-facto standard especially for Embedded Development.
This article describes how to setup Eclipse IDE for C/C Developers and OpenWrt SDK to build and debug programs running on LinkIt Smart 7688 development board. After proper setup, Eclipse will be able to build, upload and attach debugger to your C/C program that runs on target LinkIt Smart 7688 development board.
This can be pretty helpful if you are writing your own C/C programs. Prerequisites. LinkIt Smart 7688 or LinkIt Smart 7688 Duo development platform. Mac OS X or Ubuntu Linux machine to run the OpenWrt SDK. If you haven't set it up yet, follow the to make sure the SDK is ready to use. Eclipse IDE requires JVM. Follow the IDE instructions to install the corresponding JVM version.
Quick steps. Install and setup SFTP on LinkIt Smart 7688 development board with opkg.
Install Eclipse C/C GCC Cross Compiler Support and Remote System explorer End-User Runtime. Newer versions of Eclipse may have these packages installed already. Create an Eclipse C/C Cross GCC project. Setup STAGINGDIR environment variable, tool command prefix, tool path and GDB tool path in the project settings.
Build and setup sign-in password to LinkIt Smart 7688 development board. The IDE will automatically build, upload and execute the resulting binary. Step-by-step Download and setup OpenWrt SDK Follow the to download and install the SDK first. Enable SFTP on LinkIt Smart 7688 development board First we need to prepare the board to enable the SFTP service. This allows Eclipse IDE to upload binaries and debug files to the board.
Make sure your board is connected to the internet and you have access to the system console. Enter following commands to install and enable the SFTP service.
Opkg update opkg install vsftpd openssh-sftp-server /etc/init.d/vsftpd enable /etc/init.d/vsftpd start Install and setup Eclipse IDE for C/C developers Download the C/C package of the Eclipse IDE:. Download and install.
Depending on your system, you may need to install JDK (not JRE) if the Eclipse IDE complains about incorrect JVM version. Create and configure C project Create a Hello World project that uses cross compilation toolchain from the LinkIt Smart 7688 OpenWrt SDK.
Launch the IDE, click File, then New and then Project. In the New Project wizard, select C Project and click Next. Select Hello World ANSI C Project under Executables and Cross GCC from Toolchains, as shown below. If there is no Cross GCC option, install C/C GCC Cross Compiler Support.
To install the Cross Compiler Support, Navigate to Help then Install new Software., find C/C GCC Cross Compiler Support (org.eclipse.cdt.build.crossgcc) and install it. Continue the steps in the wizard until you see the Cross GCC Command settings, as shown below:. Click Finish and the wizard to create the project. Setup the STAGINGDIR environment variable required by OpenWrt SDK. From the menu click Project then Properties. Navigate to Environment under C/C Build.
Here you can set additional environment variables required by the build system. Variable: STAGINGDIR.
Value: OpenWrtSDK/stagingdir/ where OpenWrtSDK is the path to your OpenWrt SDK directory. An example setup is shown below: Build the Hello World project Since the code is already generated by the wizard, proceed to build the project. Click Project then Build All from the main menu. If the setup is correct, you should see a build log similar to this. OpenWrtSDK/stagingdir/toolchain-mipsel24kec+dspgcc-4.8-linarouClibc-0.9.33.2/bin/mipsel-openwrt-linux-uclibc-gdb where OpenWrtSDK is the path to the OpenWrt SDK. Click Apply then Debug.
The IDE will now upload the built executable to LinkIt Smart 7688 development board through SFTP service. Enter the root password of the board, if the IDE prompts you to do so.
The IDE now starts a gdbserver on the board, then connects Eclipse debug view to it. By default, it will break at the first line of the main function. You've now successfully built and debugged and application on Eclipse IDE with LinkIt Smart 7688 as a target device. You may use this reference application for further development. References. Powered by and the.