This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Looking for a way to determine if software libraries are used for floating point computation

Hi there,

I am using Cortex-M4 with FPU support (single precision only) for a project. I am looking for an option to confirm that in the entire project we are only using hardware floating point unit for floating point computation. So far have looked into disassembly code to confirm we are using hardware FPU. However, going through every function that performs floating point computation would be tedious. 

Hence, I started looking for a better approach and couldn't determine a simple one. 

Toolchain Info

  • Cortex M4 with FPU
  • Keil ARM compiler toolchain

Things tried so far

  • Looking into disassembly code during debugging (by step through)
  • Looking into map files.
  • Tried using the following command line option arm-none-eabi-readelf with -A.

Above options didn't conclusively prove to me that we are only using hardware FPU. Any suggestions would be off great help. Thank you.

Parents
  • I doubt there is a single easy solution for this. It would depend on your code.

    One option could be to search for library calls. For example compiling a simple C function to add two floats, compiled to the following with -mfpu=softvfp

    test
            0x00000000:    b580        ..      PUSH     {r7,lr}
            0x00000002:    f7fffffe    ....    BL       __aeabi_fadd
            0x00000006:    bd80        ..      POP      {r7,pc}
    

Reply
  • I doubt there is a single easy solution for this. It would depend on your code.

    One option could be to search for library calls. For example compiling a simple C function to add two floats, compiled to the following with -mfpu=softvfp

    test
            0x00000000:    b580        ..      PUSH     {r7,lr}
            0x00000002:    f7fffffe    ....    BL       __aeabi_fadd
            0x00000006:    bd80        ..      POP      {r7,pc}
    

Children