3. Create a "Hello world" application
This tutorial demonstrates how to create and launch your first application on your device using Eclipse and Digi plug-ins.
Before starting development for your ConnectCore platform, make sure your device is correctly connected, powered, and running. See Step 2: Set up the hardware and Step 3: Program the Yocto firmware.
Once your device is ready for development, follow these steps:
3.1. Create the project
- Select File > New > Project to open the New Project wizard
- Select C Project under the C/C++ category.
- Click Next. The C Project wizard opens.
- Type hello_world in the Project name text box.
- In the Project type list, expand the Executable category.
- Select the Hello World ANSI C Project.
- Select DEY Cross GCC from the Toolchains list.
- Click Finish to create the project.
The hello_world project appears in the Project Explorer view.
3.2. Build the project
- Select the hello_world project in the Project Explorer view.
- Click the Build Active Configuration toolbar button
.
The build output appears in the Console view. The application binary is generated inside the Debug project directory.
3.3. Launch the application
- Select the hello_world project in the Project Explorer view.
- Right click and select Run As > DEY C/C++ Remote Application from the context menu. The Connection dialog opens.
- Select a connection to your device:
- Click New Connection. The New Connection wizard opens.

- Select Generic Connection. Click Next.

- Click Browse to look for devices. The Select Target dialog opens. It lists all the targets in the neighborhood with their corresponding IP.
How to find the IP of your device Find the IP of your device with the ifconfig command:
root@ccimx6ulsbc:~# ifconfig eth0 Link encap:Ethernet HWaddr 00:40:9D:98:A6:37 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) eth1 Link encap:Ethernet HWaddr 00:40:9D:98:A6:36 inet addr:192.168.42.30 Bcast:10.101.2.255 Mask:255.255.255.0 inet6 addr: fe80::240:9dff:fe98:a636%lo/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1360759 errors:0 dropped:0 overruns:0 frame:0 TX packets:172594 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:163158464 (155.5 MiB) TX bytes:29408643 (28.0 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1%1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:22 errors:0 dropped:0 overruns:0 frame:0 TX packets:22 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:1581 (1.5 KiB) TX bytes:1581 (1.5 KiB) wlan0 Link encap:Ethernet HWaddr 00:40:9D:98:A6:38 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) wlan1 Link encap:Ethernet HWaddr 02:03:7F:D7:00:01 inet addr:192.168.46.30 Bcast:192.168.46.255 Mask:255.255.255.0 inet6 addr: fe80::3:7fff:fed7:1%lo/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:21770 errors:0 dropped:3 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:6312817 (6.0 MiB)
In this example, the target IP address is 192.168.42.30.
Note Your device and your host machine must be in the same network.
- Select your device. Click OK.
- You can also change the default connection name in the Connection Name text box.
- Click Finish to create the connection.
- Click New Connection. The New Connection wizard opens.
- Select the new created connection and click OK.
The application is automatically transferred to the device and executed.
When the application is launched, the Terminal view displays the "Hello world" message.
You have successfully created and executed a Hello World application in your ConnectCore device. Follow the next steps to create another application to interact with your hardware.
PDF
