##// END OF EJS Templates
Fixed Makefile (C drivers) for mingw users
yannic -
r34:21db59beeea7 default
parent child
Show More
@@ -1,37 +1,42
1 #------------------------------------------------------------------------------
1 #------------------------------------------------------------------------------
2 #-- This file is a part of the LPP VHDL IP LIBRARY
2 #-- This file is a part of the LPP VHDL IP LIBRARY
3 #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS
3 #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS
4 #--
4 #--
5 #-- This program is free software; you can redistribute it and/or modify
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
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
7 #-- the Free Software Foundation; either version 3 of the License, or
8 #-- (at your option) any later version.
8 #-- (at your option) any later version.
9 #--
9 #--
10 #-- This program is distributed in the hope that it will be useful,
10 #-- This program is distributed in the hope that it will be useful,
11 #-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #-- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 #-- GNU General Public License for more details.
13 #-- GNU General Public License for more details.
14 #--
14 #--
15 #-- You should have received a copy of the GNU General Public License
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
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 .PHONY:exemples lib
20
21
21
22 all:
22 all:
23 make all -C libsrc
23 mkdir -p lib/
24 make all -C exemples
24 mkdir -p includes/
25
25 make all -C libsrc
26
26 make all -C exemples
27 exemples:
27
28 make all -C exemples
28 .PHONY:exemples lib
29
29
30
30 exemples:
31 lib:
31 make all -C exemples
32 make all -C libsrc
32
33
33
34
34 lib:
35 clean:
35 mkdir -p lib/
36 rm lib/*
36 mkdir -p includes/
37 rm includes/*
37 make all -C libsrc
38
39
40 clean:
41 rm lib/*
42 rm includes/*
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -1,64 +1,34
1 #------------------------------------------------------------------------------
1 #------------------------------------------------------------------------------
2 #-- This file is a part of the LPP VHDL IP LIBRARY
2 #-- This file is a part of the LPP VHDL IP LIBRARY
3 #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS
3 #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS
4 #--
4 #--
5 #-- This program is free software; you can redistribute it and/or modify
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
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
7 #-- the Free Software Foundation; either version 3 of the License, or
8 #-- (at your option) any later version.
8 #-- (at your option) any later version.
9 #--
9 #--
10 #-- This program is distributed in the hope that it will be useful,
10 #-- This program is distributed in the hope that it will be useful,
11 #-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #-- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 #-- GNU General Public License for more details.
13 #-- GNU General Public License for more details.
14 #--
14 #--
15 #-- You should have received a copy of the GNU General Public License
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
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 include ../rules.mk
20 include ../rules.mk
21
21
22
22
23
23
24 all:
24 all:
25 make all -C AMBA
25 make all -C AMBA
26 make all -C LCD
26 make all -C LCD
27 make all -C DAC
27 make all -C DAC
28
28
29
29
30 cleanall:
30 cleanall:
31 make clean -C AMBA
31 make clean -C AMBA
32 make clean -C LCD
32 make clean -C LCD
33 make clean -C DAC
33 make clean -C DAC
34 #------------------------------------------------------------------------------
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,70 +1,67
1 #------------------------------------------------------------------------------
1 #------------------------------------------------------------------------------
2 #-- This file is a part of the LPP VHDL IP LIBRARY
2 #-- This file is a part of the LPP VHDL IP LIBRARY
3 #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS
3 #-- Copyright (C) 2010, Laboratory of Plasmas Physic - CNRS
4 #--
4 #--
5 #-- This program is free software; you can redistribute it and/or modify
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
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
7 #-- the Free Software Foundation; either version 3 of the License, or
8 #-- (at your option) any later version.
8 #-- (at your option) any later version.
9 #--
9 #--
10 #-- This program is distributed in the hope that it will be useful,
10 #-- This program is distributed in the hope that it will be useful,
11 #-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #-- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 #-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 #-- GNU General Public License for more details.
13 #-- GNU General Public License for more details.
14 #--
14 #--
15 #-- You should have received a copy of the GNU General Public License
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
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 CC = sparc-elf-gcc
20 CC = sparc-elf-gcc
21 AR = sparc-elf-ar
21 AR = sparc-elf-ar
22 LIBDIR = ../../lib/
22 LIBDIR = ../../lib/
23 INCPATH = ../../includes
23 INCPATH = ../../includes
24 SCRIPTDIR=../../scripts/
24 SCRIPTDIR=../../scripts/
25 OUTBINDIR=bin/
25 OUTBINDIR=bin/
26 EXEC=exec.bin
26 EXEC=exec.bin
27 INPUTFILE=main.c
27 INPUTFILE=main.c
28
28
29
29
30 all:bin
30
31 @echo " "
31 $(FILE): $(FILE).a
32
32 @echo "library ""lib"$(FILE)" created"
33
33
34 $(FILE): $(FILE).a
34
35 @echo "library ""lib"$(FILE)" created"
35 $(FILE).o:
36
36 mkdir -p tmp
37
37 $(CC) -c $(FILE).c -I $(INCPATH) -o tmp/$(FILE).o
38 $(FILE).o:
38
39 mkdir -p tmp
39 $(FILE).a: $(FILE).o
40 $(CC) -c $(FILE).c -I $(INCPATH) -o tmp/$(FILE).o
40 $(AR) rs $(LIBDIR)"lib"$(FILE).a tmp/$(FILE).o
41
41 cp *.h $(INCPATH)
42 $(FILE).a: $(FILE).o
42 rm -R tmp
43 $(AR) rs $(LIBDIR)"lib"$(FILE).a tmp/$(FILE).o
43
44 cp *.h $(INCPATH)
44 load: all
45 rm -R tmp
45 @echo "load "$(OUTBINDIR)$(EXEC)>$(SCRIPTDIR)load.txt
46
46 grmon-eval -uart $(PORT) -u -c $(SCRIPTDIR)load.txt
47 load: all
47
48 @echo "load "$(OUTBINDIR)$(EXEC)>$(SCRIPTDIR)load.txt
48 bin:
49 grmon-eval -uart $(PORT) -u -c $(SCRIPTDIR)load.txt
49 mkdir -p $(OUTBINDIR)
50
50 $(CC) $(INPUTFILE) -o $(OUTBINDIR)/$(EXEC) -I $(INCPATH) -L $(LIBDIR) -static $(LIBS)
51 bin:
51
52 mkdir -p $(OUTBINDIR)
52
53 $(CC) $(INPUTFILE) -o $(OUTBINDIR)/$(EXEC) -I $(INCPATH) -L $(LIBDIR) -static $(LIBS)
53 clean:
54
54 rm -f -R tmp
55
55 rm -f *.{o,a}
56 clean:
56 rm -f $(INCPATH)*.h
57 rm -f -R tmp
57 rm -f $(LIBDIR)*.{o,a}
58 rm -f *.{o,a}
58
59 rm -f $(INCPATH)*.h
59
60 rm -f $(LIBDIR)*.{o,a}
60 ruleshelp:
61
61 @echo ""
62
62 @echo ""
63 ruleshelp:
63 @echo ""
64 @echo ""
64 @echo " load : call grmon-eval and loads "$(EXEC)" in the leon"
65 @echo ""
65 @echo " usage: make PORT=/dev/ttyUSBx load"
66 @echo ""
66
67 @echo " load : call grmon-eval and loads "$(EXEC)" in the leon"
67
68 @echo " usage: make PORT=/dev/ttyUSBx load"
69
70
@@ -1,61 +1,63
1 SCRIPTSDIR=scripts/
1 SCRIPTSDIR=scripts/
2 LIBDIR=lib/
2 LIBDIR=lib/
3 BOARDSDIR=boards/
3 BOARDSDIR=boards/
4 DESIGNSDIR=designs/
4 DESIGNSDIR=designs/
5
5
6
6
7
7
8
8
9
9
10
10
11 all: help
11 all: help
12
12
13 help:
13 help:
14 @echo
14 @echo
15 @echo " batch targets:"
15 @echo " batch targets:"
16 @echo
16 @echo
17 @echo " make Patch-GRLIB : install library into GRLIB at : $(GRLIB)"
17 @echo " make Patch-GRLIB : install library into GRLIB at : $(GRLIB)"
18 @echo " make dist : create a tar file for using into an other computer"
18 @echo " make dist : create a tar file for using into an other computer"
19 @echo " make Patched-dist : create a tar file for with a patched grlib for using into an other computer"
19 @echo " make Patched-dist : create a tar file for with a patched grlib for using into an other computer"
20 @echo " make allGPL : add a GPL HEADER in all vhdl Files"
20 @echo " make allGPL : add a GPL HEADER in all vhdl Files"
21 @echo " make init : add a GPL HEADER in all vhdl Files, init all files"
21 @echo " make init : add a GPL HEADER in all vhdl Files, init all files"
22 @echo " make doc : make documentation for VHDL IPs"
22 @echo " make doc : make documentation for VHDL IPs"
23 @echo " make pdf : make pdf documentation for VHDL IPs"
23 @echo " make pdf : make pdf documentation for VHDL IPs"
24 @echo
24 @echo
25
25
26 allGPL:
26 allGPL:
27 @echo "Scanning VHDL files ..."
27 @echo "Scanning VHDL files ..."
28 sh $(SCRIPTSDIR)/GPL_Patcher.sh -R vhd lib
28 sh $(SCRIPTSDIR)/GPL_Patcher.sh -R vhd lib
29 @echo "Scanning C files ..."
29 @echo "Scanning C files ..."
30 sh $(SCRIPTSDIR)/GPL_Patcher.sh -R c LPP_drivers
30 sh $(SCRIPTSDIR)/GPL_Patcher.sh -R c LPP_drivers
31 @echo "Scanning H files ..."
31 @echo "Scanning H files ..."
32 sh $(SCRIPTSDIR)/GPL_Patcher.sh -R h LPP_drivers
32 sh $(SCRIPTSDIR)/GPL_Patcher.sh -R h LPP_drivers
33
33
34 init:
34 init: C-libs
35 sh $(SCRIPTSDIR)/vhdlsynPatcher.sh
35 sh $(SCRIPTSDIR)/vhdlsynPatcher.sh
36 sh $(SCRIPTSDIR)/makeDirs.sh lib/lpp
36 sh $(SCRIPTSDIR)/makeDirs.sh lib/lpp
37
38 C-libs:
37 make -C LPP_drivers
39 make -C LPP_drivers
38
40
39 Patch-GRLIB: init doc
41 Patch-GRLIB: init doc
40 sh $(SCRIPTSDIR)/patch.sh $(GRLIB)
42 sh $(SCRIPTSDIR)/patch.sh $(GRLIB)
41
43
42
44
43 dist: init
45 dist: init
44 tar -cvzf ./../lpp-lib.tgz ./../VHD_Lib/*
46 tar -cvzf ./../lpp-lib.tgz ./../VHD_Lib/*
45
47
46
48
47 Patched-dist: Patch-GRLIB
49 Patched-dist: Patch-GRLIB
48 tar -cvzf ./../lpp-patched-GRLIB.tgz $(GRLIB)/*
50 tar -cvzf ./../lpp-patched-GRLIB.tgz $(GRLIB)/*
49
51
50
52
51 doc:
53 doc:
52 doxygen lib/lpp/Doxyfile
54 doxygen lib/lpp/Doxyfile
53
55
54
56
55 pdf: doc
57 pdf: doc
56 sh $(SCRIPTSDIR)/doc.sh
58 sh $(SCRIPTSDIR)/doc.sh
57
59
58
60
59
61
60
62
61
63
@@ -1,77 +1,95
1 ------------------------------------------------------------------------------
1 ------------------------------------------------------------------------------
2 -- This file is a part of the LPP VHDL IP LIBRARY
2 -- This file is a part of the LPP VHDL IP LIBRARY
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
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
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
7 -- the Free Software Foundation; either version 3 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
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
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 library ieee;
19 library ieee;
20 use ieee.std_logic_1164.all;
20 use ieee.std_logic_1164.all;
21 library grlib;
21 library grlib;
22 use grlib.amba.all;
22 use grlib.amba.all;
23 -- pragma translate_off
23 -- pragma translate_off
24 use std.textio.all;
24 use std.textio.all;
25 -- pragma translate_on
25 -- pragma translate_on
26
26
27
27
28
28
29 package lpp_amba is
29 package lpp_amba is
30
30
31 constant VENDOR_LPP : amba_vendor_type := 16#19#;
31 constant VENDOR_LPP : amba_vendor_type := 16#19#;
32
32
33 -- LPP device ids
33 -- LPP device ids
34
34
35 constant ROCKET_TM : amba_device_type := 16#001#;
35 constant ROCKET_TM : amba_device_type := 16#001#;
36 constant otherCore : amba_device_type := 16#002#;
36 constant otherCore : amba_device_type := 16#002#;
37 constant LPP_SIMPLE_DIODE : amba_device_type := 16#003#;
37 constant LPP_SIMPLE_DIODE : amba_device_type := 16#003#;
38 constant LPP_MULTI_DIODE : amba_device_type := 16#004#;
38 constant LPP_MULTI_DIODE : amba_device_type := 16#004#;
39 constant LPP_LCD_CTRLR : amba_device_type := 16#005#;
39 constant LPP_LCD_CTRLR : amba_device_type := 16#005#;
40 constant LPP_UART : amba_device_type := 16#006#;
40 constant LPP_UART : amba_device_type := 16#006#;
41 constant LPP_CNA : amba_device_type := 16#007#;
41 constant LPP_CNA : amba_device_type := 16#007#;
42 constant LPP_ADC_7688 : amba_device_type := 16#008#;
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 component APB_SIMPLE_DIODE is
62 component APB_SIMPLE_DIODE is
45 generic (
63 generic (
46 pindex : integer := 0;
64 pindex : integer := 0;
47 paddr : integer := 0;
65 paddr : integer := 0;
48 pmask : integer := 16#fff#;
66 pmask : integer := 16#fff#;
49 pirq : integer := 0;
67 pirq : integer := 0;
50 abits : integer := 8);
68 abits : integer := 8);
51 port (
69 port (
52 rst : in std_ulogic;
70 rst : in std_ulogic;
53 clk : in std_ulogic;
71 clk : in std_ulogic;
54 apbi : in apb_slv_in_type;
72 apbi : in apb_slv_in_type;
55 apbo : out apb_slv_out_type;
73 apbo : out apb_slv_out_type;
56 LED : out std_ulogic
74 LED : out std_ulogic
57 );
75 );
58 end component;
76 end component;
59
77
60
78
61 component APB_MULTI_DIODE is
79 component APB_MULTI_DIODE is
62 generic (
80 generic (
63 pindex : integer := 0;
81 pindex : integer := 0;
64 paddr : integer := 0;
82 paddr : integer := 0;
65 pmask : integer := 16#fff#;
83 pmask : integer := 16#fff#;
66 pirq : integer := 0;
84 pirq : integer := 0;
67 abits : integer := 8);
85 abits : integer := 8);
68 port (
86 port (
69 rst : in std_ulogic;
87 rst : in std_ulogic;
70 clk : in std_ulogic;
88 clk : in std_ulogic;
71 apbi : in apb_slv_in_type;
89 apbi : in apb_slv_in_type;
72 apbo : out apb_slv_out_type;
90 apbo : out apb_slv_out_type;
73 LED : out std_logic_vector(2 downto 0)
91 LED : out std_logic_vector(2 downto 0)
74 );
92 );
75 end component;
93 end component;
76
94
77 end;
95 end;
@@ -1,5 +1,4
1 APB_CHENILLARD.vhd
1 APB_MULTI_DIODE.vhd
2 APB_MULTI_DIODE.vhd
2 APB_MULTI_DIODE.vhd.orig
3 APB_SIMPLE_DIODE.vhd
3 APB_SIMPLE_DIODE.vhd
4 APB_SIMPLE_DIODE.vhd.orig
5 lpp_amba.vhd
4 lpp_amba.vhd
General Comments 0
You need to be logged in to leave comments. Login now