# How to obtain the dwarf2 file with STM32Cube IDE

I'm trying to simulate a project for an STM32F103C6 in proteus ISIS but for debug purposes labcenter's people says that I need the .elf file and the dwarf2 file (both of them in the same folder), then I' found that GCC generates the dwarf 2 file with the option -gdwarf-2 what I've put in Project Properties -> Build steps and in the pre-build command I've wrote the command -gdwarf-2, it didn't worked so I've changed the command to the post-build commands in the same tab. I've also noted that in Tool Settings are several options for what I think is to choose the type of dwarf file that is going to be made during compilation but the only options are none, minimal (-g1), default (g) and maximum (-g3).

After I did this the output of the compilations shows the following message:

20:27:10 **** Incremental Build of configuration Debug for project Cubex ****
make -j4 all
gdwarf-2
make (e=3): El sistema no puede encontrar la ruta especificada.
make[1]: [makefile:81: pre-build] Error 3 (ignored)
arm-none-eabi-size  Cubex.elf
text      data    bss     dec     hex   filename
16752      20     1796   18568    4888  Cubex.elf
Finished building: default.size.stdout
20:27:28 Build Finished. 0 errors, 0 warnings. (took 17s.509ms)


What I suppose means that it couldn't make the dwarf2 file due the message "El sistema no puede encontrar la ruta especificada" (The system can not find the specified path). The .hex file from STM32Cube IDE is working well in Proteus but I want to see the source code for debugging

Can anyone help me and explain how to obtain the needed files. Just before somone suggest me to do that I can tell that I've asked in ST community and I didn't have an answer yet.

Thanks in advance for the help.