Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
SPEC7
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
SPEC7
Commits
8301e5b3
Commit
8301e5b3
authored
Jul 08, 2021
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add fsbl build commands
parent
b8c9f759
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
0 deletions
+104
-0
Makefile
sw/fsbl/Makefile
+7
-0
do_vitis.cmd
sw/fsbl/do_vitis.cmd
+6
-0
fsbl.tcl
sw/fsbl/fsbl.tcl
+91
-0
No files found.
sw/fsbl/Makefile
0 → 100644
View file @
8301e5b3
build
:
xsct ./fsbl.tcl
clean
:
rm
-rf
build
*
.Xil
sw/fsbl/do_vitis.cmd
0 → 100644
View file @
8301e5b3
rem do_vitis.cmd PeterJ, 08-Jul-2021.
@prompt $$$s
rem ### note that environment variable "VITIS" must be set to something like "C:\Xilinx\Vitis_HLS\2020.2\bin"
rem ### in your (User) Environment Variables
"%VITIS%\xsct.bat" .\fsbl.tcl > fsbl.log
sw/fsbl/fsbl.tcl
0 → 100644
View file @
8301e5b3
#-----------------------------------------------------------------------------
# Title : fsbl
#-----------------------------------------------------------------------------
# File : fsbl.tcl
# Author : Mamta Shukla <mamta.ramendra.shukla@cern.ch>
# : Peter Jansweijer <peterj@nikhef.nl>
# Company : CERN / Nikhef
# Created : 2021-06-08
# Last update: 2021-06-08
# Platform : FPGA-embedded software
# Standard :
#-----------------------------------------------------------------------------
# Description:
#
# This script does:
# build the First Stage Boot Loader (FSBL
)
using Vitis
# See also <https://spec7.readthedocs.io/en/latest/fsbl.html>
#-----------------------------------------------------------------------------
#
# Copyright (c
)
2021 CERN, Mamta Shukla
;
Nikhef, Peter Jansweijer
#
# This source file is free software
;
you can redistribute it
# and/or modify it under the terms of the GNU Lesser General
# Public License as published by the Free Software Foundation
;
# either version 2.1 of the License, or
(
at your option
)
any
# later version.
#
# This source is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY
;
without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General
# Public License along with this source
;
if not, download it
# from http://www.gnu.org/licenses/lgpl-2.1.html
#
#-----------------------------------------------------------------------------
set
hwdir_base_name
"../../hdl/syn/spec7_tandem_boot/work/spec7_tandem_boot_top"
set
xsa_file
[
glob
$hwdir
_base_name*.xsa
]
# check if Vivado exported hardware description (xsa
)
exists
if
!
[
file
exists
$xsa
_file
]
{
puts
"### no xsa file exists in ../../hdl/syn/spec7_tandem_boot/work !"
puts
"### Build the firmware first (i.e. execute: ../../hdl/syn/spec7_tandem_boot/do_vivado.cmd)."
exit 0
}
else
{
# hardware file exists! create pointer to corresponding log file
set log_file
[
glob
$hwdir
_base_name*.log
]
# and extract the timestamp
set idx_start
[
string
length
$hwdir
_base_name
]
set len_xsa_file
[
string
length
$xsa
_file
]
set timestamp
[
string
range
$xsa
_file
$idx
_start
[
expr
(
$len
_xsa_file - 5
)]]
# Copy the
"current"
timestamped xsa file to a general name exported_hw.xsa
file copy -force
$xsa
_file exported_hw.xsa
# Copy the full timestamped and logged xsa and log file to enable version trace-back
file copy -force
$xsa
_file .
file copy -force
$log
_file .
# Format the raw time
[
clock
seconds
]
to a date string
puts
"
[
set
date_string
[
clock
format
[
clock
seconds
]
-format
"date: %y-%m-%d, time: %H:%M:%S"
]]
Implementation Started"
puts
"Using hardware design:
$xsa
_file"
}
# Remove old and Set the new build directory
file
delete -force build
setws build
platform
create -name spec7
\
-hw exported_hw.xsa -no-boot-bsp
platform
active spec7
# Create FSBL application
domain create -name
"fsbl_domain"
-os standalone -proc ps7_cortexa9_0
bsp setlib xilffs
bsp config stdin ps7_uart_1
bsp config stdout ps7_uart_1
platform
generate
app create -name zynq_fsbl -template
{
Zynq FSBL
}
\
-platform spec7 -domain fsbl_domain -sysproj spec7_system
app config -name zynq_fsbl build-config release
app config -name zynq_fsbl build-config
app build -name zynq_fsbl
# Create a copy of zynq_fsbl with xsa timestamp
file
copy -force ./build/zynq_fsbl/Release/zynq_fsbl.elf .
file copy -force ./build/zynq_fsbl/Release/zynq_fsbl.elf zynq_fsbl$
{
timestamp
}
.elf
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