Compare commits
29 Commits
master
...
bump_to_ll
Author | SHA1 | Date | |
---|---|---|---|
f6b0e25a3d | |||
f8ec1c0f30 | |||
744e097505 | |||
0d54457543 | |||
a5a876e5b4 | |||
2fea91b8ba | |||
aa770463ca | |||
96f9ad9893 | |||
59c0bb11c9 | |||
a2c5fc6d78 | |||
a46b80318d | |||
196e37549d | |||
d6a0640b63 | |||
12031c0be5 | |||
b8229f6882 | |||
5cab059b74 | |||
a0fb06fb47 | |||
754fdedda3 | |||
b2618b639c | |||
a0bb1ee071 | |||
3e2e35f9b8 | |||
f8ffe9e257 | |||
4c1f81f44e | |||
f806c0d56c | |||
d022bc030f | |||
8312179912 | |||
c21ca1b2b1 | |||
eede61d2ab | |||
54bb604910 |
15
flake.lock
generated
15
flake.lock
generated
@ -229,17 +229,18 @@
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736951160,
|
||||
"narHash": "sha256-bOiSeKEIwSJb62qjT7mqb0JQiqSEYMt6eFuDdGi+7Cw=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "19efdafce7b212cce95ea9b3a20e6f1d388aba9e",
|
||||
"revCount": 667,
|
||||
"lastModified": 1738820626,
|
||||
"narHash": "sha256-VUyvopJ6QN/tnvU9BeoeA0Az5iQ3vpmThmbzGkvQYos=",
|
||||
"ref": "bump_to_llvm18",
|
||||
"rev": "7c7c0f3752299b37d9fefaf55375b0ae1dcfda18",
|
||||
"revCount": 690,
|
||||
"type": "git",
|
||||
"url": "https://git.m-labs.hk/m-labs/zynq-rs"
|
||||
"url": "https://git.m-labs.hk/srenblad/zynq-rs/"
|
||||
},
|
||||
"original": {
|
||||
"ref": "bump_to_llvm18",
|
||||
"type": "git",
|
||||
"url": "https://git.m-labs.hk/m-labs/zynq-rs"
|
||||
"url": "https://git.m-labs.hk/srenblad/zynq-rs/"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
14
flake.nix
14
flake.nix
@ -2,7 +2,7 @@
|
||||
description = "ARTIQ port to the Zynq-7000 platform";
|
||||
|
||||
inputs.artiq.url = git+https://github.com/m-labs/artiq.git;
|
||||
inputs.zynq-rs.url = git+https://git.m-labs.hk/m-labs/zynq-rs;
|
||||
inputs.zynq-rs.url = git+https://git.m-labs.hk/srenblad/zynq-rs/?ref=bump_to_llvm18;
|
||||
inputs.zynq-rs.inputs.nixpkgs.follows = "artiq/nixpkgs";
|
||||
|
||||
outputs = { self, zynq-rs, artiq }:
|
||||
@ -135,13 +135,13 @@
|
||||
pkgs.gnumake
|
||||
(pkgs.python3.withPackages(ps: [ ps.jsonschema artiqpkgs.migen migen-axi artiqpkgs.misoc artiqpkgs.artiq ]))
|
||||
zynqpkgs.cargo-xbuild
|
||||
pkgs.llvmPackages_13.llvm
|
||||
pkgs.llvmPackages_13.clang-unwrapped
|
||||
pkgs.llvmPackages_18.llvm
|
||||
pkgs.llvmPackages_18.clang-unwrapped
|
||||
];
|
||||
buildPhase = ''
|
||||
export ZYNQ_REV=${zynqRev}
|
||||
export XARGO_RUST_SRC="${rust}/lib/rustlib/src/rust/library"
|
||||
export CLANG_EXTRA_INCLUDE_DIR="${pkgs.llvmPackages_13.clang-unwrapped.lib}/lib/clang/13.0.1/include"
|
||||
export CLANG_EXTRA_INCLUDE_DIR="${pkgs.llvmPackages_18.clang-unwrapped.lib}/lib/clang/18/include"
|
||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
||||
export ZYNQ_RS=${zynq-rs}
|
||||
make TARGET=${target} GWARGS="${if json == null then "-V ${variant}" else json}" ${fwtype}
|
||||
@ -376,8 +376,8 @@
|
||||
name = "artiq-zynq-dev-shell";
|
||||
buildInputs = with pkgs; [
|
||||
rust
|
||||
llvmPackages_13.llvm
|
||||
llvmPackages_13.clang-unwrapped
|
||||
llvmPackages_18.llvm
|
||||
llvmPackages_18.clang-unwrapped
|
||||
gnumake
|
||||
cacert
|
||||
zynqpkgs.cargo-xbuild
|
||||
@ -392,7 +392,7 @@
|
||||
];
|
||||
ZYNQ_REV="${zynqRev}";
|
||||
XARGO_RUST_SRC = "${rust}/lib/rustlib/src/rust/library";
|
||||
CLANG_EXTRA_INCLUDE_DIR = "${pkgs.llvmPackages_13.clang-unwrapped.lib}/lib/clang/13.0.1/include";
|
||||
CLANG_EXTRA_INCLUDE_DIR = "${pkgs.llvmPackages_18.clang-unwrapped.lib}/lib/clang/18/include";
|
||||
ZYNQ_RS = "${zynq-rs}";
|
||||
OPENOCD_ZYNQ = "${zynq-rs}/openocd";
|
||||
SZL = "${zynqpkgs.szl}";
|
||||
|
@ -1,9 +1,11 @@
|
||||
[target.armv7-none-eabihf]
|
||||
rustflags = [
|
||||
"-C", "link-arg=-Tlink.x",
|
||||
"-C", "target-feature=a9,armv7-a,neon",
|
||||
"-C", "target-cpu=cortex-a9",
|
||||
]
|
||||
|
||||
[build]
|
||||
target = "armv7-none-eabihf.json"
|
||||
|
||||
[future-incompat-report]
|
||||
frequency = "never"
|
||||
|
33
src/Cargo.lock
generated
33
src/Cargo.lock
generated
@ -25,7 +25,7 @@ checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 1.0.101",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -82,9 +82,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "compiler_builtins"
|
||||
version = "0.1.49"
|
||||
version = "0.1.108"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "20b1438ef42c655665a8ab2c1c6d605a305f031d38d9be689ddfef41a20f3aa2"
|
||||
checksum = "d68bc55329711cd719c2687bb147bc06211b0521f97ef398280108ccb23227e9"
|
||||
|
||||
[[package]]
|
||||
name = "core_io"
|
||||
@ -190,7 +190,7 @@ checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 1.0.101",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -426,13 +426,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "num-derive"
|
||||
version = "0.3.3"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
|
||||
checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 2.0.96",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -485,18 +485,18 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.43"
|
||||
version = "1.0.93"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab"
|
||||
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.21"
|
||||
version = "1.0.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
|
||||
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
@ -599,6 +599,17 @@ dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.96"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tar-no-std"
|
||||
version = "0.1.8"
|
||||
|
@ -9,6 +9,7 @@ members = [
|
||||
"runtime",
|
||||
"satman"
|
||||
]
|
||||
resolver = "2"
|
||||
|
||||
[profile.release]
|
||||
panic = "abort"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"emit-debug-gdb-scripts": false,
|
||||
"env": "",
|
||||
"executables": true,
|
||||
"features": "+v7,+vfp3,-d32,+thumb2,-neon",
|
||||
"features": "+v7,+vfp3,-d32,+thumb2,+neon,+a9,+armv7-a",
|
||||
"is-builtin": false,
|
||||
"linker": "rust-lld",
|
||||
"linker-flavor": "ld.lld",
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "libboard_artiq"
|
||||
version = "0.0.0"
|
||||
authors = ["M-Labs"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "libboard_artiq"
|
||||
|
@ -1,7 +1,7 @@
|
||||
use core::slice;
|
||||
use core::arch::asm;
|
||||
|
||||
use core_io::{Error as IoError, ErrorKind as IoErrorKind};
|
||||
use crc;
|
||||
use io::{proto::{ProtoRead, ProtoWrite},
|
||||
Cursor};
|
||||
use libboard_zynq::{time::Milliseconds, timer::GlobalTimer};
|
||||
@ -39,6 +39,7 @@ pub fn copy_work_buffer(src: *mut u32, dst: *mut u32, len: isize) {
|
||||
// fix for artiq-zynq#344
|
||||
unsafe {
|
||||
for i in 0..(len / 4) {
|
||||
asm!("", options(preserves_flags, nostack, readonly));
|
||||
*dst.offset(i) = *src.offset(i);
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,10 @@
|
||||
use core::slice;
|
||||
|
||||
use core_io::{Error as IoError, ErrorKind as IoErrorKind};
|
||||
use crc;
|
||||
use io::{proto::{ProtoRead, ProtoWrite},
|
||||
Cursor};
|
||||
use libasync::{block_async, task};
|
||||
use libboard_zynq::{time::Milliseconds, timer::GlobalTimer};
|
||||
use nb;
|
||||
use void::Void;
|
||||
|
||||
pub use crate::drtioaux_proto::{Packet, MAX_PACKET};
|
||||
|
@ -1,6 +1,7 @@
|
||||
use libboard_zynq::{println, stdio};
|
||||
use libcortex_a9::{interrupt_handler, regs::MPIDR};
|
||||
use libregister::RegisterR;
|
||||
use core::arch::asm;
|
||||
|
||||
#[cfg(has_si549)]
|
||||
use crate::si549;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#![no_std]
|
||||
#![feature(never_type)]
|
||||
#![feature(naked_functions)]
|
||||
#![feature(asm)]
|
||||
|
||||
extern crate core_io;
|
||||
extern crate crc;
|
||||
|
@ -60,6 +60,7 @@ impl BufferLogger {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(static_mut_refs)]
|
||||
pub unsafe fn get_logger() -> &'static mut Option<BufferLogger> {
|
||||
&mut LOGGER
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
authors = ["M-Labs"]
|
||||
name = "build_zynq"
|
||||
version = "0.0.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "build_zynq"
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "libc"
|
||||
version = "0.1.0"
|
||||
authors = ["M-Labs"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -3,7 +3,7 @@
|
||||
authors = ["The Rust Project Developers"]
|
||||
name = "dwarf"
|
||||
version = "0.0.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
test = false
|
||||
|
@ -2,6 +2,7 @@
|
||||
authors = ["M-Labs"]
|
||||
name = "dyld"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "dyld"
|
||||
|
@ -2,6 +2,7 @@
|
||||
authors = ["M-Labs"]
|
||||
name = "io"
|
||||
version = "0.0.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "io"
|
||||
|
@ -62,12 +62,8 @@ impl Write for Cursor<&mut [u8]> {
|
||||
fn write(&mut self, buf: &[u8]) -> Result<usize, IoError> {
|
||||
let data = &mut self.inner[self.pos..];
|
||||
let len = buf.len().min(data.len());
|
||||
for i in 0..len {
|
||||
unsafe {
|
||||
asm!("", options(preserves_flags, nostack, readonly));
|
||||
}
|
||||
data[i] = buf[i];
|
||||
}
|
||||
// as long as 'copy_work_buffer' is used in drtioaux, memcpy here is allowed
|
||||
data[..len].copy_from_slice(&buf[..len]);
|
||||
self.pos += len;
|
||||
Ok(len)
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![no_std]
|
||||
#![feature(never_type)]
|
||||
#![feature(asm)]
|
||||
|
||||
#[cfg(feature = "alloc")]
|
||||
extern crate alloc;
|
||||
|
@ -3,7 +3,7 @@ name = "ksupport"
|
||||
description = "Kernel support for Zynq-based platforms"
|
||||
version = "0.1.0"
|
||||
authors = ["M-Labs"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[build-dependencies]
|
||||
build_zynq = { path = "../libbuild_zynq" }
|
||||
|
@ -1,4 +1,4 @@
|
||||
use libboard_zynq;
|
||||
#![allow(static_mut_refs)]
|
||||
|
||||
use crate::artiq_raise;
|
||||
|
||||
|
@ -3,6 +3,7 @@ use core::sync::atomic::{AtomicBool, Ordering};
|
||||
use libboard_zynq::{gic, mpcore, println, stdio};
|
||||
use libcortex_a9::{asm, interrupt_handler, notify_spin_lock, regs::MPIDR, spin_lock_yield};
|
||||
use libregister::RegisterR;
|
||||
use core::arch::asm;
|
||||
|
||||
extern "C" {
|
||||
static mut __stack1_start: u32;
|
||||
|
@ -2,7 +2,6 @@ use alloc::vec;
|
||||
use core::{ffi::VaList, ptr, str};
|
||||
|
||||
use libc::{c_char, c_int, size_t};
|
||||
use libm;
|
||||
use log::{info, warn};
|
||||
|
||||
#[cfg(has_drtio)]
|
||||
|
@ -4,11 +4,11 @@ use alloc::borrow::ToOwned;
|
||||
use core::{cell::UnsafeCell, mem, ptr};
|
||||
|
||||
use cslice::CSlice;
|
||||
use dyld::{self, elf::EXIDX_Entry, Library};
|
||||
use dyld::{elf::EXIDX_Entry, Library};
|
||||
use libboard_zynq::{gic, mpcore};
|
||||
use libcortex_a9::{asm::{dsb, isb},
|
||||
cache::{bpiall, dcci_slice, iciallu},
|
||||
enable_fpu, sync_channel};
|
||||
sync_channel};
|
||||
use libsupport_zynq::ram;
|
||||
use log::{debug, error, info};
|
||||
|
||||
@ -25,12 +25,14 @@ extern "C" {
|
||||
}
|
||||
|
||||
unsafe fn attribute_writeback(typeinfo: *const ()) {
|
||||
#[repr(C)]
|
||||
struct Attr {
|
||||
offset: usize,
|
||||
tag: CSlice<'static, u8>,
|
||||
name: CSlice<'static, u8>,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
struct Type {
|
||||
attributes: *const *const Attr,
|
||||
objects: *const *const (),
|
||||
@ -126,7 +128,6 @@ impl KernelImage {
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn main_core1() {
|
||||
enable_fpu();
|
||||
debug!("Core1 started");
|
||||
|
||||
ram::init_alloc_core1();
|
||||
|
@ -23,6 +23,7 @@ pub struct DmaRecorder {
|
||||
|
||||
static mut RECORDER: Option<DmaRecorder> = None;
|
||||
|
||||
#[allow(static_mut_refs)]
|
||||
pub unsafe fn init_dma_recorder() {
|
||||
// as static would remain after restart, we have to reset it,
|
||||
// without running its destructor.
|
||||
@ -80,6 +81,7 @@ pub extern "C" fn dma_record_stop(duration: i64, enable_ddma: bool) {
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[allow(static_mut_refs)]
|
||||
unsafe fn dma_record_output_prepare(timestamp: i64, target: i32, words: usize) {
|
||||
// See gateware/rtio/dma.py.
|
||||
const HEADER_LENGTH: usize = /*length*/ 1 + /*channel*/3 + /*timestamp*/8 + /*address*/1;
|
||||
@ -117,6 +119,7 @@ pub extern "C" fn dma_record_output(target: i32, word: i32) {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(static_mut_refs)]
|
||||
pub extern "C" fn dma_record_output_wide(target: i32, words: &CSlice<i32>) {
|
||||
assert!(words.len() <= 16); // enforce the hardware limit
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
#![no_std]
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(c_variadic)]
|
||||
#![feature(const_btree_new)]
|
||||
#![feature(const_btree_len)]
|
||||
#![feature(inline_const)]
|
||||
#![feature(naked_functions)]
|
||||
#![feature(asm)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate alloc;
|
||||
@ -153,6 +151,7 @@ fn _resolve_channel_name(channel: u32, device_map: &BTreeMap<u32, String>) -> St
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(static_mut_refs)]
|
||||
pub fn resolve_channel_name(channel: u32) -> String {
|
||||
_resolve_channel_name(channel, unsafe { &RTIO_DEVICE_MAP })
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ where
|
||||
let ptr = storage as *mut u32;
|
||||
let dest = core::slice::from_raw_parts_mut(ptr as *mut u8, length * 4);
|
||||
reader.read_exact(dest)?;
|
||||
drop(dest);
|
||||
let _ = dest;
|
||||
let dest = core::slice::from_raw_parts_mut(ptr, length);
|
||||
NativeEndian::from_slice_u32(dest);
|
||||
}
|
||||
@ -65,7 +65,7 @@ where
|
||||
let ptr = storage as *mut u64;
|
||||
let dest = core::slice::from_raw_parts_mut(ptr as *mut u8, length * 8);
|
||||
reader.read_exact(dest)?;
|
||||
drop(dest);
|
||||
let _ = dest;
|
||||
let dest = core::slice::from_raw_parts_mut(ptr, length);
|
||||
NativeEndian::from_slice_u64(dest);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ authors = ["The Rust Project Developers"]
|
||||
name = "unwind"
|
||||
version = "0.0.0"
|
||||
build = "build.rs"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
include = [
|
||||
'/libunwind/*',
|
||||
]
|
||||
|
@ -1,8 +1,6 @@
|
||||
#![no_std]
|
||||
#![feature(link_cfg)]
|
||||
#![feature(nll)]
|
||||
#![feature(c_unwind)]
|
||||
#![feature(static_nobundle)]
|
||||
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
@ -24,7 +22,7 @@ cfg_if::cfg_if! {
|
||||
extern "C" {}
|
||||
|
||||
#[cfg(target_os = "redox")]
|
||||
#[link(name = "gcc_eh", kind = "static-nobundle", cfg(target_feature = "crt-static"))]
|
||||
#[link(name = "gcc_eh", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
|
||||
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
|
||||
extern "C" {}
|
||||
|
||||
|
@ -3,7 +3,7 @@ name = "runtime"
|
||||
description = "ARTIQ runtime on Zynq"
|
||||
version = "0.1.0"
|
||||
authors = ["M-Labs"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
target_zc706 = ["libboard_zynq/target_zc706", "libsupport_zynq/target_zc706", "libconfig/target_zc706", "libboard_artiq/target_zc706"]
|
||||
@ -16,7 +16,7 @@ build_zynq = { path = "../libbuild_zynq" }
|
||||
|
||||
[dependencies]
|
||||
num-traits = { version = "0.2", default-features = false }
|
||||
num-derive = "0.3"
|
||||
num-derive = "0.4"
|
||||
cslice = "0.3"
|
||||
log = "0.4"
|
||||
embedded-hal = "0.2"
|
||||
|
@ -2,8 +2,10 @@
|
||||
#![no_main]
|
||||
#![recursion_limit = "1024"] // for futures_util::select!
|
||||
#![feature(alloc_error_handler)]
|
||||
#![feature(const_btree_new)]
|
||||
#![feature(const_btree_len)]
|
||||
#![feature(panic_info_message)]
|
||||
#![allow(internal_features)]
|
||||
#![feature(lang_items)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate alloc;
|
||||
@ -11,7 +13,6 @@ extern crate alloc;
|
||||
#[cfg(all(feature = "target_kasli_soc", has_virtual_leds))]
|
||||
use core::cell::RefCell;
|
||||
|
||||
use ksupport;
|
||||
use libasync::task;
|
||||
#[cfg(has_drtio_eem)]
|
||||
use libboard_artiq::drtio_eem;
|
||||
@ -43,6 +44,11 @@ extern "C" {
|
||||
static __exceptions_start: u32;
|
||||
}
|
||||
|
||||
// linker may complain about missing rust_eh_personality but it is unused
|
||||
#[lang = "eh_personality"]
|
||||
#[allow(unused)]
|
||||
pub fn dummy_personality() { }
|
||||
|
||||
#[cfg(all(feature = "target_kasli_soc", has_virtual_leds))]
|
||||
async fn io_expanders_service(
|
||||
i2c_bus: RefCell<&mut libboard_zynq::i2c::I2c>,
|
||||
|
@ -442,6 +442,7 @@ fn set_fclk0_freq(clk: RtioClock, cfg: &Config) {
|
||||
);
|
||||
}
|
||||
|
||||
#[allow(static_mut_refs)]
|
||||
pub fn init(timer: &mut GlobalTimer, cfg: &Config) {
|
||||
let clk = get_rtio_clock_cfg(cfg);
|
||||
#[cfg(has_si5324)]
|
||||
|
@ -144,7 +144,7 @@ pub mod remote_dma {
|
||||
|
||||
pub async fn playback_done(&mut self, source: u8, error: u8, channel: u32, timestamp: u64) {
|
||||
let mut traces_locked = self.traces.async_lock().await;
|
||||
let mut trace = traces_locked.get_mut(&source).unwrap();
|
||||
let trace = traces_locked.get_mut(&source).unwrap();
|
||||
trace.state = RemoteState::PlaybackEnded {
|
||||
error: error,
|
||||
channel: channel,
|
||||
|
@ -40,6 +40,7 @@ impl From<DrtioError> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct SubkernelFinished {
|
||||
pub id: u32,
|
||||
pub status: FinishStatus,
|
||||
|
@ -3,6 +3,7 @@ authors = ["M-Labs"]
|
||||
name = "satman"
|
||||
version = "0.0.0"
|
||||
build = "build.rs"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
target_zc706 = ["libboard_zynq/target_zc706", "libsupport_zynq/target_zc706", "libconfig/target_zc706", "libboard_artiq/target_zc706"]
|
||||
|
@ -6,8 +6,8 @@ use libboard_artiq::{drtio_routing::RoutingTable,
|
||||
drtioaux_proto::{Packet, PayloadStatus, MASTER_PAYLOAD_MAX_SIZE},
|
||||
pl::csr};
|
||||
use libcortex_a9::cache::dcci_slice;
|
||||
use routing::{Router, Sliceable};
|
||||
use subkernel::Manager as KernelManager;
|
||||
use crate::routing::{Router, Sliceable};
|
||||
use crate::subkernel::Manager as KernelManager;
|
||||
|
||||
const ALIGNMENT: usize = 64;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
#![feature(alloc_error_handler, never_type, panic_info_message)]
|
||||
#![allow(internal_features)]
|
||||
#![feature(alloc_error_handler, never_type, panic_info_message, lang_items)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
@ -61,6 +62,11 @@ extern "C" {
|
||||
static __exceptions_start: u32;
|
||||
}
|
||||
|
||||
// linker may complain about missing rust_eh_personality but it is unused
|
||||
#[lang = "eh_personality"]
|
||||
#[allow(unused)]
|
||||
pub fn dummy_personality() { }
|
||||
|
||||
fn drtiosat_reset(reset: bool) {
|
||||
unsafe {
|
||||
csr::drtiosat::reset_write(if reset { 1 } else { 0 });
|
||||
|
@ -6,7 +6,7 @@ use libboard_artiq::{drtio_routing, drtioaux};
|
||||
#[cfg(has_drtio_routing)]
|
||||
use libboard_zynq::time::Milliseconds;
|
||||
use libboard_zynq::timer::GlobalTimer;
|
||||
use routing::Router;
|
||||
use crate::routing::Router;
|
||||
|
||||
#[cfg(has_drtio_routing)]
|
||||
fn rep_link_rx_up(repno: u8) -> bool {
|
||||
|
@ -6,7 +6,7 @@ use core::{slice, str};
|
||||
|
||||
use core_io::{Error as IoError, Write};
|
||||
use cslice::AsCSlice;
|
||||
use dma::{Error as DmaError, Manager as DmaManager};
|
||||
use crate::dma::{Error as DmaError, Manager as DmaManager};
|
||||
use io::{Cursor, ProtoWrite};
|
||||
use ksupport::{eh_artiq, kernel, rpc, rtio};
|
||||
use libboard_artiq::{drtio_routing::RoutingTable,
|
||||
@ -16,7 +16,7 @@ use libboard_artiq::{drtio_routing::RoutingTable,
|
||||
use libboard_zynq::{time::Milliseconds, timer::GlobalTimer};
|
||||
use libcortex_a9::sync_channel::Receiver;
|
||||
use log::warn;
|
||||
use routing::{Router, SliceMeta, Sliceable};
|
||||
use crate::routing::{Router, SliceMeta, Sliceable};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
enum KernelState {
|
||||
@ -53,6 +53,7 @@ enum KernelState {
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub enum Error {
|
||||
Load(String),
|
||||
KernelNotFound,
|
||||
|
Loading…
Reference in New Issue
Block a user