forked from M-Labs/zynq-rs
add feature target_kasli_soc to libsupport_zynq, libconfig, experiments, szl, default.nix
This commit is contained in:
parent
02217f27d1
commit
500472b2a8
@ -36,7 +36,7 @@ let
|
|||||||
"${target}-experiments" = build-crate "${target}-experiments" "experiments" "target_${target}" cargoSha256Experiments;
|
"${target}-experiments" = build-crate "${target}-experiments" "experiments" "target_${target}" cargoSha256Experiments;
|
||||||
"${target}-szl" = build-crate "${target}-szl" "szl" "target_${target}" cargoSha256SZL;
|
"${target}-szl" = build-crate "${target}-szl" "szl" "target_${target}" cargoSha256SZL;
|
||||||
};
|
};
|
||||||
targets = ["zc706" "coraz7" "redpitaya"];
|
targets = ["zc706" "coraz7" "redpitaya" "kasli_soc"];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit cargo-xbuild;
|
inherit cargo-xbuild;
|
||||||
|
@ -9,6 +9,7 @@ edition = "2018"
|
|||||||
target_zc706 = ["libboard_zynq/target_zc706", "libsupport_zynq/target_zc706"]
|
target_zc706 = ["libboard_zynq/target_zc706", "libsupport_zynq/target_zc706"]
|
||||||
target_coraz7 = ["libboard_zynq/target_coraz7", "libsupport_zynq/target_coraz7"]
|
target_coraz7 = ["libboard_zynq/target_coraz7", "libsupport_zynq/target_coraz7"]
|
||||||
target_redpitaya = ["libboard_zynq/target_redpitaya", "libsupport_zynq/target_redpitaya"]
|
target_redpitaya = ["libboard_zynq/target_redpitaya", "libsupport_zynq/target_redpitaya"]
|
||||||
|
target_kasli_soc = ["libboard_zynq/target_kasli_soc", "libsupport_zynq/target_kasli_soc"]
|
||||||
default = ["target_zc706"]
|
default = ["target_zc706"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
@ -105,31 +105,20 @@ pub fn main_core0() {
|
|||||||
.boot_mode_pins()
|
.boot_mode_pins()
|
||||||
);
|
);
|
||||||
|
|
||||||
#[cfg(feature = "target_zc706")]
|
#[cfg(any(
|
||||||
|
feature = "target_zc706",
|
||||||
|
feature = "target_redpitaya",
|
||||||
|
feature = "target_kasli_soc",
|
||||||
|
))]
|
||||||
const CPU_FREQ: u32 = 800_000_000;
|
const CPU_FREQ: u32 = 800_000_000;
|
||||||
#[cfg(feature = "target_coraz7")]
|
#[cfg(feature = "target_coraz7")]
|
||||||
const CPU_FREQ: u32 = 650_000_000;
|
const CPU_FREQ: u32 = 650_000_000;
|
||||||
#[cfg(feature = "target_redpitaya")]
|
|
||||||
const CPU_FREQ: u32 = 800_000_000;
|
|
||||||
|
|
||||||
info!("Setup clock sources...");
|
info!("Setup clock sources...");
|
||||||
ArmPll::setup(2 * CPU_FREQ);
|
ArmPll::setup(2 * CPU_FREQ);
|
||||||
Clocks::set_cpu_freq(CPU_FREQ);
|
Clocks::set_cpu_freq(CPU_FREQ);
|
||||||
#[cfg(feature = "target_zc706")]
|
IoPll::setup(1_000_000_000);
|
||||||
{
|
libboard_zynq::stdio::drop_uart();
|
||||||
IoPll::setup(1_000_000_000);
|
|
||||||
libboard_zynq::stdio::drop_uart();
|
|
||||||
}
|
|
||||||
#[cfg(feature = "target_coraz7")]
|
|
||||||
{
|
|
||||||
IoPll::setup(1_000_000_000);
|
|
||||||
libboard_zynq::stdio::drop_uart();
|
|
||||||
}
|
|
||||||
#[cfg(feature = "target_redpitaya")]
|
|
||||||
{
|
|
||||||
IoPll::setup(1_000_000_000);
|
|
||||||
libboard_zynq::stdio::drop_uart();
|
|
||||||
}
|
|
||||||
info!("PLLs set up");
|
info!("PLLs set up");
|
||||||
let clocks = zynq::clocks::Clocks::get();
|
let clocks = zynq::clocks::Clocks::get();
|
||||||
info!(
|
info!(
|
||||||
|
@ -14,4 +14,5 @@ log = "0.4"
|
|||||||
target_zc706 = []
|
target_zc706 = []
|
||||||
target_coraz7 = []
|
target_coraz7 = []
|
||||||
target_redpitaya = []
|
target_redpitaya = []
|
||||||
|
target_kasli_soc = []
|
||||||
ipv6 = []
|
ipv6 = []
|
||||||
|
@ -43,6 +43,10 @@ pub fn get_adresses(cfg: &Config) -> NetAddresses {
|
|||||||
let mut hardware_addr = EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x55]);
|
let mut hardware_addr = EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x55]);
|
||||||
#[cfg(feature = "target_redpitaya")]
|
#[cfg(feature = "target_redpitaya")]
|
||||||
let mut ipv4_addr = IpAddress::v4(192, 168, 1, 55);
|
let mut ipv4_addr = IpAddress::v4(192, 168, 1, 55);
|
||||||
|
#[cfg(feature = "target_kasli_soc")]
|
||||||
|
let mut hardware_addr = EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x56]);
|
||||||
|
#[cfg(feature = "target_kasli_soc")]
|
||||||
|
let mut ipv4_addr = IpAddress::v4(192, 168, 1, 56);
|
||||||
|
|
||||||
if let Ok(Ok(addr)) = cfg.read_str("mac").map(|s| s.parse()) {
|
if let Ok(Ok(addr)) = cfg.read_str("mac").map(|s| s.parse()) {
|
||||||
hardware_addr = addr;
|
hardware_addr = addr;
|
||||||
|
@ -9,6 +9,7 @@ edition = "2018"
|
|||||||
target_zc706 = ["libboard_zynq/target_zc706"]
|
target_zc706 = ["libboard_zynq/target_zc706"]
|
||||||
target_coraz7 = ["libboard_zynq/target_coraz7"]
|
target_coraz7 = ["libboard_zynq/target_coraz7"]
|
||||||
target_redpitaya = ["libboard_zynq/target_redpitaya"]
|
target_redpitaya = ["libboard_zynq/target_redpitaya"]
|
||||||
|
target_kasli_soc = ["libboard_zynq/target_kasli_soc"]
|
||||||
panic_handler = []
|
panic_handler = []
|
||||||
dummy_irq_handler = []
|
dummy_irq_handler = []
|
||||||
alloc_core = []
|
alloc_core = []
|
||||||
|
@ -9,6 +9,7 @@ edition = "2018"
|
|||||||
target_zc706 = ["libboard_zynq/target_zc706", "libsupport_zynq/target_zc706", "libconfig/target_zc706"]
|
target_zc706 = ["libboard_zynq/target_zc706", "libsupport_zynq/target_zc706", "libconfig/target_zc706"]
|
||||||
target_coraz7 = ["libboard_zynq/target_coraz7", "libsupport_zynq/target_coraz7", "libconfig/target_coraz7"]
|
target_coraz7 = ["libboard_zynq/target_coraz7", "libsupport_zynq/target_coraz7", "libconfig/target_coraz7"]
|
||||||
target_redpitaya = ["libboard_zynq/target_redpitaya", "libsupport_zynq/target_redpitaya", "libconfig/target_redpitaya"]
|
target_redpitaya = ["libboard_zynq/target_redpitaya", "libsupport_zynq/target_redpitaya", "libconfig/target_redpitaya"]
|
||||||
|
target_kasli_soc = ["libboard_zynq/target_kasli_soc", "libsupport_zynq/target_kasli_soc", "libconfig/target_kasli_soc"]
|
||||||
default = ["target_zc706"]
|
default = ["target_zc706"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
Loading…
Reference in New Issue
Block a user