Enable FPU.
This commit is contained in:
parent
3b7eb8bd9a
commit
ba37d13dae
|
@ -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)" = "<none>"
|
||||
"checksum cortex-m 0.2.4 (git+https://github.com/whitequark/cortex-m?rev=fpu-cpacr)" = "<none>"
|
||||
"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"
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue