Eddy DK Programmer Guide
89
4.2
Writing Application Program
This chapter shows how to write an application program for Eddy.
First, create a “hello_world.c” file under the “scr/Eddy_APPs” directody.
4.3
Writing Makefile
To compile an application program, compile information of the application program has to be registered on the
Eddyy_APPs/Makefile directory. The below is description of “Makefile” under directory of src/Eddy_APPs/.
The picture blow shows the environment setting area for an application program compile.
Add a name under the “TARGET” highlighted as red, and register to the compile environment.
#include <stdio.h>
int main()
{
While (1)
{
printf("hello world !!!\n");
sleep (1);
}
}
TARGET = eddy pinetd def ddns_agent \
upgrade portview upgradetftp detect \
tcp_server tcp_client tcp_multiplex tcp_broadcast \
udp rt_test
hello_world
udp : udp.o
rm -f $@
$(CC) $(CFLAGS) $(LDFLAGS) $(IFLAGS) -o $@ $ [email protected] $(LIBS)
$(STRIP) $@
Hello_World : Hello_World.o
Rm -f $@
$(CC) $(CFLAGS) $(LDFLAGS) $(IFLAGS) -o $@ $ [email protected]
$(STRIP) $@
Содержание Eddy DK
Страница 1: ...1 Eddy DK Programmer Guide Ver 2 5 1 1 2011 02 15...
Страница 10: ...Eddy DK Programmer Guide 10 2 3 Eddy CPU v2 1 v2 5...
Страница 36: ...Eddy DK Programmer Guide 36 2 4 4 External Device Interface Description...
Страница 47: ...Eddy DK Programmer Guide 47 Eddy S4M v2 1 Eddy S4M v2 5...