Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


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

armds no link with c lib cfg failed( __use_no_semihosting)

with assembly declear:

#ifdef STANDALONE
#define USE_SERIAL_PORT 1
asm(".global __use_no_semihosting");
#endif

to exclude any c clib being linked to output file

but i get the error info as follows:

Error: L6915E: Library reports error: __use_no_semihosting was requested, but _sys_command_string was referenced.

the question is, target is aarch64 cortex-a53,

no choice for me to link micro lib

what should I do?

  • Hi

    My name is Stephen and I work at Arm.

    The error message
    Error: L6915E: Library reports error: __use_no_semihosting was requested, but _sys_command_string was referenced.
    is saying you requested no semihosting functions may be linked-in from the C libraries, but _sys_command_string (which uses semihosting) was referenced.

    You will need to either add your own retargeted version of _sys_command_string into retarget.c, or remove the use of argv and argc to pass parameters to main().  See:

    developer.arm.com/.../-sys-command-string--

    Hope this helps

    Stephen

  • with the case you recommend,

    i add some folder to extend its func,

    and modified the makefile in the top folder,

    before:

    APP_C_SRC := $(wildcard $(SRC_DIR)/*.c) \
    APP_S_SRC := $(wildcard $(ASM_DIR)/*.S)
    OBJ_FILES := $(APP_C_SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) \
    $(APP_S_SRC:$(ASM_DIR)/%.S=$(OBJ_DIR)/%.o)
    DEP_FILES := $(OBJ_FILES:%=%.d)

    after:

    APP_C_SRC := $(wildcard $(SRC_DIR)/*.c) \

                           $(wildcard $(SRC_DIR)/dirx/*.c) 
    APP_S_SRC := $(wildcard $(ASM_DIR)/*.S)
    OBJ_FILES := $(APP_C_SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) \

                           $(APP_C_SRC:$(SRC_DIR)/dirx/%.c=$(OBJ_DIR)/%.o)
    $(APP_S_SRC:$(ASM_DIR)/%.S=$(OBJ_DIR)/%.o)
    DEP_FILES := $(OBJ_FILES:%=%.d)

    but it seemed to be not useful,

    the compile output is the same:

    12:25:54 **** Build of configuration Default for project startup_Armv8-Ax1_AC6_lab' ****
    make all
    mkdir obj
    Compiling src/GICv3_gicd.c...
    Compiling src/timer_interrupts.c...
    Compiling src/sp804_timer.c...
    Compiling src/main.c...
    Compiling src/GICv3_gicr.c...
    Compiling src/uart.c...
    Compiling src/retarget.c...
    Compiling asm/vectors.S...
    Compiling asm/v8_aarch64.S...
    Compiling asm/v8_utils.S...
    Compiling asm/startup.S...
    Linking startup_Armv8-Ax1_AC6.axf
    Done.

    12:25:56 Build Finished. 0 errors, 0 warnings. (took 2s.237ms)

    no new fiels related information anyway

  • with the case you recommend,

    i add some folder to extend its func,

    and modified the makefile in the top folder,

    before:

    APP_C_SRC := $(wildcard $(SRC_DIR)/*.c) \
    APP_S_SRC := $(wildcard $(ASM_DIR)/*.S)
    OBJ_FILES := $(APP_C_SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) \
    $(APP_S_SRC:$(ASM_DIR)/%.S=$(OBJ_DIR)/%.o)
    DEP_FILES := $(OBJ_FILES:%=%.d)

    after:

    APP_C_SRC := $(wildcard $(SRC_DIR)/*.c) \

                           $(wildcard $(SRC_DIR)/dirx/*.c) 
    APP_S_SRC := $(wildcard $(ASM_DIR)/*.S)
    OBJ_FILES := $(APP_C_SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) \

                           $(APP_C_SRC:$(SRC_DIR)/dirx/%.c=$(OBJ_DIR)/%.o)
    $(APP_S_SRC:$(ASM_DIR)/%.S=$(OBJ_DIR)/%.o)
    DEP_FILES := $(OBJ_FILES:%=%.d)

    but it seemed to be not useful,

    the compile output is the same:

    12:25:54 **** Build of configuration Default for project startup_Armv8-Ax1_AC6_lab' ****
    make all
    mkdir obj
    Compiling src/GICv3_gicd.c...
    Compiling src/timer_interrupts.c...
    Compiling src/sp804_timer.c...
    Compiling src/main.c...
    Compiling src/GICv3_gicr.c...
    Compiling src/uart.c...
    Compiling src/retarget.c...
    Compiling asm/vectors.S...
    Compiling asm/v8_aarch64.S...
    Compiling asm/v8_utils.S...
    Compiling asm/startup.S...
    Linking startup_Armv8-Ax1_AC6.axf
    Done.

    12:25:56 Build Finished. 0 errors, 0 warnings. (took 2s.237ms)

    no new fiels related information anyway

    is there anything i missed?

  • Hi again

    Try this instead.  Into both makefiles for startup_Armv8-Ax1_AC6 and startup_Cortex-A53x1_AC6 add:

    APP_C_SRC := $(wildcard $(SRC_DIR)/*.c)
    EXT_C_SRC := $(wildcard $(SRC_DIR)/dirx/*.c)
    APP_S_SRC := $(wildcard $(ASM_DIR)/*.S)
    OBJ_FILES := $(APP_C_SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) \
                 $(EXT_C_SRC:$(SRC_DIR)/dirx/%.c=$(OBJ_DIR)/%.o) \
                 $(APP_S_SRC:$(ASM_DIR)/%.S=$(OBJ_DIR)/%.o)
    DEP_FILES := $(OBJ_FILES:%=%.d)

    and later add a compilation rule for the new folder, for startup_Armv8-Ax1_AC6:

    $(OBJ_DIR)/%.o : $(SRC_DIR)/dirx/%.c | $(OBJ_DIR)
        $(PROGRESS)
        $(QUIET) $(CC) -c $(TARGET_ARCH) $(CPPFLAGS) $(CFLAGS) -o $@ $<

    and (slightly different) for startup_Cortex-A53x1_AC6:

    $(OBJ_DIR)/%.o : $(SRC_DIR)/dirx/%.c | $(OBJ_DIR)
        $(PROGRESS)
        $(QUIET) $(CC) -c $(TARGET_CPU) $(CPPFLAGS) $(CFLAGS) -o $@ $<

    Hope this helps

    Stephen