Mismatch in axf/elf file due to -MD -MP -MF flags

Sysprogs forums Forums VisualGDB Mismatch in axf/elf file due to -MD -MP -MF flags

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34876
    dmas
    Participant

    Hi,

    Imported a a Keil Uvision project and now I get almost the same elf /axf file upon compiling.

    After some checking,  the difference is in how the output file is created in .rsp(Visual GDB)  VS  .__i(uVision) files.

    What settings do I set so the output will be same?

    __i format for creating the output .0 file :  (how I need it to be! )
    -o "VisualGDB/Debug/_2_/PNG_STM32WBxx_HAL_Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_adc.o" -MD "../../PNG_STM32WBxx_HAL_Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_adc.c"
    .rsp format for creating .0 file:
    "C:/Users/User1/Documents/MIGO_HW_V1/PNG_STM32WBxx_HAL_Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_adc.c" -o "VisualGDB/Debug/_2_/PNG_STM32WBxx_HAL_Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_adc.o" -MD -MP -MF "VisualGDB/Debug/_2_/PNG_STM32WBxx_HAL_Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_adc.dep"

    how do I match the .rsp to .i ?

     

    Thanks

    • This topic was modified 6 months, 1 week ago by support. Reason: formatting
    #34881
    support
    Keymaster

    Hi,

    These options should not affect the compiled program. The exact -MD -MP -MF <dep file> combination tells the compiler to produce a dependency file (.dep) for tracking the headers used by this source file (so that VisualGDB would know which files to rebuild if a header changes). If you omit the -MF option, the compiler will try to automatically derive the dependency file name from the object name (which could be different between different compiler types/versions), so VisualGDB uses it to explicitly tell where the dependency file should be created.

    The -MP option adds extra Make targets for the header files themselves. They are not directly used by VisualGDB, but they won’t affect the code produced by the compiler either.

    You can read more about these options in the GCC documentation. Clang/ARMClang reuses the same syntax.

    That said, if you can confirm that changing these options does change the actual code produced by ARMClang, we can gladly investigate it further.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.