diff --git a/firmware/Cargo.lock b/firmware/Cargo.lock index e799114..61241a8 100644 --- a/firmware/Cargo.lock +++ b/firmware/Cargo.lock @@ -10,7 +10,7 @@ dependencies = [ [[package]] name = "cortex-m" version = "0.2.4" -source = "git+https://github.com/whitequark/cortex-m?rev=impl-syst#a9967c544da4ddc7575135ed522dffd21ec28c19" +source = "git+https://github.com/whitequark/cortex-m?rev=fpu-cpacr#0e3dd2df58e52f9af80e47327a62a83511e010f9" dependencies = [ "cortex-m-semihosting 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "volatile-register 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -20,7 +20,7 @@ dependencies = [ name = "cortex-m" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "cortex-m 0.2.4 (git+https://github.com/whitequark/cortex-m?rev=impl-syst)" +replace = "cortex-m 0.2.4 (git+https://github.com/whitequark/cortex-m?rev=fpu-cpacr)" [[package]] name = "cortex-m-rt" @@ -63,7 +63,7 @@ dependencies = [ ] [metadata] -"checksum cortex-m 0.2.4 (git+https://github.com/whitequark/cortex-m?rev=impl-syst)" = "" +"checksum cortex-m 0.2.4 (git+https://github.com/whitequark/cortex-m?rev=fpu-cpacr)" = "" "checksum cortex-m 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "964f183322128497a636a5d4524dfe91fa1394a15b7b2c4329ee5bb66bef1548" "checksum cortex-m-rt 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2ed494cbd15190fae60f608e6b4690e753df47b5f5e25e95d3c298f801f5c1d0" "checksum cortex-m-semihosting 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "54a88e8fd577808637f819107f34eece1b6b45be8db1c56d1c563095b80b655e" diff --git a/firmware/Cargo.toml b/firmware/Cargo.toml index 89d4a50..25984d5 100644 --- a/firmware/Cargo.toml +++ b/firmware/Cargo.toml @@ -13,4 +13,4 @@ lto = true debug = true [replace] -"cortex-m:0.2.4" = { git = "https://github.com/whitequark/cortex-m", rev = "impl-syst" } +"cortex-m:0.2.4" = { git = "https://github.com/whitequark/cortex-m", rev = "fpu-cpacr" } diff --git a/firmware/src/main.rs b/firmware/src/main.rs index 5859cab..887eab1 100644 --- a/firmware/src/main.rs +++ b/firmware/src/main.rs @@ -126,6 +126,10 @@ fn main() { let sysctl = tm4c129x::SYSCTL.borrow(cs); let nvic = tm4c129x::NVIC.borrow(cs); + // Enable FPU + let scb = tm4c129x::SCB.borrow(cs); + scb.enable_fpu(); + // Set up main oscillator sysctl.moscctl.write(|w| w.noxtal().bit(false)); sysctl.moscctl.modify(|_, w| w.pwrdn().bit(false).oscrng().bit(true));