##// END OF EJS Templates
Fixed Makefile (C drivers) for mingw users
yannic -
r34:21db59beeea7 default
parent child
Show More
@@ -1,37 +1,42
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 .PHONY:exemples lib
21
22 all:
23 make all -C libsrc
24 make all -C exemples
25
26
27 exemples:
28 make all -C exemples
29
30
31 lib:
32 make all -C libsrc
33
34
35 clean:
36 rm lib/*
37 rm includes/*
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
21
22 all:
23 mkdir -p lib/
24 mkdir -p includes/
25 make all -C libsrc
26 make all -C exemples
27
28 .PHONY:exemples lib
29
30 exemples:
31 make all -C exemples
32
33
34 lib:
35 mkdir -p lib/
36 mkdir -p includes/
37 make all -C libsrc
38
39
40 clean:
41 rm lib/*
42 rm includes/*
1 NO CONTENT: modified file, binary diff hidden
@@ -1,64 +1,34
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
22
23
24 all:
25 make all -C AMBA
26 make all -C LCD
27 make all -C DAC
28
29
30 cleanall:
31 make clean -C AMBA
32 make clean -C LCD
33 make clean -C DAC
34 #------------------------------------------------------------------------------
35 #-- This file is a part of the LPP VHDL IP LIBRARY
36 #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS
37 #--
38 #-- This program is free software; you can redistribute it and/or modify
39 #-- it under the terms of the GNU General Public License as published by
40 #-- the Free Software Foundation; either version 3 of the License, or
41 #-- (at your option) any later version.
42 #--
43 #-- This program is distributed in the hope that it will be useful,
44 #-- but WITHOUT ANY WARRANTY; without even the implied warranty of
45 #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 #-- GNU General Public License for more details.
47 #--
48 #-- You should have received a copy of the GNU General Public License
49 #-- along with this program; if not, write to the Free Software
50 #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 #------------------------------------------------------------------------------
52
53 include ../rules.mk
54
55
56
57 all:
58 make all -C AMBA
59 make all -C LCD
60
61
62 cleanall:
63 make clean -C AMBA
64 make clean -C LCD
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
22
23
24 all:
25 make all -C AMBA
26 make all -C LCD
27 make all -C DAC
28
29
30 cleanall:
31 make clean -C AMBA
32 make clean -C LCD
33 make clean -C DAC
34
@@ -1,70 +1,67
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 CC = sparc-elf-gcc
21 AR = sparc-elf-ar
22 LIBDIR = ../../lib/
23 INCPATH = ../../includes
24 SCRIPTDIR=../../scripts/
25 OUTBINDIR=bin/
26 EXEC=exec.bin
27 INPUTFILE=main.c
28
29
30 all:bin
31 @echo " "
32
33
34 $(FILE): $(FILE).a
35 @echo "library ""lib"$(FILE)" created"
36
37
38 $(FILE).o:
39 mkdir -p tmp
40 $(CC) -c $(FILE).c -I $(INCPATH) -o tmp/$(FILE).o
41
42 $(FILE).a: $(FILE).o
43 $(AR) rs $(LIBDIR)"lib"$(FILE).a tmp/$(FILE).o
44 cp *.h $(INCPATH)
45 rm -R tmp
46
47 load: all
48 @echo "load "$(OUTBINDIR)$(EXEC)>$(SCRIPTDIR)load.txt
49 grmon-eval -uart $(PORT) -u -c $(SCRIPTDIR)load.txt
50
51 bin:
52 mkdir -p $(OUTBINDIR)
53 $(CC) $(INPUTFILE) -o $(OUTBINDIR)/$(EXEC) -I $(INCPATH) -L $(LIBDIR) -static $(LIBS)
54
55
56 clean:
57 rm -f -R tmp
58 rm -f *.{o,a}
59 rm -f $(INCPATH)*.h
60 rm -f $(LIBDIR)*.{o,a}
61
62
63 ruleshelp:
64 @echo ""
65 @echo ""
66 @echo ""
67 @echo " load : call grmon-eval and loads "$(EXEC)" in the leon"
68 @echo " usage: make PORT=/dev/ttyUSBx load"
69
70
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 CC = sparc-elf-gcc
21 AR = sparc-elf-ar
22 LIBDIR = ../../lib/
23 INCPATH = ../../includes
24 SCRIPTDIR=../../scripts/
25 OUTBINDIR=bin/
26 EXEC=exec.bin
27 INPUTFILE=main.c
28
29
30
31 $(FILE): $(FILE).a
32 @echo "library ""lib"$(FILE)" created"
33
34
35 $(FILE).o:
36 mkdir -p tmp
37 $(CC) -c $(FILE).c -I $(INCPATH) -o tmp/$(FILE).o
38
39 $(FILE).a: $(FILE).o
40 $(AR) rs $(LIBDIR)"lib"$(FILE).a tmp/$(FILE).o
41 cp *.h $(INCPATH)
42 rm -R tmp
43
44 load: all
45 @echo "load "$(OUTBINDIR)$(EXEC)>$(SCRIPTDIR)load.txt
46 grmon-eval -uart $(PORT) -u -c $(SCRIPTDIR)load.txt
47
48 bin:
49 mkdir -p $(OUTBINDIR)
50 $(CC) $(INPUTFILE) -o $(OUTBINDIR)/$(EXEC) -I $(INCPATH) -L $(LIBDIR) -static $(LIBS)
51
52
53 clean:
54 rm -f -R tmp
55 rm -f *.{o,a}
56 rm -f $(INCPATH)*.h
57 rm -f $(LIBDIR)*.{o,a}
58
59
60 ruleshelp:
61 @echo ""
62 @echo ""
63 @echo ""
64 @echo " load : call grmon-eval and loads "$(EXEC)" in the leon"
65 @echo " usage: make PORT=/dev/ttyUSBx load"
66
67
@@ -31,9 +31,11 allGPL:
31 31 @echo "Scanning H files ..."
32 32 sh $(SCRIPTSDIR)/GPL_Patcher.sh -R h LPP_drivers
33 33
34 init:
34 init: C-libs
35 35 sh $(SCRIPTSDIR)/vhdlsynPatcher.sh
36 36 sh $(SCRIPTSDIR)/makeDirs.sh lib/lpp
37
38 C-libs:
37 39 make -C LPP_drivers
38 40
39 41 Patch-GRLIB: init doc
@@ -40,6 +40,24 constant LPP_LCD_CTRLR : amba_d
40 40 constant LPP_UART : amba_device_type := 16#006#;
41 41 constant LPP_CNA : amba_device_type := 16#007#;
42 42 constant LPP_ADC_7688 : amba_device_type := 16#008#;
43 constant LPP_CHENILLARD : amba_device_type := 16#009#;
44
45 component APB_CHENILLARD is
46 generic (
47 pindex : integer := 0;
48 paddr : integer := 0;
49 pmask : integer := 16#fff#;
50 pirq : integer := 0;
51 abits : integer := 8);
52 port (
53 rst : in std_ulogic;
54 clk : in std_ulogic;
55 RegLed : in std_logic_vector (7 downto 0);
56 apbi : in apb_slv_in_type;
57 apbo : out apb_slv_out_type;
58 Leds : out std_logic_vector (7 downto 0)
59 );
60 end component;
43 61
44 62 component APB_SIMPLE_DIODE is
45 63 generic (
@@ -1,5 +1,4
1 APB_CHENILLARD.vhd
1 2 APB_MULTI_DIODE.vhd
2 APB_MULTI_DIODE.vhd.orig
3 3 APB_SIMPLE_DIODE.vhd
4 APB_SIMPLE_DIODE.vhd.orig
5 4 lpp_amba.vhd
General Comments 0
You need to be logged in to leave comments. Login now