Page 1 of 1

Right way to attach compiler library file(.a)in the oil file

Posted: Tue Apr 26, 2016 2:20 pm
by abhishek.iav
I need to add compiler library file in the conf.oil file.
This compiler library file is in the following path "C:\Freescale\PA_Support\ewl\lib\libc_E200z650_VLE_SPFP_Only.a"

I have added the path of this library in the library paths of eclipse and please see the atachment.

I tried different ways like

1. LDFLAGS = "-L ../Freescale/PA_Support/ewl/lib";

2. LDFLAGS = "-L C:/Freescale/PA_Support/ewl/lib"

3. LDFLAGS = "-L /Freescale/PA_Support/ewl/lib"

LIB = ENABLE { NAME = " libc_E200z650_VLE_SPFP_Only "; };

or

LIBS = "- l libc_E200z650_VLE_SPFP_Only";

it gives the following errors

### mwldeppc.exe Usage Error:

Errors caused tool to abort.
# Argument(s) expected
# while parsing option '-L'
make: *** [ppc.elf] Error 1

if i dont add that library i am getting these errors

mwldeppc.exe: undefined: 'InitializeUART'
mwldeppc.exe: Referenced from '__init_uart_console' in
mwldeppc.exe: libc_E200z650_VLE_SPFP_Only.a
mwldeppc.exe: undefined: 'ReadUARTN'
mwldeppc.exe: Referenced from '__read_console' in
mwldeppc.exe: libc_E200z650_VLE_SPFP_Only.a
mwldeppc.exe: undefined: 'WriteUARTN'
mwldeppc.exe: Referenced from '__write_console' in
mwldeppc.exe: libc_E200z650_VLE_SPFP_Only.a

mwldeppc.exe: undefined: '_ExitProcess'
mwldeppc.exe: Referenced from 'exit' in libc_E200z650_VLE_SPFP_Only.a
mwldeppc.exe: undefined: '_ExitProcess'
mwldeppc.exe: Referenced from 'abort' in libc_E200z650_VLE_SPFP_Only.a
mwldeppc.exe: alert: Link failed.
Errors caused tool to abort.
make: *** [ppc.elf] Error 1

This may be because my included Lwip files has printf which some how invoking this "InitializeUART"

Please if any one know some solution for this.

Thank you,
Abhi