This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

compile two assembly func

Hi all,
I am stuck up with an issue in Keil uvision 3

I am trying to create a project with combination of C source and assembly source files.

I am trying to write all the basic functions like delay, lcd driver etc, in different assembly files eg. delay.a51 ,lcd.a51

I include these A51 file in project and call these functions in Main.c file. Now the problem is I am successfully calling delay function, but i am not able to call lcd functions, rather gives me a warning saying

assembling lcd_driver.a51...
linking...
*** WARNING L7: MODULE NAME NOT UNIQUE
    MODULE:  lcd_driver.obj (ASM_COD)
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
    SYMBOL:  _LCD_INTIALISE
    MODULE:  SPI_Protocol_v2.obj (SPI_PROTOCOL_V2)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
    SYMBOL:  _LCD_INTIALISE
    MODULE:  SPI_Protocol_v2.obj (SPI_PROTOCOL_V2)
    ADDRESS: 019AH

0 Error(s), 3 Warning(s).

The M51 file says

BL51 BANKED LINKER/LOCATER V6.11, INVOKED BY:
G:\KEIL\C51\BIN\BL51.EXE SPI_Protocol_v2.obj, delay_ms.obj, lcd_driver.obj TO SPI_Protocol RAMSIZE (256)


MEMORY MODEL: SMALL


INPUT MODULES INCLUDED:
  SPI_Protocol_v2.obj (SPI_PROTOCOL_V2)
  delay_ms.obj (ASM_COD)
  G:\KEIL\C51\LIB\C51S.LIB (?C_STARTUP)
  G:\KEIL\C51\LIB\C51S.LIB (?C?SIDIV)
  G:\KEIL\C51\LIB\C51S.LIB (?C?LLDIDATA)
  G:\KEIL\C51\LIB\C51S.LIB (?C?LLDIDATA0)
  G:\KEIL\C51\LIB\C51S.LIB (?C?LSTIDATA)
  G:\KEIL\C51\LIB\C51S.LIB (?C?LSTKIDATA)
  G:\KEIL\C51\LIB\C51S.LIB (?C?LROL)
  G:\KEIL\C51\LIB\C51S.LIB (?C?UIDIV)

It looks like it is ignoring lcd_driver.obj

What am i doing wrong ??

Parents
  • I would like to call delay subroutine in LCD_driver.a51, which is defined in delay.a51

    Can you please tell me how can I get this one working,

    If you can't figure that out by yourself, you should re-think your expectation that you can beat the C compiler on code efficiency ... that would take considerably better assembly programming skills than you've exhibited so far.

Reply
  • I would like to call delay subroutine in LCD_driver.a51, which is defined in delay.a51

    Can you please tell me how can I get this one working,

    If you can't figure that out by yourself, you should re-think your expectation that you can beat the C compiler on code efficiency ... that would take considerably better assembly programming skills than you've exhibited so far.

Children
No data