-
Notifications
You must be signed in to change notification settings - Fork 0
Tools
Adding new functionalities in the tool section requires several modifications:
Initially in the ~/projects/lms2012/lmssrc
directory. The Makefile present must be modified to include a new component, this component is added to the list in the SUBDIRS variable.
SUBDIRS = Bluetooth Brick+Datalog Brick+Info Brick+Program IR+Control \
Motor+Control Port+View Sleep Volume WiFi ui c_ui Accessibility
In this case the Tool "Accessibility" has been added to the makefile. It is now known, but lacks resources and proper formatting.
Now that the Accessibility tool is known to the makefile, it's time to add the actual source files that will be compiled when make programs
is invoked in the open_first
directory.
Tool Folders follow this structure
<tool>/<tool>```` Where the root directory of the
contains source files and the second
directory within the root directory contains the compiled source files that will be copied to the
~/projects/lms2012/lms2012/Linux_/tools/```
Initially the Volume folder was copied in its entirety and all instances of Volume was changed to Accessibility. This folder was chosen as it was the simplest tool to understand and modify.
The Tools' Folder Structure
Accessibility ---+------Accessibility-----------------+--144x32_POP1.rgf
+------144x32_POP1.bmp +--Accessibility.rbf
+------AccessibilityIcon.bmp +--icon.rgf
+------Accessibility.lms
+------Makefile
Example paths
~/projects/lms2012/lmssrc/Accessibility/Accessibility/Accessibility.rbf
~/projects/lms2012/lmssrc/Accessibility/Makefile
Before successful building of this new program can be done, the following directories must be created:
~/projects/lms2012/lms2012/Linux_AM1808/tools/Accessibility
~/projects/lms2012/lms2012/Linux_X86/tools/Accessibility
More generally
~/projects/lms2012/lms2012/Linux_AM1808/tools/<new_tool>
~/projects/lms2012/lms2012/Linux_X86/tools/<new_tool>
These directories correspond to the tools output, for specific architectures.
Located within the tools directory their will be Makefile that handles resources, the modified Makefile for Accessibility looks like this:
APP = Accessibility
APP_PATH = tools
PROGRAMS = Accessibility
ICON = AccessibilityIcon
GRAPHICS = 144x32_POP1
include ../rules.mk
The APP variable shall contain the Tools name and nothing else.
This path specifies the install location in ~/projects/lms2012/lms2012/Linux_<Arch>/<APP_PATH>
.
Since this variable is set as tools, the Accessibility tool will be installed in ~/projects/lms2012/lms2012/Linux_<Arch>/tools
.
This variable specifies the tools source programs, in this case it is set to Accessibility. There is no need to add file extensions as the make rules link the file name to the correct extension.
This variable specifies the icon associated with the tool that will be displayed in the tool selection UI menu.
Any graphics used in the program must be specified here.
If this variable exists, this will provide sources for sounds used in the tools program file.
Once the setup is complete the program is ready to be built. Invoke the make file in the open_first
directory to build the newly added program. Once completely, build the lms2012 VM program.
cd ~/projects/lms2012/open_first
make programs
make lms2012
Once these steps are complete run the update_sdcard shell.
./update_sdcard.sh
Boot up and verify that the the new tool is added to the tool menu of the UI.