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

Failed to execute 'arm-none-eabi-ar' while making library

Hi, I'm newbiee to arm keil.

I need library to use at my arm project, so I try to make library using arm keil.

When I try to build, compile is ok, but ony running 'arm-none-eabi-ar' is failed.

Making source code as .o is ok menas that compiler path is correctly configured, and I checked rwx permission for my arm-none-eabi-ar , and figured out execution permission is ok.

When I execute arm-none-eabi-ar with locally, it is ok. But only when I try to trigger Arm keil, It failed.

Does anyone have clue on this problem ? 

I attached my build log 

Tool Versions:
Toolchain:       MDK-ARM Essential: 2 user(s)  Version: 5.27.1.0
Toolchain Path:  C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\bin
C Compiler:      GCC.exe
Assembler:       AS.exe
Linker/Locator:  LD.exe
Library Manager: AR.exe
Hex Converter:   OBJCOPY.exe
CPU DLL:         
Dialog DLL:      
Target DLL:      UL2V8M.DLL V1.5.15.0
Dialog DLL:      TCM.DLL V1.36.1.0
 
Project:
A:\ssp\ssp\src\libcbor\uvision\ssp_libcbor.uvprojx
Project File Date:  07/26/2023

Output:
Rebuild target 'Target 1'
compiling callbacks.c...
compiling bytestrings.c...
compiling allocators.c...
compiling arrays.c...
compiling floats_ctrls.c...
../src/cbor/floats_ctrls.c: In function 'cbor_float_get_float':
../src/cbor/floats_ctrls.c(59): warning: control reaches end of non-void function [-Wreturn-type]
compiling common.c...
compiling ints.c...
../src/cbor/ints.c: In function 'cbor_get_int':
../src/cbor/ints.c(52): warning: control reaches end of non-void function [-Wreturn-type]
compiling maps.c...
compiling serialization.c...
../src/cbor/serialization.c: In function 'cbor_serialize':
../src/cbor/serialization.c(41): warning: control reaches end of non-void function [-Wreturn-type]
../src/cbor/serialization.c: In function 'cbor_serialized_size':
../src/cbor/serialization.c(152): warning: control reaches end of non-void function [-Wreturn-type]
../src/cbor/serialization.c: In function 'cbor_serialize_uint':
../src/cbor/serialization.c(188): warning: control reaches end of non-void function [-Wreturn-type]
../src/cbor/serialization.c: In function 'cbor_serialize_negint':
../src/cbor/serialization.c(204): warning: control reaches end of non-void function [-Wreturn-type]
../src/cbor/serialization.c: In function 'cbor_serialize_float_ctrl':
../src/cbor/serialization.c(368): warning: control reaches end of non-void function [-Wreturn-type]
compiling encoding.c...
compiling cbor.c...
../src/cbor.c(12): warning: ignoring '#pragma clang diagnostic' [-Wunknown-pragmas]
../src/cbor.c: In function 'cbor_copy':
../src/cbor.c(287): warning: control reaches end of non-void function [-Wreturn-type]
../src/cbor.c: In function '_cbor_copy_float_ctrl':
../src/cbor.c(152): warning: control reaches end of non-void function [-Wreturn-type]
../src/cbor.c: In function '_cbor_copy_int':
../src/cbor.c(137): warning: 'res' may be used uninitialized in this function [-Wmaybe-uninitialized]
compiling streaming.c...
compiling strings.c...
compiling tags.c...
compiling loaders.c...
compiling memory_utils.c...
compiling stack.c...
compiling builder_callbacks.c...
compiling unicode.c...
compiling encoders.c...
creating Library...
--- Error: failed to execute 'arm-none-eabi-ar'
"libssp_libcbor.a" - 1 Error(s), 11 Warning(s).

Software Packages used:

Package Vendor: ARM
                www.keil.com/.../ARM.CMSIS.5.5.1.pack
                ARM.CMSIS.5.5.1
                CMSIS (Cortex Microcontroller Software Interface Standard)

Collection of Component include folders:
  .\RTE\_Target_1
  C:\Users\mjbean.kim\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM35P\Include

Collection of Component Files used:
Target not created.
Build Time Elapsed:  00:00:08
  • Hello Minjeong Kim!

    I tried this and it works for me. 

    Rebuild target 'Target 1'
    compiling test.c...
    creating Library...
    C:\test>"C:\Keil\ARM\gcc-arm-none-eabi-10.3-2021.10\bin\arm-none-eabi-ar" -M 0<ArInp.Scr
    "libtest.a" - 0 Error(s), 0 Warning(s).
    Build Time Elapsed: 00:00:00

    So not sure what the problem with your machine is. Could you please try also with the current MDK 5.38a version to see if this makes a difference?

    If the problem remains, can you please also try setting up such a very basic test project to see if that makes a difference?