This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Compiling nRF24LU1P project in Keil

Hi,

Trying to compile one of the examples provided in the nRFgo SDK 2.3.0.10040 I get an error in the linker (error L204) Invalid Keyword. It seems to refer to REMOVEUNUSED. In the help provided with the SDK I found the following.

Limitations
In addition to having an object code size limitation of 4 kbytes, the extended evaluation license does not support the Extended Linker and Assembler (LX51 and AX51). These must be disabled:
Go to Options for Target ' '
Un-check the boxes under Device Some projects use the linker keyword REMOVEUNUSED. This is not supported by the license and must be removed. You will get warnings about uncalled functions in the library. These warnings can be ignored.

I did the step of removing flags of the Extended Linker and Assembler but I'm still not able to compile the program and get the hex file.

Thanks.

  • Hi,

     

    What is the error message you are seeing after removing "REMOVEUNUSED" keyword? Is it still L204? If so, is there anything in the linker options (misc control) still present, like a whitespace or similar?

     

    Kind regards,

    Håkon

  • Hi Håkon, sorry, I didn't explain well. I removed the flags but I can't figure out how to remove the REMOVEUNUSED keyword.

    This is the output:

    Rebuild started: Project: reuse_bootloader
    Rebuild target 'reuse_bootloader_lu1p'
    compiling main.c...
    compiling bootloader32_k.c...
    linking...
    LX51 LINKER/LOCATER V4.66.97.0 - SN: redacted
    COPYRIGHT ARM Germany GmbH 1995 - 2019
    @.\build\REUSE_~1.LNP ".\build\main.obj",
    ".\build\bootloader32_k.obj"
    TO ".\build\reuse_bootloader"
    PRINT(".\lst\reuse_bootloader.map") DISABLEWARNING (15, 16)
    SEGMENTS ( ?CO?BOOTLOADER32_K(C:0x7800) )
    *** WARNING L52: EVAL VERSION USED BEFORE, REBUILD ALL *.OBJ FILES
        MODULE:  .\build\main.obj (MAIN)
    *** ERROR L121: IMPROPER FIXUP
        MODULE:  .\build\main.obj (MAIN)
        SEGMENT: ?PR?MAIN?MAIN
        OFFSET:  000016H
    ******************************************************************************
    * RESTRICTED VERSION WITH 1000H BYTE CODE SIZE LIMIT; USED: 07DCH BYTE (49%) *
    ******************************************************************************
    Program Size: data=9.0 xdata=0 const=1965 code=47
    *** WARNING L52: EVAL VERSION USED BEFORE, REBUILD ALL *.OBJ FILES
        MODULE:  .\build\main.obj (MAIN)
    *** ERROR L121: IMPROPER FIXUP
        MODULE:  .\build\main.obj (MAIN)
        SEGMENT: ?PR?MAIN?MAIN
        OFFSET:  000016H
    *** ERROR L257: UNKNOWN
    Target not created.
    Build Time Elapsed:  00:00:02

  • Hi,

     

    Alessio said:
    *** WARNING L52: EVAL VERSION USED BEFORE, REBUILD ALL *.OBJ FILES

    Could you clean the project, and build again? 

     

    Alessio said:
    I removed the flags but I can't figure out how to remove the REMOVEUNUSED keyword.

     In this tab, under misc controls, it should be listed (if present):

    Please disregard the circled objects, its the first screengrab that I found.

     

    Under the "device" tab, you can also de-select the usage of "LX51 linker", thus use the basic linker BL51.

     

    Kind regards,

    Håkon

  • Thanks, cleaning the project and removing the keyword was fine.

    Now it compiles, but is there any reason about the fact that the compiled hex file is different from the one already compiled provided with the SDK? Is this related by the fact that keil wasn't able to find libraries such as stdint.h and so I copied them in the same directory of projects source file?

  • Hi,

     

    Alessio said:
    Now it compiles, but is there any reason about the fact that the compiled hex file is different from the one already compiled provided with the SDK?

    This is normal. A small difference will generate a completely different .hex file. Just going from version X.Y.Z to vX.Y.ZZ will most probably generate a different hex file.

     

    Kind regards,

    Håkon

Related