##// 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
@@ -31,9 +31,11 allGPL:
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,6 +40,24 constant LPP_LCD_CTRLR : amba_d
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 (
@@ -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