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

How to combine .SRC files?

Hi,
As we know the Keil C can generate the .SRC file for each .C file in a project, but without combining them. I need to combine all the .SRC files into one, just like what we saw in the "Deassembly" window while we are executing debugging. Anyone can help on this?

Thanks!!

John

Parents Reply Children
  • As long as you have the linker link complete object files after each other and not have the linker cut/paste individual functions and move them around in the memory space (i.e. so each *.SRC file contains a continuous memory sequence) then it's enough to supply the *.SRC files in the same order as the linker links them to the COPY command. And voila - COPY will be able to merge them in the same order as you supplied them.

    Notice that the linker do care about the order of source files in the project, when it comes to processing the object files into a binary...