1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
all: frank_module.o frank_app
# simple.o
include ../../rtl.mk
frank_app: frank_app.c
$(CC) ${INCLUDE} ${USER_CFLAGS} -O2 -Wall frank_app.c -o frank_app
frank_module.o: frank_module.c
$(CC) ${INCLUDE} ${CFLAGS} -c frank_module.c -o frank_module.o
#test, remove any modules, load new ones and run app
test: all
@echo "This tests runs two real time tasks that send"
@echo "data down a fifo to a Linux application that"
@echo "prints the data on the terminal"
@echo "One task outputs the data \"Frank\" "
@echo "The other task outputs the data \"Zappa\" "
@echo "This test is due to Michael Barabanov: a fan of the late composer"
@echo "First we remove any existing rtl-modules"
@echo "You may see error warnings from \"make\" - ignore them"
@echo "Type <return> to continue"
@read junk
-rmmod hello
-rmmod sound
-rmmod rt_process
-rmmod frank_module
(cd ../../; scripts/rmrtl)
@echo "Now insert the fifo and scheduler"
@echo "Type <return> to continue"
@read junk
(cd ../../; scripts/insrtl)
@echo "Now start the real-time tasks module"
@echo "Type <return> to continue"
@read junk
@insmod frank_module.o
@echo "Now start the application"
@echo "Type <return> to continue"
@read junk
@./frank_app
-rmmod frank_module
clean:
rm -f frank_app *.o
include $(RTL_DIR)/Rules.make
|