Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
},
"rust-analyzer.linkedProjects": [
"firmware-support/Cargo.toml",
"firmware-binaries/Cargo.toml"
"firmware-binaries/Cargo.toml",
"gdb-adapters/Cargo.toml"
],
"rust-analyzer.check.allTargets": false,
"cSpell.words": [
Expand Down
2 changes: 1 addition & 1 deletion bittide-experiments/src/Bittide/Hitl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ data DeviceInfo = DeviceInfo
-- @"/dev/serial/by-path/pci-0000:00:14.0-usb-0:5.4.4.2:1.1-port0"@
, usbAdapterLocation :: String
-- ^ The USB adapter location for the hardware target, for example @"1-2:1"@.
-- Currently primarily used for the JTAG target location with OpenOCD.
-- Currently primarily used for the JTAG target location with gdb-adapters.
}
deriving (Eq, Ord, Show)

Expand Down
1 change: 0 additions & 1 deletion bittide-instances/data/constraints/jtag/pmod0.xdc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
# Note that AH18 is a global clock capable pin
set_property -dict {IOSTANDARD LVCMOS12 PACKAGE_PIN AH18} [get_ports {JTAG_TCK}]
set_property -dict {IOSTANDARD LVCMOS12 PACKAGE_PIN AM19} [get_ports {JTAG_TDI}]
set_property -dict {IOSTANDARD LVCMOS12 PACKAGE_PIN AE26} [get_ports {JTAG_RST}]
set_property -dict {IOSTANDARD LVCMOS12 PACKAGE_PIN AF25} [get_ports {JTAG_TMS}]
set_property -dict {IOSTANDARD LVCMOS12 PACKAGE_PIN AE21} [get_ports {JTAG_TDO}]
1 change: 0 additions & 1 deletion bittide-instances/data/constraints/jtag/pmod1.xdc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Note that there are no clock capable pins in this list
set_property -dict {IOSTANDARD LVCMOS12 PACKAGE_PIN AP16} [get_ports {JTAG_TCK}]
set_property -dict {IOSTANDARD LVCMOS12 PACKAGE_PIN AP15} [get_ports {JTAG_TDI}]
set_property -dict {IOSTANDARD LVCMOS12 PACKAGE_PIN AM16} [get_ports {JTAG_RST}]
set_property -dict {IOSTANDARD LVCMOS12 PACKAGE_PIN AM15} [get_ports {JTAG_TMS}]
set_property -dict {IOSTANDARD LVCMOS12 PACKAGE_PIN AN18} [get_ports {JTAG_TDO}]

Expand Down
23 changes: 0 additions & 23 deletions bittide-instances/data/openocd/ports.tcl

This file was deleted.

43 changes: 0 additions & 43 deletions bittide-instances/data/openocd/sipeed.tcl

This file was deleted.

22 changes: 0 additions & 22 deletions bittide-instances/data/openocd/start.sh

This file was deleted.

73 changes: 0 additions & 73 deletions bittide-instances/data/openocd/vexriscv-2chain.tcl

This file was deleted.

59 changes: 0 additions & 59 deletions bittide-instances/data/openocd/vexriscv_init.tcl

This file was deleted.

27 changes: 27 additions & 0 deletions bittide-instances/data/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2024 Google LLC
#
# SPDX-License-Identifier: Apache-2.0
set -e

if [ -z "${EXEC_PATH}" ]
then
return 1
fi

# Default stdout to /dev/null
STDOUT_LOG="${STDOUT_LOG:-/dev/null}"
stdout_dir="$(dirname "${STDOUT_LOG}")"
mkdir -p "${stdout_dir}"
STDOUT_LOG="$(realpath "${STDOUT_LOG}")"

# Default stderr to /dev/null
STDERR_LOG="${STDERR_LOG:-/dev/null}"
stderr_dir="$(dirname "${STDERR_LOG}")"
mkdir -p "${stderr_dir}"
STDERR_LOG="$(realpath "${STDERR_LOG}")"

cd "$(dirname "$0")"
exec ${EXEC_PATH} $@ \
> >(tee "${STDOUT_LOG}") \
2> >(tee "${STDERR_LOG}" >&2)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-- SPDX-FileCopyrightText: 2024 Google LLC
--
-- SPDX-License-Identifier: Apache-2.0
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE OverloadedRecordDot #-}
{-# OPTIONS_GHC -Wno-unused-do-bind #-}
Expand Down Expand Up @@ -75,15 +76,17 @@ dnaOverSerialDriver _name targets = do
hitlDir = projectDir </> "_build" </> "hitl"
stdoutLog = hitlDir </> "picocom-stdout." <> show targetIndex <> ".log"
stderrLog = hitlDir </> "picocom-stderr." <> show targetIndex <> ".log"
picocomConfig =
PicocomConfig
{ devPath = dI.serial
, baudRate = Just 9600
, stdoutPath = Just stdoutLog
, stderrPath = Just stderrLog
}
putStrLn $ "logging stdout to `" <> stdoutLog <> "`"
putStrLn $ "logging stderr to `" <> stderrLog <> "`"

(pico, picoClean) <-
startPicocomWithLoggingAndEnv
dI.serial
stdoutLog
stderrLog
[("PICOCOM_BAUD", "9600")]
(pico, picoClean) <- startPicocom picocomConfig

hSetBuffering pico.stdinHandle LineBuffering
hSetBuffering pico.stdoutHandle LineBuffering
Expand Down
Loading
Loading