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

problem in creating bin file

In my project i have one main file(it has the main function) and five files which contain a function each and is called from main function one by one. When i use the following setting in link file
COMMON{startup.obj},
COMMON{protect.obj},
COMMON{l51_bank.obj},
COMMON{main.obj},
BANK1{file_1.obj},
COMMON{file_2.obj},
COMMON{file_3.obj},
COMMON{file_4.obj},
COMMON{file_5.obj} TO clk_freq
BANKAREA(0x8000, 0xFFFF)

and after that i use follwoing commands to generate the bin file.

LX51 @link_CLK.lnk

OHX51 clk_freq HEXFILE(clk_freq.Hxx) H386 MERGE32K
hexbin2 clk_freq.hxx clk_freq.bin i 0000 7fff 2

the size of file is as follows
clk_freq (OMF51 obj module) --> 22kb
clk_freq.hex --> 6kb
clk_freq.bin --> 33 kb
The size are fine and as per expected, but when i use the following settings in link file

COMMON{startup.obj},
COMMON{protect.obj},
COMMON{l51_bank.obj},
COMMON{main.obj},
COMMON{file_1.obj},
COMMON{file_2.obj},
COMMON{file_3.obj},
COMMON{file_4.obj},
COMMON{file_5.obj} TO clk_freq
BANKAREA(0x8000, 0xFFFF)

that is all files in common bank than the bin file is not generated, the file size are as follows

clk_freq (OMF51 obj module) --> 20 kb
clk_freq.hex --> 1 kb
clk_freq.bin --> 0 kb

can anyone please tell me why the binary file is not generated when all the files are kept in same bank.

  • clk_freq (OMF51 obj module) --> 20 kb
    clk_freq.hex --> 1 kb
    clk_freq.bin --> 0 kb
    

    Have you checked what's actually in that Hex file?

    What build messages do you get? Do they indicate any problems?

  • this is the build message i get, it shows no problem as such

    Build target 'Target 1'
    compiling main.c...
    assembling PROTECT.A51...
    assembling STARTUP.A51...
    assembling L51_BANK.A51...
    compiling file_1.c...
    compiling file_2.c...
    compiling file_3.c...
    compiling file_4.c...
    compiling file_5.c...
    creating library sample.LIB...
    TRANSFER
    "main.obj",
    "PROTECT.obj",
    "STARTUP.obj",
    "L51_BANK.obj",
    "file_1.obj",
    "file_2.obj",
    "file_3.obj",
    "file_4.obj",
    "file_5.obj"
    TO "sample.LIB"
    LIBX51 LIBRARY MANAGER V4.24
    COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2002
    User command #1: C:\UserData\DECT_Handset\transmit\sample_project\LNK_SampleApp.bat
    C:\UserData\DECT_Handset\transmit\sample_project>LX51 @link_CLK.lnk
    LX51 LINKER/LOCATER V4.34a - SN: K1CBF-1A7HTE
    COPYRIGHT KEIL ELEKTRONIK GmbH 1995 - 2008
    @link_CLK.lnk COMMON{startup.obj},
    COMMON{protect.obj},
    COMMON{l51_bank.obj},
    COMMON{main.obj},
    COMMON{file_1.obj},
    COMMON{file_2.obj},
    COMMON{file_3.obj},
    COMMON{file_4.obj},
    COMMON{file_5.obj}
    TO clk_freq
    BANKAREA(0x8000, 0xFFFF)
    CODE MAP IXREF LI PUBLICS SYMBOLS NOAJMP NOSORTSIZE DW(8)
    CLASSES( XDATA (X:0x0000-X:0x47FF), PDATA (X:0x4700-X:0x47FF), CONST (C:0x0000-C:0x7FFF), HCONST (B1:0x8000-B1:0xFFFF, B2:0x8000-B2:0xFFFF, B3:0x8000-B3:0xFFFF, B4:0x8000-B4:0xFFFF, B5:0x8000-B5:0xFFFF, B6:0x8000-B6:0xFFFF, B7:0x8000-B7:0xFFFF, B8:0x8000-B8:0xFFFF, B9:0x8000-B9:0xFFFF, Ba:0x8000-Ba:0xFFFF, Bb:0x8000-Bb:0xFFFF, Bc:0x8000-Bc:0xFFFF, Bd:0x8000-Bd:0xFFFF, Be:0x8000-Be:0xFFFF, Bf:0x8000-Bf:0xFFFF) )
    ;;SEGMENTS (?CO?dect_step8(B1:))
    *** WARNING L16: UNCALLED FUNCTION, IGNORED FOR OVERLAY PROCESS NAME: _UART_OUTSTR/MAIN
    *** WARNING L16: UNCALLED FUNCTION, IGNORED FOR OVERLAY PROCESS NAME: _UART_OUTPTR/MAIN
    *** WARNING L16: UNCALLED FUNCTION, IGNORED FOR OVERLAY PROCESS NAME: _FUNC1/MAIN
    *** WARNING L16: UNCALLED FUNCTION, IGNORED FOR OVERLAY PROCESS NAME: _DELAY_UC/MAIN
    Program Size: data=158.1 xdata=47015 const=8 code=1872
    LX51 RUN COMPLETE. 4 WARNING(S), 0 ERROR(S)
    User command #2: C:\UserData\DECT_Handset\transmit\sample_project\BIN_SampleApp.bat
    C:\UserData\DECT_Handset\transmit\sample_project>OHX51 clk_freq HEXFILE(clk_freq.Hxx) H386 MERGE32K
    Extended 8051/251 Object to Hex File Converter V1.36b
    COPYRIGHT KEIL ELEKTRONIK GmbH 2000 - 2006
    GENERATING INTEL H386 FILE: clk_freq.Hxx
    C:\UserData\DECT_Handset\transmit\sample_project>hexbin2 clk_freq.hxx clk_freq.bin i 0000 7fff 2
    ***** HEX to BIN file converter V3.35B *****
    INTEL Extended Hex to Binary converter
    Convert complete
    "sample.LIB" - 0 Error(s), 0 Warning(s).

    and the contents of hex file are

    00000000 3A 30 30 30 30 30 30 30 31 46 46 0D 0A :00000001FF

  • *** WARNING L16: UNCALLED FUNCTION, IGNORED FOR OVERLAY PROCESS NAME: _UART_OUTSTR/MAIN

    If it is uncalled comment it out. If it is call indirectly declare it correctly

  • it is not a indirectly called function.............i commented it but still not able to generate bin file