I have a project that compiles and links correct. It uses a scatter file to place "info.o" (RO) in a specific region of memory.
Then I made a copy of that project, re-organized some of the project files, and re-compiled. All the source files, headers, scatter file, etc are the same. I got Linker warnings because "no section matches pattern info.o" (meaning there was not an info.o object to place in the section of memory reserved by the scatter file). Looking into the files created, I see that info_1.o was created instead of info.o. So my scatter file failed because the compiler created a differently named object file in my re-organized project...
How are the object file names determined and how can I avoid this issue? Why would info_1.o be created when there is not a info.o? I don't want to have to re-write my scatter file every time I make a change to the project because the object file names are shifting around. This is particularly true because I want to use the same scatter file for many projects that share the same core structure.
Scanning through my object files, it seems like in my original project maybe 2% of my files got a _1 appended. In my re-organized projects maybe 40% got a _1 appended.
That makes sense, but I'm still confused why there was no info.o created - only info_1.o. Was info.o created temporarily and then removed (requiring a new unique name of info_1.o)?
Anyway, even if I don't know exactly what processes was used to create the .o files, at least you've given me a good way to navigate around the issue in my scatter file. Thanks again!