When I am trying to compile my code, i am getting the following error ERROR L115: PARTIAL SEGMENT BELONGS TO DIFFERENT MEMORY CLASS SEGMENT: ?C_C51STARTUP MODULE: C:\KEIL\C51\LIB\CH51L.LIB (?C_INIT) can any body explain me why this error and how it can be resolved?
The first thing to note is that it's not a Compiler error; it's a Linker error - so you need to look it up in the Linker Manual.
Unfortunately, the text of your L115 message doesn't match the description in the online documentation: http://www.keil.com/support/man/docs/lx51/lx51_l115.htm http://www.keil.com/support/man/docs/bl51/bl51_l115.htm
SO you're going to have to check the documentation that's included in your Keil installation.
If you click the message in the uVision output window, then press F1, it should take you to the description....
"the text of your L115 message doesn't match the description in the online documentation"
You appear to have specified the wrong toolset - that looks more like the L115 message from the L251 Linker:
http://www.keil.com/support/man/docs/l251/l251_l115.htm
Or maybe LARM:
http://www.keil.com/support/man/docs/la/la_l115.htm
thank you Mr Andy Neil, I am using L251 linker You appear to have specified the wrong toolset can you tell me how to check that wrong toolset is specified in uvision?
Are you sure?
Here is the L115 error as shown for the L251 linker:
INPAGE Segment is Larger Than 256 Bytes
This doesn't match what you initially posted, does it?
And here is the L115 error as shown for the LARM linker:
Partial Segment Belongs to Different Memory Class
This does match what you initially posted, doesn't it?
"can you tell me how to check that wrong toolset is specified in uvision?"
It's on the 'Device' tab of the project options.
Note that this forum also has an "MCU (Toolset)" option for each post that you make on the forum.
in properties of uvision it is shown that Linker/Locator LX51.exe so by this i am saying that i am using L251 linker, if it is wrong kindly let me know.