beautypg.com

ProSoft Technology MVI56E-LDM User Manual

Page 35

background image

ControlLogix Platform ♦ "C" Programmable

Development Environment

Linux Application Development Module

Developer's Manual

ProSoft Technology, Inc.

Page 29 of 264

March 12, 2014

FTP Transfer
For FTP Transfer, use any ftp transfer program such as FileZilla (https://filezilla-
project.org/ https://filezilla-project.org/) from the Windows environment.
Use FileZilla to connect to the target by specifying the MVI56E-LDM's IP
address.
Download the application image to the desired directory on the LDM using the ftp
transfer program.
Since Windows does not have the same detailed permissions as Linux, you will
have to change the file permissions on the application once on the target. Use
the command chmod a+x filename which adds the execute attribute to the
application.
Creating a Download Image
An image contains all of the application-specific components required for the
user application. This includes the executable(s), application-specific shared
libraries, scripts, web pages, and data files. It does not contain the operating
system or common components that are already on the target device.
The image is a compressed tar file of the application components. Once created,
use the device's web page to download the firmware upgrade. The tar file name
is specified in "Image Contents". In the sample image, the firmware files is
'firmware/mvi56e-ldm.firmware revision date'. This firmware file is downloaded to
the directory

/psfttmp

on the target device. Upon system restart, the system

startup scripts unpack the tar file into the psfttmp directory. The script

/psfttmp/install

is executed to move the component files into their final

destination.
A sample install file is included with the sample applications.
The first step is to create all of the components that will be part of the system.
This mainly involves compiling and linking executables and shared libraries.
Modify any web pages and data files that will be needed. Lastly, update the
install script.

Image Contents
Each component file to be included in the image is listed in the file
'imagecontents' found in the build directory structure for the specific application.
This file contains header information about the image and a list of entries
describing the files to be added to the image. The format of the entry is as
shown:
Add source destination file permissions
where the source file is the path to the file to be included. The destination file is
the full path name of the file on the destination on the target device. Permissions
are the Linux style permissions of the file on the destination.
For example, a line to add the LED_Sample application looks like:

Add ../../src/ldm/led_sample/Release/Led_Sample /psft/sample/Led_Sample

rwxrwxr-x