]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/PlatformStudioProject/system.make
Correct calculation of xHeapStructSize in heap_4 and heap_5.
[freertos] / FreeRTOS / Demo / MicroBlaze_Spartan-6_EthernetLite / PlatformStudioProject / system.make
1 #################################################################\r
2 # Makefile generated by Xilinx Platform Studio \r
3 # Project:C:\E\Dev\FreeRTOS\WorkingCopy\Demo\MicroBlaze_Spartan-6_EthernetLite\PlatformStudioProject\system.xmp\r
4 #\r
5 # WARNING : This file will be re-generated every time a command\r
6 # to run a make target is invoked. So, any changes made to this  \r
7 # file manually, will be lost when make is invoked next. \r
8 #################################################################\r
9 \r
10 # Name of the Microprocessor system\r
11 # The hardware specification of the system is in file :\r
12 # C:\E\Dev\FreeRTOS\WorkingCopy\Demo\MicroBlaze_Spartan-6_EthernetLite\PlatformStudioProject\system.mhs\r
13 \r
14 include system_incl.make\r
15 \r
16 #################################################################\r
17 # PHONY TARGETS\r
18 #################################################################\r
19 .PHONY: dummy\r
20 .PHONY: netlistclean\r
21 .PHONY: bitsclean\r
22 .PHONY: simclean\r
23 .PHONY: exporttosdk\r
24 \r
25 #################################################################\r
26 # EXTERNAL TARGETS\r
27 #################################################################\r
28 all:\r
29         @echo "Makefile to build a Microprocessor system :"\r
30         @echo "Run make with any of the following targets"\r
31         @echo " "\r
32         @echo "  netlist  : Generates the netlist for the given MHS "\r
33         @echo "  bits     : Runs Implementation tools to generate the bitstream"\r
34         @echo "  exporttosdk: Export files to SDK"\r
35         @echo " "\r
36         @echo "  init_bram: Initializes bitstream with BRAM data"\r
37         @echo "  ace      : Generate ace file from bitstream and elf"\r
38         @echo "  download : Downloads the bitstream onto the board"\r
39         @echo " "\r
40         @echo "  sim      : Generates HDL simulation models and runs simulator for chosen simulation mode"\r
41         @echo "  simmodel : Generates HDL simulation models for chosen simulation mode"\r
42         @echo " "\r
43         @echo "  netlistclean: Deletes netlist"\r
44         @echo "  bitsclean: Deletes bit, ncd, bmm files"\r
45         @echo "  hwclean  : Deletes implementation dir"\r
46         @echo "  simclean : Deletes simulation dir"\r
47         @echo "  clean    : Deletes all generated files/directories"\r
48         @echo " "\r
49 \r
50 bits: $(SYSTEM_BIT)\r
51 \r
52 ace: $(SYSTEM_ACE)\r
53 \r
54 exporttosdk: $(SYSTEM_HW_HANDOFF_DEP)\r
55 \r
56 netlist: $(POSTSYN_NETLIST)\r
57 \r
58 download: $(DOWNLOAD_BIT) dummy\r
59         @echo "*********************************************"\r
60         @echo "Downloading Bitstream onto the target board"\r
61         @echo "*********************************************"\r
62         impact -batch etc/download.cmd\r
63 \r
64 init_bram: $(DOWNLOAD_BIT)\r
65 \r
66 sim: $(DEFAULT_SIM_SCRIPT)\r
67         cd simulation/behavioral & \\r
68         system_fuse.cmd\r
69         cd simulation/behavioral & \\r
70         start /B $(SIM_CMD) -gui -tclbatch system_setup.tcl\r
71 \r
72 simmodel: $(DEFAULT_SIM_SCRIPT)\r
73 \r
74 behavioral_model: $(BEHAVIORAL_SIM_SCRIPT)\r
75 \r
76 structural_model: $(STRUCTURAL_SIM_SCRIPT)\r
77 \r
78 clean: hwclean simclean\r
79         rm -f _impact.cmd\r
80 \r
81 hwclean: netlistclean bitsclean\r
82         rm -rf implementation synthesis xst hdl\r
83         rm -rf xst.srp $(SYSTEM).srp\r
84         rm -f __xps/ise/_xmsgs/bitinit.xmsgs\r
85 \r
86 netlistclean:\r
87         rm -f $(POSTSYN_NETLIST)\r
88         rm -f platgen.log\r
89         rm -f __xps/ise/_xmsgs/platgen.xmsgs\r
90         rm -f $(BMM_FILE)\r
91 \r
92 bitsclean:\r
93         rm -f $(SYSTEM_BIT)\r
94         rm -f implementation/$(SYSTEM).ncd\r
95         rm -f implementation/$(SYSTEM)_bd.bmm \r
96         rm -f implementation/$(SYSTEM)_map.ncd \r
97         rm -f implementation/download.bit \r
98         rm -f __xps/$(SYSTEM)_routed\r
99 \r
100 simclean: \r
101         rm -rf simulation/behavioral\r
102         rm -f simgen.log\r
103         rm -f __xps/ise/_xmsgs/simgen.xmsgs\r
104 \r
105 #################################################################\r
106 # BOOTLOOP ELF FILES\r
107 #################################################################\r
108 \r
109 \r
110 $(MICROBLAZE_0_BOOTLOOP): $(MICROBLAZE_BOOTLOOP_LE)\r
111         IF NOT EXIST "$(BOOTLOOP_DIR)" @mkdir "$(BOOTLOOP_DIR)"\r
112         cp -f $(MICROBLAZE_BOOTLOOP_LE) $(MICROBLAZE_0_BOOTLOOP)\r
113 \r
114 #################################################################\r
115 # HARDWARE IMPLEMENTATION FLOW\r
116 #################################################################\r
117 \r
118 \r
119 $(BMM_FILE) \\r
120 $(WRAPPER_NGC_FILES): $(MHSFILE) __xps/platgen.opt \\r
121                       $(CORE_STATE_DEVELOPMENT_FILES)\r
122         @echo "****************************************************"\r
123         @echo "Creating system netlist for hardware specification.."\r
124         @echo "****************************************************"\r
125         platgen $(PLATGEN_OPTIONS) $(MHSFILE)\r
126 \r
127 $(POSTSYN_NETLIST): $(WRAPPER_NGC_FILES)\r
128         @echo "Running synthesis..."\r
129         cd synthesis & synthesis.cmd\r
130 \r
131 __xps/$(SYSTEM)_routed: $(FPGA_IMP_DEPENDENCY)\r
132         @echo "*********************************************"\r
133         @echo "Running Xilinx Implementation tools.."\r
134         @echo "*********************************************"\r
135         @cp -f $(UCF_FILE) implementation/$(SYSTEM).ucf\r
136         @cp -f etc/fast_runtime.opt implementation/xflow.opt\r
137         xflow -wd implementation -p $(DEVICE) -implement xflow.opt $(SYSTEM).ngc\r
138         touch __xps/$(SYSTEM)_routed\r
139 \r
140 $(SYSTEM_BIT): __xps/$(SYSTEM)_routed $(BITGEN_UT_FILE)\r
141         xilperl $(XILINX_EDK_DIR)/data/fpga_impl/observe_par.pl $(OBSERVE_PAR_OPTIONS) implementation/$(SYSTEM).par\r
142         @echo "*********************************************"\r
143         @echo "Running Bitgen.."\r
144         @echo "*********************************************"\r
145         @cp -f $(BITGEN_UT_FILE) implementation/bitgen.ut\r
146         cd implementation & bitgen -w -f bitgen.ut $(SYSTEM) & cd ..\r
147 \r
148 $(DOWNLOAD_BIT): $(SYSTEM_BIT) $(BRAMINIT_ELF_IMP_FILES) __xps/bitinit.opt\r
149         @cp -f implementation/$(SYSTEM)_bd.bmm .\r
150         @echo "*********************************************"\r
151         @echo "Initializing BRAM contents of the bitstream"\r
152         @echo "*********************************************"\r
153         bitinit -p $(DEVICE) $(MHSFILE) $(SEARCHPATHOPT) $(BRAMINIT_ELF_IMP_FILE_ARGS) \\r
154         -bt $(SYSTEM_BIT) -o $(DOWNLOAD_BIT)\r
155         @rm -f $(SYSTEM)_bd.bmm\r
156 \r
157 $(SYSTEM_ACE):\r
158         @echo "In order to generate ace file, you must have:-"\r
159         @echo "- exactly one processor."\r
160         @echo "- opb_mdm, if using microblaze."\r
161 \r
162 #################################################################\r
163 # EXPORT_TO_SDK FLOW\r
164 #################################################################\r
165 \r
166 $(SYSTEM_HW_HANDOFF): $(MHSFILE) __xps/platgen.opt\r
167         IF NOT EXIST "$(SDK_EXPORT_DIR)" @mkdir "$(SDK_EXPORT_DIR)"\r
168         psf2Edward -inp $(SYSTEM).xmp -exit_on_error -edwver 1.2 -xml $(SDK_EXPORT_DIR)/$(SYSTEM).xml $(GLOBAL_SEARCHPATHOPT)\r
169         xdsgen -inp $(SYSTEM).xmp -report $(SDK_EXPORT_DIR)/$(SYSTEM).html $(GLOBAL_SEARCHPATHOPT) -make_docs_local\r
170 \r
171 $(SYSTEM_HW_HANDOFF_BIT): $(SYSTEM_BIT)\r
172         @rm -rf $(SYSTEM_HW_HANDOFF_BIT)\r
173         @cp -f $(SYSTEM_BIT) $(SDK_EXPORT_DIR)\r
174 \r
175 $(SYSTEM_HW_HANDOFF_BMM): implementation/$(SYSTEM)_bd.bmm\r
176         @rm -rf $(SYSTEM_HW_HANDOFF_BMM)\r
177         @cp -f implementation/$(SYSTEM)_bd.bmm $(SDK_EXPORT_DIR)\r
178 \r
179 #################################################################\r
180 # SIMULATION FLOW\r
181 #################################################################\r
182 \r
183 \r
184 ################## BEHAVIORAL SIMULATION ##################\r
185 \r
186 $(BEHAVIORAL_SIM_SCRIPT): $(MHSFILE) __xps/simgen.opt \\r
187                           $(BRAMINIT_ELF_SIM_FILES)\r
188         @echo "*********************************************"\r
189         @echo "Creating behavioral simulation models..."\r
190         @echo "*********************************************"\r
191         simgen $(SIMGEN_OPTIONS) -m behavioral $(MHSFILE)\r
192 \r
193 ################## STRUCTURAL SIMULATION ##################\r
194 \r
195 $(STRUCTURAL_SIM_SCRIPT): $(WRAPPER_NGC_FILES) __xps/simgen.opt \\r
196                           $(BRAMINIT_ELF_SIM_FILES)\r
197         @echo "*********************************************"\r
198         @echo "Creating structural simulation models..."\r
199         @echo "*********************************************"\r
200         simgen $(SIMGEN_OPTIONS) -sd implementation -m structural $(MHSFILE)\r
201 \r
202 \r
203 ################## TIMING SIMULATION ##################\r
204 \r
205 implementation/$(SYSTEM).ncd: __xps/$(SYSTEM)_routed\r
206 \r
207 $(TIMING_SIM_SCRIPT): implementation/$(SYSTEM).ncd __xps/simgen.opt \\r
208                       $(BRAMINIT_ELF_SIM_FILES)\r
209         @echo "*********************************************"\r
210         @echo "Creating timing simulation models..."\r
211         @echo "*********************************************"\r
212         simgen $(SIMGEN_OPTIONS) -sd implementation -m timing $(MHSFILE)\r
213 \r
214 dummy:\r
215         @echo ""\r
216 \r