Changes between Version 41 and Version 42 of Projects/GSoC/ApplicationConfigurationGUI


Ignore:
Timestamp:
Sep 18, 2013, 10:26:04 PM (6 years ago)
Author:
Shubhamsomani
Comment:

/* Using generated header with Applications */

Legend:

Unmodified
Added
Removed
Modified
  • Projects/GSoC/ApplicationConfigurationGUI

    v41 v42  
    8585
    8686
     87{{{
     88This post will cover on how to use the generated header with applications.
     89
    8790For using the header there are basically 3 major steps-
    8891
     
    9497examples-v2 has a lot of sample applications. You can choose any one of them to use with the header.
    9598For the purpose of this tutorial I will choose the ticker application.
    96 
    9799Step 2)  Generate the header-
    98100
    99101Now open the editor you are most comfortable with and open the init.c file of the particular application.
    100 init.c is the file which contains configuration data of the application. Scroll down and you would see configuration information. For the ticker application the configuration information looks as follows-https://docs.google.com/file/d/0B41ApxXt-m4jckZqN29PMXVXUms/edit
     102init.c is the file which contains configuration data of the application. Scroll down and you would see configuration information. For the ticker application the configuration information looks as follows- {{{ https://docs.google.com/file/d/0B41ApxXt-m4jckZqN29PMXVXUms/edit }}}
    101103
    102104Now since we wish to use the header generated by the GUI for storing our configuration information, we open the GUI. On opening the GUI you will be greeted by a welcome screen. On the welcome screen you would see a box saying open conf.t. Click on that box and go to the location of conf.t (http://git.rtems.org/rtems/tree/doc/user/conf.t) . It should be present in rtems/doc/user/conf.t.
     
    112114
    1131153) Click on the classic API initialization tasks table and set
    114 
    115116CONFIGURE_RTEMS_INIT_TASKS_TABLE
    116 
    117117CONFIGURE_INIT_TASK_STACK_SIZE    (2 * RTEMS_MINIMUM_STACK_SIZE)
    118118
    1191194) Click on the basic system information tab and set
    120 
    121120CONFIGURE_EXTRA_TASK_STACKS       (4 * RTEMS_MINIMUM_STACK_SIZE)
    122121
     
    124123
    125124Now that you have the header, remove the configuration information from init.c and instead replace it with
    126 
    127125 # include "header.h"
    128126
    129 If you do a git diff then it contents should be like this (for ticker's init.c) - http://pastebin.com/d646i1uy
     127If you do a git diff then it contents should be like this (for ticker's init.c) - {{{ http://pastebin.com/d646i1uy }}}
    130128
    131129If you wish you can also save this configuration and use it later for future applications.
     
    136134
    137135These 2 sections would be of great help for learning how to compile and run the application-
    138 
    139136-> http://www.rtems.org/wiki/index.php/Example_Application_Compiling
    140 
    141137-> http://www.rtems.org/wiki/index.php/Quick_Start
    142138
    143139Here I would take SPARC for the purpose of compiling.
    144 Please go to the ticker sub directory do the following steps for compiling and running -
    145 
    146 1) export RTEMS_MAKEFILE_PATH=prefix/sparc-rtems4.11/sis/
    147 
    148 2) export PATH=/opt/rtems-4.11/bin:$PATH
    149 
    150 3) ../rtems/configure --target=sparc-rtems4.11 --enable-rtemsbsp=sis \
    151   --enable-tests=samples --disable-posix
    152 
    153 4)  make
    154 
    155 5) find the ticker executable-
    156 
     140
     1411) Configure the shell to compile the BSP
     142{{{
     143 export RTEMS_MAKEFILE_PATH=prefix/sparc-rtems4.11/sis/
     144}}}
     145
     1462)Add the RTEMS toolset to the PATH
     147
     148{{{
     149export PATH=/opt/rtems-4.11/bin:$PATH
     150}}}
     151
     152
     1533) clone examples-v2 {{{ http://git.rtems.org/examples-v2/ }}} and cd into it
     154{{{
     155cd examples-v2
     156}}}
     157
     1584) build the executable
     159{{{
     160make
     161}}}
     162
     1635) Run the the ticker executable in GDB
     164{{{
    157165sparc-rtems4.11-gdb `find . -name ticker.exe`
    158 
    159 5)
    160 
     166}}}
     167
     1685) Select the sim target in GDB
     169{{{
    161170(gdb) target sim
    162 
    163  Connected to the simulator.
    164 
     171Connected to the simulator.
     172}}}
     173
     174Load and run the executable
     175{{{
    165176(gdb) load
    166 
    167177(gdb) run
     178}}}
    168179
    169180
    170181And voila! your application runs with ease! :)
     182}}}
    171183= TUI Directory Structure =
    172184