Compare commits
No commits in common. "3598e08212a70534786e6da0aca9175955023830" and "fd05fa560f816057e0e29aee094e039d36558d23" have entirely different histories.
3598e08212
...
fd05fa560f
|
@ -7,8 +7,8 @@
|
|||
buildPhase =
|
||||
''
|
||||
mkdir $out
|
||||
${yosys}/bin/yosys -p "read_ilang $src/top.il; synth_ecp5 -top top -nomux -json $out/top.json"
|
||||
${pkgs.nextpnr}/bin/nextpnr-ecp5 --json $out/top.json --textcfg $out/top.config `cat $src/device` --lpf $src/top.lpf --freq 100
|
||||
${yosys}/bin/yosys -p "read_ilang $src/top.il; synth_ecp5 -top top -json $out/top.json"
|
||||
${pkgs.nextpnr}/bin/nextpnr-ecp5 --json $out/top.json --textcfg $out/top.config `cat $src/device` --lpf $src/top.lpf
|
||||
${pkgs.trellis}/bin/ecppack --svf-rowsize 100000 --svf $out/top.svf $out/top.config $out/top.bit
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ rustPlatform, rust-riscv32i-crates, binutils-riscv32 }:
|
||||
{ rustPlatform, rust-riscv32i-crates, binutils-riscv32, rustc, cargo }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
name = "helloworld";
|
||||
|
@ -7,10 +7,14 @@ rustPlatform.buildRustPackage rec {
|
|||
src = ./.;
|
||||
cargoSha256 = "0kf2pnfylfmzm0qvi4jfci43qvrnj1v5f037sb9zpvfqyddhdffl";
|
||||
|
||||
# HACK - rustc overlay does not update rustPlatform. Find out why.
|
||||
configurePhase = ''echo XXX ${rustPlatform.rust.rustc} ${rustPlatform.rust.cargo}'';
|
||||
|
||||
buildPhase = ''
|
||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
||||
export RUSTFLAGS="-L ${rust-riscv32i-crates}/lib/rustlib/riscv32i-unknown-none-elf/lib -C linker=${binutils-riscv32}/bin/riscv32-unknown-elf-ld -C link-arg=-Tlink.x"
|
||||
cargo build --release --target riscv32i-unknown-none-elf
|
||||
export RUSTC=${rustc}/bin/rustc
|
||||
${cargo}/bin/cargo build --release --target riscv32i-unknown-none-elf
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
self: super:
|
||||
rec {
|
||||
{
|
||||
llvm_7 = super.llvm_7.overrideAttrs(oa: {
|
||||
name = oa.name + "-riscv";
|
||||
cmakeFlags = oa.cmakeFlags ++ ["-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=RISCV"];
|
||||
|
@ -7,5 +7,4 @@ rec {
|
|||
rustc = super.rustc.overrideAttrs(oa: {
|
||||
patches = oa.patches ++ [ ./compilers/rustc-riscv32i.patch ];
|
||||
});
|
||||
rustPlatform = super.makeRustPlatform { inherit rustc; inherit (super) cargo; };
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue