From 26dbf0841cf1afe519c518f2be98c50482d22f56 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 26 Dec 2017 21:50:31 +0000 Subject: [PATCH] conda: ship runtime.elf in board-specific packages. This is so that backtraces may be symbolized. --- artiq/firmware/runtime/lib.rs | 3 ++- conda/artiq-kc705-nist_clock/build.sh | 2 +- conda/artiq-kc705-nist_qc2/build.sh | 2 +- conda/artiq-kc705-phaser/build.sh | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/artiq/firmware/runtime/lib.rs b/artiq/firmware/runtime/lib.rs index f7e68a3fb..95c83a976 100644 --- a/artiq/firmware/runtime/lib.rs +++ b/artiq/firmware/runtime/lib.rs @@ -206,7 +206,8 @@ pub extern fn abort() { pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, line: u32) -> ! { println!("panic at {}:{}: {}", file, line, args); - println!("backtrace:"); + println!("backtrace for software version {}:", + include_str!(concat!(env!("OUT_DIR"), "/git-describe"))); let _ = backtrace_artiq::backtrace(|ip| { println!("{:#08x}", ip); }); diff --git a/conda/artiq-kc705-nist_clock/build.sh b/conda/artiq-kc705-nist_clock/build.sh index 0e0b7843a..f4787644d 100644 --- a/conda/artiq-kc705-nist_clock/build.sh +++ b/conda/artiq-kc705-nist_clock/build.sh @@ -9,6 +9,6 @@ mkdir -p $SOC_PREFIX V=1 $PYTHON -m artiq.gateware.targets.kc705_dds -H nist_clock --toolchain vivado $MISOC_EXTRA_VIVADO_CMDLINE cp misoc_nist_clock_kc705/gateware/top.bit $SOC_PREFIX cp misoc_nist_clock_kc705/software/bios/bios.bin $SOC_PREFIX -cp misoc_nist_clock_kc705/software/runtime/runtime.fbi $SOC_PREFIX +cp misoc_nist_clock_kc705/software/runtime/runtime.{elf,fbi} $SOC_PREFIX wget -P $SOC_PREFIX https://raw.githubusercontent.com/jordens/bscan_spi_bitstreams/single-tap/bscan_spi_xc7k325t.bit diff --git a/conda/artiq-kc705-nist_qc2/build.sh b/conda/artiq-kc705-nist_qc2/build.sh index 5d6e92c69..8402c9ea8 100644 --- a/conda/artiq-kc705-nist_qc2/build.sh +++ b/conda/artiq-kc705-nist_qc2/build.sh @@ -9,6 +9,6 @@ mkdir -p $SOC_PREFIX V=1 $PYTHON -m artiq.gateware.targets.kc705_dds -H nist_qc2 --toolchain vivado $MISOC_EXTRA_VIVADO_CMDLINE cp misoc_nist_qc2_kc705/gateware/top.bit $SOC_PREFIX cp misoc_nist_qc2_kc705/software/bios/bios.bin $SOC_PREFIX -cp misoc_nist_qc2_kc705/software/runtime/runtime.fbi $SOC_PREFIX +cp misoc_nist_qc2_kc705/software/runtime/runtime.{elf,fbi} $SOC_PREFIX wget -P $SOC_PREFIX https://raw.githubusercontent.com/jordens/bscan_spi_bitstreams/single-tap/bscan_spi_xc7k325t.bit diff --git a/conda/artiq-kc705-phaser/build.sh b/conda/artiq-kc705-phaser/build.sh index 9a9340821..756e878bd 100644 --- a/conda/artiq-kc705-phaser/build.sh +++ b/conda/artiq-kc705-phaser/build.sh @@ -9,6 +9,6 @@ mkdir -p $SOC_PREFIX V=1 $PYTHON -m artiq.gateware.targets.kc705_phaser --toolchain vivado $MISOC_EXTRA_VIVADO_CMDLINE cp misoc_phaser_kc705/gateware/top.bit $SOC_PREFIX cp misoc_phaser_kc705/software/bios/bios.bin $SOC_PREFIX -cp misoc_phaser_kc705/software/runtime/runtime.fbi $SOC_PREFIX +cp misoc_phaser_kc705/software/runtime/runtime.{elf,fbi} $SOC_PREFIX wget -P $SOC_PREFIX https://raw.githubusercontent.com/jordens/bscan_spi_bitstreams/single-tap/bscan_spi_xc7k325t.bit