blob: 7184cdddf4b6f4fe6d2f244c561210d65e466645 [file] [log] [blame]
David Lattimore60e282a2021-05-26 11:27:48 +10001#!/bin/bash
2
3# Copyright 2021 The Chromium OS Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7# Builds and runs the Rust SOC ROM. ./scripts/proto2-run should already be
8# running in a separate shell.
9
10set -e
11
12PROJECT_ROOT=$(git rev-parse --show-toplevel)
David Lattimore42b2bb12022-01-06 08:58:29 +110013ROM="${PROJECT_ROOT}/build/hps_platform/fpga_rom.bin"
David Lattimore60e282a2021-05-26 11:27:48 +100014
David Lattimore42b2bb12022-01-06 08:58:29 +110015"${PROJECT_ROOT}/scripts/build-fpga-rom-dev"
David Lattimore52cfefc2021-11-26 13:24:49 +110016
David Lattimore60e282a2021-05-26 11:27:48 +100017"${PROJECT_ROOT}/scripts/hps-mon" \
18 --openocd-port 4444 \
19 --gateware "${PROJECT_ROOT}/build/hps_platform/gateware/hps_platform.bit" \
20 --soc-rom "${ROM}" \
David Lattimorede745912022-02-01 09:19:05 +110021 --cmd 'reset_mcu; write_gateware; write_soc_rom; reset_fpga' \
David Lattimore60e282a2021-05-26 11:27:48 +100022 "$@"