CMSIS_5 icon indicating copy to clipboard operation
CMSIS_5 copied to clipboard

irq_armv7m: missing fpu selection for Armcc5

Open 0xc0170 opened this issue 3 years ago • 4 comments

The file https://github.com/ARM-software/CMSIS_5/blob/develop/CMSIS/RTOS2/RTX/Source/ARM/irq_armv7m.s contains only one FPU selection:

                IF       ({FPU}="FPv4-SP")
FPU_USED        EQU      1
                ELSE
FPU_USED        EQU      0
                ENDIF

There are multiple options of FPU for v7m as I know of. For instance I found it failing for cortex-m4f (using --cpu Cortex-M4.fp.sp ).

It should be (if I got the FPU flags correct):

                IF       ({FPU}="FPv4-SP") || ({FPU}="VFPv4_SP_D16") || ({FPU}="FPv5-SP") || ({FPU}="FPv5_D16")
FPU_USED        EQU      1
                ELSE
FPU_USED        EQU      0
                ENDIF

0xc0170 avatar Jul 28 '21 08:07 0xc0170

Playing with the command line options I could not create FPv4-SP in the info {FPU} but using --fpu option I was able to see VFPv4_D16

--cpu --fpu {FPU}
Cortex-M4.fp.sp VFPv4_SP_D16
Cortex-M4.fp VFPv4_SP_D16
Cortex-M4 FPv4-SP VFPv4_SP_D16
Cortex-M4 VFPv4_D16 VFPv4_D16
Cortex-M7.fp.sp FPv5-SP
Cortex-M7.fp.dp FPv5_D16

jkrech avatar Jul 28 '21 13:07 jkrech

Partly addressed in #1267

JonatanAntoni avatar Jul 29 '21 07:07 JonatanAntoni

Playing with the command line options I could not create FPv4-SP in the info {FPU} but using --fpu option I was able to see VFPv4_D16

This would be the correct condition (taking {FPU} from the table above)?

IF ({FPU}="VFPv4_D16") || ({FPU}="VFPv4_SP_D16") || ({FPU}="FPv5-SP") || ({FPU}="FPv5_D16")

0xc0170 avatar Jul 29 '21 08:07 0xc0170

@0xc0170, please check with @GorgonMeducer about getting this into a PR. Thanks!

JonatanAntoni avatar Jul 29 '21 08:07 JonatanAntoni