Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kestrel Collaboration
Kestrel LiteX
migen
Commits
70518296
Commit
70518296
authored
8 years ago
by
William D. Jones
Committed by
Sebastien Bourdeauducq
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Add "set -e" equivalent to Windows batch file.
parent
c44664d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
migen/build/xilinx/ise.py
migen/build/xilinx/ise.py
+8
-6
No files found.
migen/build/xilinx/ise.py
View file @
70518296
...
...
@@ -88,11 +88,13 @@ def _run_ise(build_name, ise_path, source, mode, ngdbuild_opt,
script_ext
=
".bat"
shell
=
[
"cmd"
,
"/c"
]
build_script_contents
=
"@echo off
\n
rem Autogenerated by Migen
\n
"
fail_stmt
=
" || exit /b"
else
:
source_cmd
=
"source "
script_ext
=
".sh"
shell
=
[
"bash"
]
build_script_contents
=
"# Autogenerated by Migen
\n
set -e
\n
"
fail_stmt
=
""
if
source
:
settings
=
common
.
settings
(
ise_path
,
ver
,
"ISE_DS"
)
build_script_contents
+=
source_cmd
+
settings
+
"
\n
"
...
...
@@ -101,18 +103,18 @@ def _run_ise(build_name, ise_path, source, mode, ngdbuild_opt,
else
:
ext
=
"ngc"
build_script_contents
+=
"""
xst -ifn {build_name}.xst
xst -ifn {build_name}.xst
{fail_stmt}
"""
build_script_contents
+=
"""
ngdbuild {ngdbuild_opt} -uc {build_name}.ucf {build_name}.{ext} {build_name}.ngd
map {map_opt} -o {build_name}_map.ncd {build_name}.ngd {build_name}.pcf
par {par_opt} {build_name}_map.ncd {build_name}.ncd {build_name}.pcf
bitgen {bitgen_opt} {build_name}.ncd {build_name}.bit
ngdbuild {ngdbuild_opt} -uc {build_name}.ucf {build_name}.{ext} {build_name}.ngd
{fail_stmt}
map {map_opt} -o {build_name}_map.ncd {build_name}.ngd {build_name}.pcf
{fail_stmt}
par {par_opt} {build_name}_map.ncd {build_name}.ncd {build_name}.pcf
{fail_stmt}
bitgen {bitgen_opt} {build_name}.ncd {build_name}.bit
{fail_stmt}
"""
build_script_contents
=
build_script_contents
.
format
(
build_name
=
build_name
,
ngdbuild_opt
=
ngdbuild_opt
,
bitgen_opt
=
bitgen_opt
,
ext
=
ext
,
par_opt
=
par_opt
,
map_opt
=
map_opt
)
par_opt
=
par_opt
,
map_opt
=
map_opt
,
fail_stmt
=
fail_stmt
)
build_script_contents
+=
ise_commands
.
format
(
build_name
=
build_name
)
build_script_file
=
"build_"
+
build_name
+
script_ext
tools
.
write_to_file
(
build_script_file
,
build_script_contents
,
force_unix
=
False
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment