Tag Archives: STM32 correlation

[Solved] KEIL Error: source file ‘.XXX.o‘ – object file renamed from ‘XXX.o‘ to …

Problem description

1. In the Keil project, move the C file in the app component to the dev component,
2. When using keil, sometimes you accidentally add two identical. C files in different group folders
at this time, the compilation will appear:
note: source file ‘… (core/Src/GPIO. C) – object file renamed from’ 7.710.200c/GPIO. O ‘to’ 7.710.200c/GPIO_ 1. O ‘.
error report

Solution

1. Delete duplicate files to ensure that. C files are not duplicated in the project
2. Close the Keil project and run keilkill.bat to delete all the compiled link files
3. Open the project to compile

Keilkill.bat code attached

del *.bak /s
del *.ddk /s
del *.edk /s
del *.lst /s
del *.lnp /s
del *.mpf /s
del *.mpj /s
del *.obj /s
del *.omf /s
::del *.opt /s  ::Settings that do not allow JLINK to be deleted
del *.plg /s
del *.rpt /s
del *.tmp /s
del *.__i /s
del *.crf /s
del *.o /s
del *.d /s
del *.axf /s
del *.tra /s
del *.dep /s           
del JLinkLog.txt /s

del *.iex /s
del *.htm /s
del *.sct /s
del *.map /s
exit

Copy the content to a TXT file, save and exit. Then change the suffix of. Txt to. Bat. Put the modified bat file into the project and run it