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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
all: sched_toggle.o rtc_toggle.o rectangle.o
MYCFLAGS = -O2 -Wall
include ../../../rtl.mk
sched_toggle.o: sched_toggle.c common.h
$(CC) ${INCLUDE} ${CFLAGS} -c sched_toggle.c
rtc_toggle.o: rtc_toggle.c common.h
$(CC) ${INCLUDE} ${CFLAGS} -c rtc_toggle.c
rtc_toggle_fifo.o: rtc_toggle_fifo.c common.h
$(CC) ${INCLUDE} ${CFLAGS} -c -o rtc_toggle_fifo.o rtc_toggle_fifo.c
sine_wave.o: sine_wave.c common.h
$(CC) ${INCLUDE} ${CFLAGS} -c -o sine_wave.o sine_wave.c
$(LD) -r -static -o sine_wave sine_wave.o -L/usr/lib -lm
rectangle.o: rectangle.c
$(CC) ${INCLUDE} ${CFLAGS} -c -o rectangle.o rectangle.c
monitor: monitor.c
$(CC) ${INCLUDE} ${MYCFLAGS} -o monitor monitor.c
#test, remove any modules, load new ones and run app
test_sched:
@echo "Type <return> to continue"
@read junk
@make stop_test
@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 frank_module
(cd $(RTL_DIR); ./rmrtl)
@echo "Now insert the fifo and the scheduler"
@echo "Type <return> to continue"
@read junk
(cd $(RTL_DIR); ./insrtl)
@echo "Now start the real-time tasks module"
@echo "Type <return> to continue"
@read junk
@insmod sched_toggle.o
test_rectangle:
@echo "Type <return> to continue"
@read junk
@make stop_test.o
@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 frank_module
(cd $(RTL_DIR); ./rmrtl)
@echo "Now insert the fifo and the scheduler"
@echo "Type <return> to continue"
@read junk
(cd $(RTL_DIR); ./insrtl)
@echo "Now start the real-time tasks module"
@echo "Type <return> to continue"
@read junk
@insmod rectangle.o
test_rtc:
@make stop_test
@insmod rtc_toggle
#This should be done with modeprobe to clear all rt modules
# but it works this brute force way too.
stop_test:
-rmmod frank_module
-rmmod rtc_toggle
-rmmod rectangle
-rmmod sched_toggle
-rmmod rt_process
-rmmod rtl_fifo
-rmmod rtl_sched
-rmmod rtl_fpsched
clean:
rm -f *.o
include $(RTL_DIR)/Rules.make
|