nrf9160 Linker error

Hi Jørgen,

I have an issue when trying to link the libmodem.a library in the nrfxlib/nrf_modem directory. I'm using the following version of MDK-ARM:
Tool Version Numbers:
Toolchain: MDK Essential 5.36 (Flex): 3 user(s) Version: 5.36.0.0
Toolchain Path: C:\Keil_v5\ARM\ARMCLANG\Bin
C Compiler: ArmClang.exe V6.16
Assembler: Armasm.exe V6.16
Linker/Locator: ArmLink.exe V6.16
Library Manager: ArmAr.exe V6.16
Hex Converter: FromElf.exe V6.16
CPU DLL: SARMV8M.DLL V5.36.0.0
Dialog DLL: TCM.DLL V1.53.0.0
Target DLL: UL2V8M.DLL V1.7.0.0
Dialog DLL: TCM.DLL V1.53.0.0

I've read articles related to this and there is an option that allows me to specify short enums and short whars (-fshort-enums -fshort-wchar). I've tried both configurations with it activated and deactivated. I get the same linker errors (L6242E). Have you recompiled the library for later versions of the MDK-ARM compiler to remove these linker errors? If not, can you tell me where the source code is and I can recompile?

Thanks,

Johnas

Parents
  • Hi,

     

    I've read articles related to this and there is an option that allows me to specify short enums and short whars (-fshort-enums -fshort-wchar). I've tried both configurations with it activated and deactivated.

    When changing the compiler options, you should always clean the project and recompile.

    Could you try this?

     

    And if it still fails, can you please share the full log?

     

    Kind regards,

    Håkon

  • Hi Håkon,

    So after trying various things, I got it to link with my current version. I needed to use short enums only (-fshort-enums). The tool has a checkbox that only allows you to use short enums and wchars combined or no option. I had to add the one option to the miscellaneous options field.

    I'm able to build with no errors using your library. I now have a new problem, but I don't think it's related to your library at this point. When I compile in the code that uses the library functions, I get an internal error from the Keil tool:

    linking...
    .\Objects\nRF9160_ns.axf: Internal fault: [0xb3b91b:6160001]
    .\Objects\nRF9160_ns.axf: Please contact your supplier.
    ".\Objects\nRF9160_ns.axf" - 2 Error(s), 0 Warning(s).
    Target not created.
    Build Time Elapsed: 00:00:10

    I'll contact Keil on this one, but please stay tuned. They might say that your library is indirectly contributing to this new error.

    Thanks,

    Johnas

Reply
  • Hi Håkon,

    So after trying various things, I got it to link with my current version. I needed to use short enums only (-fshort-enums). The tool has a checkbox that only allows you to use short enums and wchars combined or no option. I had to add the one option to the miscellaneous options field.

    I'm able to build with no errors using your library. I now have a new problem, but I don't think it's related to your library at this point. When I compile in the code that uses the library functions, I get an internal error from the Keil tool:

    linking...
    .\Objects\nRF9160_ns.axf: Internal fault: [0xb3b91b:6160001]
    .\Objects\nRF9160_ns.axf: Please contact your supplier.
    ".\Objects\nRF9160_ns.axf" - 2 Error(s), 0 Warning(s).
    Target not created.
    Build Time Elapsed: 00:00:10

    I'll contact Keil on this one, but please stay tuned. They might say that your library is indirectly contributing to this new error.

    Thanks,

    Johnas

Children
Related