world leader in high performance signal processing
Trace:

Differences

This shows you the differences between two versions of the page.

adding_user_applications [2006/12/08 01:02]
127.0.0.1 external edit
adding_user_applications [2010/01/06 15:46] (current)
rgetz Update with Kconfig info
Line 5: Line 5:
  
 <note important> <note important>
-When editing the **makefiles** described in this section ensure that:\\ +When editing the **makefiles** described in this section ensure that: 
-  * the text editor uses only line feeds (LF) to specify line endings.\\+  * the text editor uses only line feeds (LF) to specify line endings.
   * indents are done with tabs, not spaces.   * indents are done with tabs, not spaces.
 </note> </note>
  
  
-Next the file ''.../uClinux-dist/user/Makefile'' must be edited.  Add a line similar to the following in the included directories section: +Next the file ''./uClinux-dist/user/Makefile'' must be edited.  Add a line similar to the following in the included directories section:
- +
 <code> <code>
 dir_$(CONFIG_USER_MYPROG_MYPROG)            += myprog dir_$(CONFIG_USER_MYPROG_MYPROG)            += myprog
 </code> </code>
- 
  
 If the directory contains two executables, for example //myprog1// and //myprog2//, this is changed to: If the directory contains two executables, for example //myprog1// and //myprog2//, this is changed to:
- 
  
 <code> <code>
 dir_$(CONFIG_USER_MYPROG_MYPROG1)            += myprog dir_$(CONFIG_USER_MYPROG_MYPROG1)            += myprog
- 
 dir_$(CONFIG_USER_MYPROG_MYPROG2)            += myprog dir_$(CONFIG_USER_MYPROG_MYPROG2)            += myprog
 </code> </code>
  
- +Next the file ''./uClinux-dist/user/Kconfig.local'' must be edited.  This file contains the text which will be displayed in the menu when compiling uClinux.  Add an entry similar to the following:
-Next the file ''.../uClinux-dist/config/''''Configure.help'' must be edited.  This file contains the text which will be displayed in the help dialog when compiling uClinux.  Add an entry similar to the following: +
  
 <code> <code>
-CONFIG_USER_MYPROG_MYPROG +config USER_MYPROG_MYPROG1 
-  This is my program+        bool "myprog1" 
 +        help 
 +          myprog1 is a ping(1) like program which uses the Internet Control Message 
 +          Protocol (ICMP) echo request to determine if a host is up. 
 +          Main project is at http://myprog1.sourceforge.net/
 </code> </code>
  
- +You can select, or depend on other packages. For example:
-For two executables in the same directory add entries similar to the following: +
- +
 <code> <code>
-CONFIG_USER_MYPROG_MYPROG1 +config USER_BLUEZ_BCCMD 
-  This is my program+        bool "Bluez bccmd util" 
 +        depends on USER_BLUEZ 
 +        select LIB_LIBUSB 
 +        help 
 +          Utility for the CSR BCCMD interface
 </code> </code>
  
-<code> +Next ensure that there is an appropriate Makefile inside your program's directory, in this example:  ''./uClinux-dist/user/myprog/Makefile''.  This Makefile should have a form similar to the following:
-CONFIG_USER_MYPROG_MYPROG2 +
-  This is my program too +
-</code> +
- +
- +
-Each line of the help text must be indented two spaces.  Also, each line must be less than 70 characters long.  There cannot be any blank lines within the help text. +
- +
- +
- +
-Next the file ''.../uClinux-dist/config/''''config.in'' must be edited.  This file determines which sections programs appear under in the application configuration window.  Under an appropriate section add an entry similar to the following: +
- +
- +
-<code> +
-bool 'myprog' CONFIG_USER_MYPROG_MYPROG +
-</code> +
- +
- +
-For two executables in the same directory add entries similar to the following: +
- +
- +
-<code> +
-bool 'myprog1' CONFIG_USER_MYPROG_MYPROG1 +
-bool 'myprog2' CONFIG_USER_MYPROG_MYPROG2 +
-</code> +
- +
- +
-Next ensure that there is an appropriate Makefile inside your program's directory, in this example:  ''.../uClinux-dist/user/myprog/Makefile''.  This Makefile should have a form similar to the following: +
  
 <code> <code>
Line 122: Line 92:
  
  
-<note tip>Currently the ''...uClinux-dist/user/ping'' may be copied into your own application directory and the EXEC and OBJS variables modified to reflect your own desired executable name, and source object filenames respectively. Examples of more complex directory structures and Makefiles can be found in the ''.../uClinux-dist/user'' directory tree. +<note tip>Currently the ''./uClinux-dist/user/ping'' may be copied into your own application directory and the EXEC and OBJS variables modified to reflect your own desired executable name, and source object filenames respectively. Examples of more complex directory structures and Makefiles can be found in the ''.../uClinux-dist/user'' directory tree. 
 </note> </note>
- 
- 
  
 Once these steps are complete, re-compile the uClinux kernel (see [[basic_compilation|Basic Compilation]]).  Your application should now appear in the **application configuration** window under the section you placed it in.  Ensure your application is selected and continue compiling the kernel.  When compilation is finished load the newly created memory image onto the target system.  If your application compiled successfully it should now appear in the ''/bin'' directory on the target system. Once these steps are complete, re-compile the uClinux kernel (see [[basic_compilation|Basic Compilation]]).  Your application should now appear in the **application configuration** window under the section you placed it in.  Ensure your application is selected and continue compiling the kernel.  When compilation is finished load the newly created memory image onto the target system.  If your application compiled successfully it should now appear in the ''/bin'' directory on the target system.
- 
-