Hello! I got some error messages during linking procedure as below.
linking... *** ERROR L110: CANNOT FIND SECTION OR REGBANK SECTION: ?PR?PFLASH CLASS: FLASH_CODE *** ERROR L127: UNRESOLVED EXTERNAL SYMBOL SYMBOL: _PR_PFLASH_s_ MODULE: MAIN.obj (MAIN) *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: _PR_PFLASH_s_ MODULE: MAIN.obj (MAIN) ADDRESS: 0014H *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: _PR_PFLASH_s_ MODULE: MAIN.obj (MAIN) ADDRESS: 0018H Target not created
The code is listed below the error messages with user classes and user sections.
User Classes - SROM(0x18200-0x1FDFF) User Sections - ?PR?PFLASH%FLASH_CODE(0x00F800)[!]
SROM_PS(PFLASH) void main(void) { unsigned int ui_received, ui_send; hmemcpy(SROM_PS_TRG(PFLASH), SROM_PS_SRC(PFLASH), SROM_PS_LEN(PFLASH)); Project_Init(); while (1) { // Receive a data from PC ui_received = ASC_uwGetData(); ui_send = ui_received; // Resend the data to PC ASC_vSendData(ui_send); } }
I would appreciate it if anybody tells me how to fix this error. Thanks.
-Yoong-Goog Cho
Yes, of course a single Project can include both 'C' and assembler files!
Your assembler code will, of course, have to abide by the 'C' compiler's naming conventions, calling conventions, data representation, etc wherever it wants to interact with the 'C' code. These details will be defined in the Compiler Manual.
Dear Andy,
I really appreciate your kind explanation.
Yoong-Goog Cho
Actually there are two downloads with further information: http://www.keil.com/appnotes/docs/apnt_138.asp http://www.keil.com/download/docs/275.asp
Dear Reinhard Keil:
I really appreciate your follow up and valuable examples.