Hello, I'm using the ADICUP3029 developmentboard with Keil uv5. I cannot get the example programm successfully compiled because of the error L6236E: No section matches selector - no section to be FIRST/LAST. I've searched for solutions and I think the problem is with the scatter file but I actually don't ready unterstand the mechanism in it. Could anyone help me? Thanks.
Startup documents are already included
The scatter file
The RESET Area
The configuration form Options->Linker
Hiere I can choose bewteen "xxx Debug" and "xxx Release", is this relevant?
The error states that no object is being linked in to be placed FIRST (or LAST),
From the scatter file, you can see that any object with an ELF section named "RESET" should be placed there.
This is defined in the 'AREA' line of the vector table source above, however it is being removed by the linker. This is because it needs to be defined as an ENTRY point.
I recommend in the Linker options > MIsc controls section illustrated above to add the command option:
--entry=Reset_Handler
Regards, Ronan
I fully agree with Ronan regarding the "RESET" section and the "AREA" line. Usually it should not be necessary to specify an entry point. We don't do this in any of our examples and you are using a standard scatter file generated by µVision. Do you get warnings during the project build before the linker error, especially for the assembly startup file?
Yes I've got several warnings before the linker error
Thanks for the answer. I've add the command "--entry=Reset_Handler" into the Misc controls, but the error is still there. And should I add the "ENTRY" into the startup.s file like this?
I've not seen such warnings before where all unused include paths and definitions are listed. Please check the startup....s file if the line "AREA RESET…" is really translated. You can then check the linker map file if this startup....o file is really included in the project or if some sections of this module were removed because they are unused (see table 'Removing Unused input sections from the image').