Difference between revisions of "Configuring EMAC OE 4.0 SDK"

From wiki.emacinc.com
Jump to: navigation, search
 
(34 intermediate revisions by 6 users not shown)
Line 1: Line 1:
When Eclipse generates a Makefile to use for building a project, the generated Makefile includes a file named global.properties before it performs any other steps. This file is located in the projects directory, which is the root directory for Eclipse projects. The projects directory is located within the EMAC SDK directory provided by the EMAC SDK package (or installed on the LDC).  
+
{{todo|SEOKWREV(11.06.13-10:44->JG+);(03.04.14-16:15->BS-);(03.19.14-16:30->BS+);(04.14.14-14:40->BS+)|Michael Gloff|project=oe 4,SEOKWREV, mg, md, bs}}
  
The <code>global.properties</code> file provides information needed to build projects and upload them to the target machine (the board supplied by EMAC). The following information is provided by this file:
+
{{#seo:
 +
|title=Configuring EMAC OE 4.0 SDK
 +
|titlemode=append
 +
|keywords=EMAC SDK Configuration,EMAC SDK Remote Set-up
 +
|description=Configuring the EMAC OE 4.0 SDK.
 +
}}
 +
==SDK Configuration==
 +
 
 +
Before compiling source code on the development machine for the target machine, the toolchain libraries for the target machine must be specified.
 +
<cl>
 +
1. Open a terminal window
 +
 
 +
* Navigate to the SDK directory.
 +
<syntaxhighlight lang="bash">
 +
developer@ldc:~$ cd /path/to/sdk/EMAC-OE-arm-linux-gnueabi-SDK_XX.YY/
 +
</syntaxhighlight>
 +
 
 +
* Run the script using the command shown below to produce a menu as shown in Figure 1.
 +
<syntaxhighlight lang="bash">
 +
developer@ldc:~$ ./setmachine.sh
 +
</syntaxhighlight>
 +
 
 +
<br clear=all>
 +
[[File:Emac_oe_sdk_setup-2.png|400px|thumb|left|Figure 1. SDK Machine Selection Dialog]]
 +
 
 +
<br clear=all>
 +
 
 +
* Select the appropriate target machine type and press enter. <br />
 +
The following should be displayed:
 +
</cl>
 +
<syntaxhighlight lang=console>
 +
INFO: Generating new default configuration file.
 +
INFO: Using "./.emac_sdk.conf" as configuration file.
 +
INFO: Using hardware configuration file:
 +
      =>  EMHW_CONF = "/home/developer/EMAC-OE-arm-linux-gnueabi-SDK_4.0/.emac_hw.conf"
 +
INFO:
 +
INFO: ################################################
 +
INFO: ##  Compiler chosen is gcc 4.3.1
 +
INFO: ##  Hardware chosen is Arm v7a
 +
INFO: ################################################
 +
INFO:
 +
INFO: Setting qt name:
 +
      =>  QTNAME = "qt4"
 +
INFO: Chose qmake version:
 +
      =>  QMAKEWORKAROUND = "/home/developer/EMAC-OE-arm-linux-gnueabi-SDK_4.0/qmake_workaround/qmake32"
 +
INFO: update_target_root: need to recreate target_root symlink
 +
Setup complete!
 +
developer@EMAC-LDC-32bit:~/EMAC-OE-arm-linux-gnueabi-SDK_4.0$
 +
</syntaxhighlight>
 +
 
 +
<br clear=all>
 +
 
 +
==Remote Upload Set-up==
 +
 
 +
The global.properties file contains the fields necessary to contact and connect to the target board as well as the paths to the architecture specific libraries.
 +
<cl>
 +
1. Obtain the target machine's current IP address by issuing the following command from a shell on the target system:
 +
<syntaxhighlight lang="bash">
 +
root@emac-oe:~# /sbin/ifconfig eth0 | grep inet
 +
</syntaxhighlight>
 +
 
 +
{{mbox | type=information | text = For more information on how to connect to the remote system, see the [[Network_Connections | '''Network Connections''' ]] and [[Serial_Connections | '''Serial Connections''']] pages.}}
 +
 
 +
* Navigate to the projects directory within the SDK.
 +
<syntaxhighlight lang="bash">
 +
developer@ldc:~$ cd /path/to/sdk/EMAC-OE-arm-linux-gnueabi-SDK_XX.YY/projects
 +
</syntaxhighlight>
 +
 
 +
* Open the global.properties file with a text editor such as vi or gedit.
 +
<br />
 +
The global.properties parameters are shown in Table 1 below.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 7: Line 77:
 
! Configuration variable !! Description  
 
! Configuration variable !! Description  
 
|-
 
|-
| <code>SDKBASE</code> || The base directory for the SDK .
+
| SDKBASE|| The base directory for the SDK.
 
|-
 
|-
| <code>CC</code>, <code>CXX</code> || Exectuable binaries to use for compiling for the C and C++ compiler, respectively.
+
| CC, CXX || Exectuable binaries to use for compiling for the C and C++ compiler, respectively.
 
|-
 
|-
| <code>LD_LIBRARY_PATH</code> || The path the linker should use to search for shared library files.
+
| LD_LIBRARY_PATH || The path the linker should use to search for shared library files.
 
|-
 
|-
| <code>CFLAGS</code> || The flags passed to the compiler to specify target processor architecture, debugging flags, etc.
+
| CFLAGS || The flags passed to the compiler to specify target processor architecture, debugging flags, etc.
 
|-
 
|-
| <code>OFLAGS</code> || The flags passed to the compiler to specify optimization options to use.
+
| OFLAGS || The flags passed to the compiler to specify optimization options to use.
 
