forked from M-Labs/artiq
1
0
Fork 0

firmware: do not use PIC in Rust code.

This fixes test_pulse_rate and test_pulse_rate_dds by making
rtio_output slightly faster.
This commit is contained in:
whitequark 2017-02-02 12:22:55 +00:00
parent 259319e456
commit 9c93c760fc
2 changed files with 7 additions and 3 deletions

View File

@ -28,12 +28,18 @@ LDFLAGS += --gc-sections \
-L../libunwind \ -L../libunwind \
-L../libdyld -L../libdyld
RUSTFLAGS = \
-C target-feature=+mul,+div,+ffl1,+cmov,+addc \
-C relocation-model=static \
-C opt-level=s \
-Cpanic=abort
export RUSTFLAGS
all: runtime.bin runtime.fbi all: runtime.bin runtime.fbi
.PHONY: $(RUSTOUT)/libruntime.a .PHONY: $(RUSTOUT)/libruntime.a
$(RUSTOUT)/libruntime.a: $(RUSTOUT)/libruntime.a:
$(CARGO) \ $(CARGO) \
RUSTFLAGS="-C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s -Cpanic=abort" \
CARGO_TARGET_DIR=$(realpath .)/cargo \ CARGO_TARGET_DIR=$(realpath .)/cargo \
cargo build --target=or1k-unknown-none \ cargo build --target=or1k-unknown-none \
--manifest-path $(realpath $(RUNTIME_DIRECTORY)/../firmware/runtime/Cargo.toml) --manifest-path $(realpath $(RUNTIME_DIRECTORY)/../firmware/runtime/Cargo.toml)
@ -49,7 +55,6 @@ runtime.elf: $(RUSTOUT)/libruntime.a ksupport_data.o
.PHONY: $(RUSTOUT_KSUPPORT)/libksupport.a .PHONY: $(RUSTOUT_KSUPPORT)/libksupport.a
$(RUSTOUT_KSUPPORT)/libksupport.a: $(RUSTOUT_KSUPPORT)/libksupport.a:
$(CARGO) \ $(CARGO) \
RUSTFLAGS="-C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s -Cpanic=unwind" \
CARGO_TARGET_DIR=$(realpath .)/cargo-ksupport \ CARGO_TARGET_DIR=$(realpath .)/cargo-ksupport \
cargo build --target=or1k-unknown-none \ cargo build --target=or1k-unknown-none \
--manifest-path $(realpath $(RUNTIME_DIRECTORY)/../firmware/ksupport/Cargo.toml) --manifest-path $(realpath $(RUNTIME_DIRECTORY)/../firmware/ksupport/Cargo.toml)

View File

@ -356,7 +356,6 @@ class CoredeviceTest(ExperimentCase):
self.assertGreater(rate, 100*ns) self.assertGreater(rate, 100*ns)
self.assertLess(rate, 700*ns) self.assertLess(rate, 700*ns)
@unittest.skip("fails on CI for unknown reasons")
def test_pulse_rate_dds(self): def test_pulse_rate_dds(self):
"""Minimum interval for sustained DDS frequency switching""" """Minimum interval for sustained DDS frequency switching"""
self.execute(PulseRateDDS) self.execute(PulseRateDDS)