-
Notifications
You must be signed in to change notification settings - Fork 595
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
software/demo: add litex_bare_metal_demo pre-installed script.
Build demo: litex_bare_metal_demo --build-path=build/arty/
- Loading branch information
1 parent
4df56ed
commit c79135c
Showing
4 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# | ||
# This file is part of LiteX. | ||
# | ||
# Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr> | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
|
||
import os | ||
import argparse | ||
from distutils.dir_util import copy_tree | ||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description="LiteX Bare Metal Demo App.") | ||
parser.add_argument("--build-path", help="Target's build path.", required=True) | ||
args = parser.parse_args() | ||
|
||
# Create demo directory | ||
os.makedirs("demo", exist_ok=True) | ||
|
||
# Copy contents to demo directory | ||
src = os.path.abspath(os.path.dirname(__file__)) | ||
copy_tree(src, "demo") | ||
|
||
# Compile demo | ||
os.system(f"export BUILD_DIR=../{args.build_path} && cd demo && make") | ||
|
||
# Copy demo.bin | ||
os.system("cp demo/demo.bin ./") | ||
|
||
if __name__ == "__main__": | ||
main() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters