We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
when i add startup.a51 ,init.a51 and C51S.LIB to my project.the link result as below:
INPUT MODULES INCLUDED: test.obj (TEST) aa.obj (AA) .\STARTUP.obj (?C_STARTUP) .\INIT_TNY.obj (?C_INIT) C:\Keil\C51\LIB\C51S.LIB (?C?COPY)
?c_init segment is not the last segment in the link process, is that right?
when i delet startup.a51 and init.a51 from project ,then rebuild it ,the segment of ?c_init is linked at the last step showed below;
INPUT MODULES INCLUDED: test.obj (TEST) aa.obj (AA) C:\Keil\C51\LIB\C51S.LIB (?C_STARTUP) C:\Keil\C51\LIB\C51S.LIB (?C?COPY) C:\Keil\C51\LIB\C51S.LIB (?C_INIT)
i think the send link is right, how about the first link step, is it right?
thanks you!
Today I try this again: 1. the files in my project column:
startup.a51 TEST.C(with "src" option check) AA.C C51S.LIB.
2.The link proceture :
C:\KEIL\C51\BIN\BL51.EXE .\STARTUP.obj, test.obj, aa.obj, C:\Keil\C51\LIB\C51S.LIB TO Test INPUT MODULES INCLUDED: .\STARTUP.obj (?C_STARTUP) test.obj (TEST) aa.obj (AA) C:\Keil\C51\LIB\C51S.LIB (?C_INIT) C:\Keil\C51\LIB\C51S.LIB (?C?COPY)
Then i build the project, no error,no warning.But the link proceture that the ?c_init isn't the last segment linked by BL51 maks me worry: if some globle variables with initiation in the C51s.lib and the ?c_init isn't linked at the last step. then the gloable variables in C51S.LIB will never be initiated because of the last space "DB 0" in ?C_INITSEG segment.