@@ -0,0 +1,44 | |||
|
1 | #------------------------------------------------------------------------------ | |
|
2 | #-- This file is a part of the LPP VHDL IP LIBRARY | |
|
3 | #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS | |
|
4 | #-- | |
|
5 | #-- This program is free software; you can redistribute it and/or modify | |
|
6 | #-- it under the terms of the GNU General Public License as published by | |
|
7 | #-- the Free Software Foundation; either version 3 of the License, or | |
|
8 | #-- (at your option) any later version. | |
|
9 | #-- | |
|
10 | #-- This program is distributed in the hope that it will be useful, | |
|
11 | #-- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
12 | #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
13 | #-- GNU General Public License for more details. | |
|
14 | #-- | |
|
15 | #-- You should have received a copy of the GNU General Public License | |
|
16 | #-- along with this program; if not, write to the Free Software | |
|
17 | #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
18 | #------------------------------------------------------------------------------ | |
|
19 | ||
|
20 | include ../../rules.mk | |
|
21 | LIBDIR = ../../lib | |
|
22 | INCPATH = ../../includes | |
|
23 | SCRIPTDIR=../../scripts/ | |
|
24 | LIBS=-llpp_apb_functions | |
|
25 | INPUTFILE=main.c | |
|
26 | EXEC=exec.bin | |
|
27 | OUTBINDIR=bin/debug/ | |
|
28 | ||
|
29 | ||
|
30 | .PHONY:bin | |
|
31 | ||
|
32 | all:bin | |
|
33 | @echo $(EXEC)" file created" | |
|
34 | ||
|
35 | clean: | |
|
36 | rm -f *.{o,a} | |
|
37 | ||
|
38 | ||
|
39 | ||
|
40 | help:ruleshelp | |
|
41 | @echo " all : makes an executable file called "$(EXEC) | |
|
42 | @echo " in "$(OUTBINDIR) | |
|
43 | @echo " clean : removes temporary files" | |
|
44 |
@@ -0,0 +1,33 | |||
|
1 | #include "stdio.h" | |
|
2 | #include "lpp_apb_functions.h" | |
|
3 | ||
|
4 | ||
|
5 | ||
|
6 | int main() | |
|
7 | { | |
|
8 | int d=0; | |
|
9 | while(d!=10) | |
|
10 | { | |
|
11 | scanf("%d",&d); | |
|
12 | switch(d) | |
|
13 | { | |
|
14 | case 0: | |
|
15 | printf("cursor OFF \n"); | |
|
16 | break; | |
|
17 | case 1: | |
|
18 | printf("cursor ON \n"); | |
|
19 | break; | |
|
20 | case 2: | |
|
21 | break; | |
|
22 | case 3: | |
|
23 | apbprintdeviceslist(); | |
|
24 | break; | |
|
25 | case 10: | |
|
26 | return 0; | |
|
27 | break; | |
|
28 | default: | |
|
29 | break; | |
|
30 | } | |
|
31 | } | |
|
32 | return 0; | |
|
33 | } |
@@ -0,0 +1,1 | |||
|
1 | load bin/exec.bin |
@@ -1,42 +1,44 | |||
|
1 | 1 | #------------------------------------------------------------------------------ |
|
2 | 2 | #-- This file is a part of the LPP VHDL IP LIBRARY |
|
3 | 3 | #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS |
|
4 | 4 | #-- |
|
5 | 5 | #-- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | #-- it under the terms of the GNU General Public License as published by |
|
7 | 7 | #-- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | #-- (at your option) any later version. |
|
9 | 9 | #-- |
|
10 | 10 | #-- This program is distributed in the hope that it will be useful, |
|
11 | 11 | #-- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | #-- GNU General Public License for more details. |
|
14 | 14 | #-- |
|
15 | 15 | #-- You should have received a copy of the GNU General Public License |
|
16 | 16 | #-- along with this program; if not, write to the Free Software |
|
17 |
#-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
|
17 | #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
18 | 18 | #------------------------------------------------------------------------------ |
|
19 | 19 | |
|
20 | 20 | include ../../../rules.mk |
|
21 |
LIBDIR = ../../../lib |
|
|
22 |
INCPATH = ../../../includes |
|
|
21 | LIBDIR = ../../../lib | |
|
22 | INCPATH = ../../../includes | |
|
23 | 23 | SCRIPTDIR=../../../scripts/ |
|
24 | 24 | LIBS=-lapb_lcd_driver -llpp_apb_functions |
|
25 | 25 | INPUTFILE=main.c |
|
26 | 26 | EXEC=main.bin |
|
27 | 27 | OUTBINDIR=bin/ |
|
28 | 28 | |
|
29 | 29 | |
|
30 | .PHONY:bin | |
|
31 | ||
|
30 | 32 | all:bin |
|
31 | 33 | @echo $(EXEC)" file created" |
|
32 | 34 | |
|
33 | 35 | clean: |
|
34 | 36 | rm -f *.{o,a} |
|
35 | 37 | |
|
36 | 38 | |
|
37 | 39 | |
|
38 | 40 | help:ruleshelp |
|
39 | 41 | @echo " all : makes an executable file called "$(EXEC) |
|
40 | 42 | @echo " in "$(OUTBINDIR) |
|
41 | 43 | @echo " clean : removes temporary files" |
|
42 | 44 |
|
1 | NO CONTENT: modified file, binary diff hidden |
|
1 | NO CONTENT: modified file, binary diff hidden |
|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -1,63 +1,63 | |||
|
1 | 1 | #------------------------------------------------------------------------------ |
|
2 | 2 | #-- This file is a part of the LPP VHDL IP LIBRARY |
|
3 | 3 | #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS |
|
4 | 4 | #-- |
|
5 | 5 | #-- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | #-- it under the terms of the GNU General Public License as published by |
|
7 | 7 | #-- the Free Software Foundation; either version 3 of the License, or |
|
8 | 8 | #-- (at your option) any later version. |
|
9 | 9 | #-- |
|
10 | 10 | #-- This program is distributed in the hope that it will be useful, |
|
11 | 11 | #-- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | #-- GNU General Public License for more details. |
|
14 | 14 | #-- |
|
15 | 15 | #-- You should have received a copy of the GNU General Public License |
|
16 | 16 | #-- along with this program; if not, write to the Free Software |
|
17 | 17 | #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | #------------------------------------------------------------------------------ |
|
19 | 19 | |
|
20 | 20 | CC = sparc-elf-gcc |
|
21 | 21 | AR = sparc-elf-ar |
|
22 | 22 | LIBDIR = ../../lib/ |
|
23 |
INCPATH = ../../includes |
|
|
23 | INCPATH = ../../includes | |
|
24 | 24 | SCRIPTDIR=../../scripts/ |
|
25 | 25 | OUTBINDIR=bin/ |
|
26 | 26 | EXEC=exec.bin |
|
27 | 27 | INPUTFILE=main.c |
|
28 | 28 | |
|
29 | 29 | $(FILE): $(FILE).a |
|
30 | 30 | @echo "library ""lib"$(FILE)" created" |
|
31 | 31 | |
|
32 | 32 | |
|
33 | 33 | $(FILE).o: |
|
34 | mkdir tmp | |
|
34 | mkdir -p tmp | |
|
35 | 35 | $(CC) -c $(FILE).c -I $(INCPATH) -o tmp/$(FILE).o |
|
36 | 36 | |
|
37 | 37 | $(FILE).a: $(FILE).o |
|
38 | 38 | $(AR) rs $(LIBDIR)"lib"$(FILE).a tmp/$(FILE).o |
|
39 | 39 | cp *.h $(INCPATH) |
|
40 | 40 | rm -R tmp |
|
41 | 41 | |
|
42 | 42 | load: all |
|
43 | 43 | @echo "load "$(OUTBINDIR)$(EXEC)>$(SCRIPTDIR)load.txt |
|
44 | 44 | grmon-eval -uart $(PORT) -u -c $(SCRIPTDIR)load.txt |
|
45 | 45 | |
|
46 | 46 | bin: |
|
47 | 47 | mkdir -p $(OUTBINDIR) |
|
48 | 48 | $(CC) $(INPUTFILE) -o $(OUTBINDIR)/$(EXEC) -I $(INCPATH) -L $(LIBDIR) -static $(LIBS) |
|
49 | 49 | |
|
50 | 50 | clean: |
|
51 | 51 | rm -f -R tmp |
|
52 | 52 | rm -f *.{o,a} |
|
53 | 53 | rm -f $(INCPATH)*.h |
|
54 | 54 | rm -f $(LIBDIR)*.{o,a} |
|
55 | 55 | |
|
56 | 56 | ruleshelp: |
|
57 | 57 | @echo "" |
|
58 | 58 | @echo "" |
|
59 | 59 | @echo "" |
|
60 | 60 | @echo " load : call grmon-eval and loads "$(EXEC)" in the leon" |
|
61 | 61 | @echo " usage: make PORT=/dev/ttyUSBx load" |
|
62 | 62 | |
|
63 | 63 |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now