|-
 
|-
| <code>TARGET_IP</code> || The IP Address of the target machine (needed for uploading the compiled binary to the target machine).
+
| TARGET_IP || The IP Address of the target machine (needed for uploading the compiled binary to the target machine).
 
|-
 
|-
| <code>LOGIN</code> || The user name to use for logging into the target machine.
+
| LOGIN || The user name to use for logging into the target machine.
 
|-
 
|-
| <code>PASSWORD</code> || The password to use for logging into the target machine.*
+
| PASSWORD || The password to use for logging into the target machine.*
 
|-  
 
|-  
| <code>WPUT</code> ||  The location of the <code>wput</code> command, along with options to pass to <code>wput</code>.
+
| WPUT ||  The location of the <code>wput</code> command, along with options to pass to <code>wput</code>.
 
|}
 
|}
 +
:::::::::::::Table 1. global.properties file contents
 +
<br />
 +
* Modify the TARGET_IP, LOGIN, and PASSWORD as necessary
 +
* Save and close the file
 +
</cl>
 +
 +
{{mbox | type = warning | text =The password is stored in plain text in this file. If development is taking place in a shared environment (such as a University lab) and secrecy of this password is required, simply ensure that only trusted users have read permission for this file. See Linux manual pages documentation for the <code>chmod</code>, <code>chgrp</code>, and <code>chown</code> commands. The user building the software will need read access to any file associated with the build.}}
 +
 +
 +
==See Also==
  
* '''NOTE''' The password is stored in plain text in this file. However, read permission is required to view this password. In most development environments, this should not be an issue. If development is taking place in a shared environment (such as a University lab) and secrecy of this password is required, simply ensure that only trusted users have read permission for this file.
+
* [[Installing EMAC OE 4.0 SDK]]
  
{{mbox | type = warning | text = Configuring permissions on files is a common source of problems for people new to doing so under Linux. EMAC does not recommend altering the default settings (which should be secure in most environments) unless absolutely necessary. EMAC will only be able to provide very limited support should these settings be manually configured. The standard Linux commands, chmod, chgrp, and chown are typically used to configure these permissions. Please see the documentation for these commands using the man command, or find a reference with your favorite search engine. Caveat: This will require any user wishing to build this software to have such permission, since programs run by a user can only read files the user is permitted to use.}}
+
<!--[[Category:EMAC OE SDK]]-->

Latest revision as of 14:37, 14 April 2014

TODO: {{#todo:SEOKWREV(11.06.13-10:44->JG+);(03.04.14-16:15->BS-);(03.19.14-16:30->BS+);(04.14.14-14:40->BS+)|Michael Gloff|oe 4,SEOKWREV, mg, md, bs}}

SDK Configuration

Before compiling source code on the development machine for the target machine, the toolchain libraries for the target machine must be specified.

  1. Open a terminal window

  2. Navigate to the SDK directory.

    developer@ldc:~$ cd /path/to/sdk/EMAC-OE-arm-linux-gnueabi-SDK_XX.YY/
    
  3. Run the script using the command shown below to produce a menu as shown in Figure 1.

    developer@ldc:~$ ./setmachine.sh
    


    Figure 1. SDK Machine Selection Dialog


  4. Select the appropriate target machine type and press enter.
    The following should be displayed:

INFO: Generating new default configuration file.
INFO: Using "./.emac_sdk.conf" as configuration file.
INFO: Using hardware configuration file:
      =>  EMHW_CONF = "/home/developer/EMAC-OE-arm-linux-gnueabi-SDK_4.0/.emac_hw.conf"
INFO: 
INFO: ################################################
INFO: ##  Compiler chosen is gcc 4.3.1
INFO: ##  Hardware chosen is Arm v7a
INFO: ################################################
INFO: 
INFO: Setting qt name:
      =>  QTNAME = "qt4"
INFO: Chose qmake version:
      =>  QMAKEWORKAROUND = "/home/developer/EMAC-OE-arm-linux-gnueabi-SDK_4.0/qmake_workaround/qmake32"
INFO: update_target_root: need to recreate target_root symlink
Setup complete!
developer@EMAC-LDC-32bit:~/EMAC-OE-arm-linux-gnueabi-SDK_4.0$


Remote Upload Set-up

The global.properties file contains the fields necessary to contact and connect to the target board as well as the paths to the architecture specific libraries.

  1. Obtain the target machine's current IP address by issuing the following command from a shell on the target system:

    root@emac-oe:~# /sbin/ifconfig eth0 | grep inet
    
  2. Navigate to the projects directory within the SDK.

    developer@ldc:~$ cd /path/to/sdk/EMAC-OE-arm-linux-gnueabi-SDK_XX.YY/projects
    
  3. Open the global.properties file with a text editor such as vi or gedit.
    The global.properties parameters are shown in Table 1 below.

    Configuration variable Description
    SDKBASE The base directory for the SDK.
    CC, CXX Exectuable binaries to use for compiling for the C and C++ compiler, respectively.
    LD_LIBRARY_PATH The path the linker should use to search for shared library files.
    CFLAGS The flags passed to the compiler to specify target processor architecture, debugging flags, etc.
    OFLAGS The flags passed to the compiler to specify optimization options to use.
    TARGET_IP The IP Address of the target machine (needed for uploading the compiled binary to the target machine).
    LOGIN The user name to use for logging into the target machine.
    PASSWORD The password to use for logging into the target machine.*
    WPUT The location of the wput command, along with options to pass to wput.
    Table 1. global.properties file contents


  4. Modify the TARGET_IP, LOGIN, and PASSWORD as necessary

  5. Save and close the file


See Also