Must have Java 1.6+ installed on your local machine
DS-5 Installation Steps
2. Download Android SDK
3. Click on the link to download, in my case I downloaded the .zip file (android-sdk_r15-windows.zip)
4. Download the Android NDK (Native Development Kit) from http://developer.android.com/sdk/ndk
5. Unzip both the NDK and SDK .zip files to a directory
6. Unzip Eclipse .zip to a directory
7. Launch Eclipse and specify the workspace
8. Select Install New Software… from the Help menu
9. Enter the repository information in the Name and Location field
10. Select the ARM DS-5 Community Edition by clicking on the tickbox
11. You should see the Eclipse plug-ins for DS-5 Community Edition with all the necessary components shown.
12. Select the radio button for I accept the terms of the license agreements and click on Finish button
13. You will see the progress of the components being installed . Depending on your internet connection it will take few minutes to 15-20min to complete the downloading and installing of the components.
14. Click on Restart Now
15. When Eclipse has started select the Install Community Edition license and click Continue button
Android SDK Configuration
1. Install ADT (Android Development Toolkit) plugin
2. Select the Developer Tools check box to select the components that need to be installed
3. Check to make sure all the necessary components have been selected.
4. Select I accept the terms of the license agreements
5. The installation process will start and wait until it’s completed
6. You will get a Warning message to tell you that the software content is not signed, for this just click Ok button
7. Click on Restart Now
8. Select Window –> Preferences
9. Select Android from the Preferences window and click on Browse… button to select the SDK location
10. You will get Android SDK Verification message box, click on Ok button
11. Exit Eclipse
12. Run SDK Manager.exe
13. Make sure the following are selected
- Android SDK Platform-tools
- Documentation for Android SDK
- SDK Platform
- Samples for SDK
- ARM EABI v7a System Image
- Google APIs by Google Inc.
14. Select Accept All and click Install button
15. Wait until the downloading complete. The download process will take sometime as it’s downloading quite a number of files for the SDK.
16. Click on Yes once you are done
17. Open the AVD Manager by selecting Windows –> AVD Manager
18. Click on New… button
19. Enter the information for creating a new AVD (Android Virtual Device) and click on Create AVD
20. Click on the Start… button to bring up the Launch Options dialog box. Click on Launch button.
21. If everything goes well you should be able to see the following Ice Cream Sandwich (Android 4.0) startup screen.
Once you are able to see the Android home screen your setup is complete
How To Run NDK Sample Application
1. Change to your NDK directory and execute the command ndk-build -C samples/hello-neon in your command prompt as shown below
2. Open up Eclipse and select File –> New –> Project and select Android Project
3. Type in the name of the project and for the Location field select the sample hello-neon and click on Finish button
4. Once the project has been imported double-click on AndroidManifest.xml and select the Application tab. Once it’s opened click on the Application Attributes heading, you will see the Debuggable option and select true . Save the file before moving on to the next steps.
5. Run the application by right clicking on the hello-neon project and select Run As and select Android Application
6. You will see on the Console tab the following messages
7. You will see the application run in the emulator as follows
How To Setup Debugging
1. Open the debug perspective by select Window –> Open Perspective –> Debug
2. Open the debug perspective by select Window –> Open Perspective –> DS-5 Debug.You will see screen similar to the following screen shot
3. Open up the debug configuration by selecting Run –> Debug Configurations
4. Create a new configuration by clicking on the New launch configuration button. Untick the Connect as root and check make sure that your physical device (mobile phone/tablet) is connected properly to the USB and the ID is shown in the Connections drop down box.
If any of the above information are not done properly the tab will have an error on it like so
5. Fill in the following under the Files and click on the Workspace… button to browse for the project and select the hello-neon project. Do the same step for both the Project directory and APK file.
6. Fill in the following under Debugger tab
1. Switch to DS-5 Debug mode
2. Open up the helloneon.c file and put a break point on line 109 and 113. Double click on the blue line of the left side of the screen to put the breakpoint in (a small blue color circle)
3. To start debugging click on the DS-5 debug icon or go to Run –> Debug Configurations and select the helloNeon under the DS-5 Debugger section. Click on the Debug button on Debug Configurations box.
4. Once the application is running on your device you can see the breakpoint will be hit at the line that you setup from the previous step
5. To connect or disconnect the debugging session use the connect and disconnect button in the Debug Control
Problem and Fixes
1. If your ARM menus from the Help menu does not show up it’s because it cannot find the license key. What you must do is make sure you have the proper location of your eclipse directory in your PATH folder
2. If you are getting the following error meaning that you have not compiled the program to generate the .so file. Follow step 1 from the How To Run NDK Sample Application section.
3. If you are getting the following error this means that the .apk has not been generated
the easiest way to resolve this is to run the application by right clicking on the hello-neon project and select Run As and select Android Application. Once the application has been exported to your phone do the debugging steps again.
4. If your breakpoint is not triggered when the app hit that line that means that most probably the gdbserver that Eclipse is using is not from DS-5 version. This is what you have to do. Go to Help –> ARM Extras
It will open up a folder that contains the gator and gdbserver directories.
Go to the gdbserver/android directory and copy the gdbserver-stat-7.1 file into your project folder, in my case it’s copied into the C:\DS-5\android-ndk-r7-windows\samples\hello-neon\libs\armeabi and C:\DS-5\android-ndk-r7-windows\samples\hello-neon\libs\armeabi-v7a directory. Once copied delete the old gdbserver and rename the copied file from gdbserver-stat-7.1 to gdbserver
Once this step is done you should be able to see your breakpoint hit.
Update 2/March/2012: Added the following video uploaded by ARM