beautypg.com

Execute a file on booting of eddy, 10 execute a file on booting of eddy – Solvline Eddy DK User Manual

Page 94

background image

Eddy DK Programmer Guide

94

After switching to Executable Mode, execute the file by entering ‚/hello_world‛.
To terminate a program, press ‚Ctr‛ and ‚C‛ key simultaneously.

4.10 Execute a file on Booting of Eddy

If auto running is not necessary, you can skip this section.

If the application is successfully executed on Eddy, make a firmware image and load to Flash memory of Eddy to
execute on booting.
Register the application to ‚pinetd.c‛ on the folder of Eddy_APPS.


If ‚printed.c‛ is modified, a user must re-compile it by executing ‚make pinetd‛ as above example of section
4.4.

# ls
hello_world

login.id

thttpd.log

login.pw

thttpd.pid

utmp

. . .

#
# chmod 777 hello_world
#
#

./hello_world

Welcome to Eddy !
Welcome to Eddy !
Welcome to Eddy !
Welcome to Eddy !

//<=================================================================
// Here User Application Launching !!
// -----------------------------------------------------------------------------------
//
// ex) Task_Launch ("/sbin/hello", argument);
// | |
// | +---- Integer argument
// +--------------- Application name with path
//
//=================================================================>
Task_Launch ("/sbin/hello_world", 0);

signal(SIGCHLD, sig_chld);