Application – Solvline PB2xxxUG User Manual

Page 89

Advertising
background image

1). Makefile

# cross-compiler

CC = powerpc-linux-gcc -mcpu=860

# To strip all the debug and line numbering information out of the binary file

STRIP = powerpc-linux-strip

# PORTBASE-SDK.o = Portbase SDK Librity

User_Program_Name : User_Program_Name.c

$(CC) User_Program_Name.c PORTBASE-SDK.o -o User_Program_Name

$(STRIP) User_Program_Name






5. Application

It’s following for application of user program.

8) Type your source code.
9) Compile this code by cross-complier and create object file.
10) Compress the object file to “user.zip” file name.

(You should be less than 250000 bytes the size of “user.zip” file.)

11) Upload to Portbase, using ftp program.

(Username: portbase, Default password: 9999)

12) Portbase will reboot atomically, after uploading at “/home/portbase” directory.
13) Set your program to configuration of Portbase, using a telnet or web.

<Telnet program>

% set port 1 protocol user

(Set your program to port number 1)

% set port 1 name user_program_name

(Set the name of user program to port number 1)

% reboot

(System shut down and will restart.)

89

Advertising