File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ links = "cortex-m-rt" # Prevent multiple versions of cortex-m-rt being linked
19
19
[dependencies ]
20
20
r0 = " 1.0"
21
21
cortex-m-rt-macros = { path = " macros" , version = " =0.6.11" }
22
+ cortex-m = " 0.6"
22
23
23
24
[dev-dependencies ]
24
- cortex-m = " 0.6"
25
25
panic-halt = " 0.2.0"
26
26
cortex-m-semihosting = " 0.3"
27
27
Original file line number Diff line number Diff line change @@ -916,12 +916,12 @@ pub unsafe extern "C" fn Reset() -> ! {
916
916
r0:: zero_bss ( & mut __sbss, & mut __ebss) ;
917
917
r0:: init_data ( & mut __sdata, & mut __edata, & __sidata) ;
918
918
919
+ #[ allow( clippy:: match_single_binding) ]
919
920
match ( ) {
920
921
#[ cfg( not( has_fpu) ) ]
921
922
( ) => main ( ) ,
922
923
#[ cfg( has_fpu) ]
923
924
( ) => {
924
- // We redefine these here to avoid pulling the `cortex-m` crate as a dependency
925
925
const SCB_CPACR : * mut u32 = 0xE000_ED88 as * mut u32 ;
926
926
const SCB_CPACR_FPU_ENABLE : u32 = 0b01_01 << 20 ;
927
927
const SCB_CPACR_FPU_USER : u32 = 0b10_10 << 20 ;
@@ -932,6 +932,9 @@ pub unsafe extern "C" fn Reset() -> ! {
932
932
* SCB_CPACR | SCB_CPACR_FPU_ENABLE | SCB_CPACR_FPU_USER ,
933
933
) ;
934
934
935
+ cortex_m:: asm:: dsb ( ) ;
936
+ cortex_m:: asm:: isb ( ) ;
937
+
935
938
// this is used to prevent the compiler from inlining the user `main` into the reset
936
939
// handler. Inlining can cause the FPU instructions in the user `main` to be executed
937
940
// before enabling the FPU, and that would produce a hard to diagnose hard fault at
You can’t perform that action at this time.
0 commit comments