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

using c time functions with RTX

Just trying to use c function time(), have included time.h, project compiles ok, but the linker reports the following error.

Error: L6915E: Library reports error: __use_no_semihosting_swi was requested, but time was referenced

Have not used time functions with RTX before, is this a re-target issue? Quick search of forum shows similar error linked to file access.

regards
Darren

  • Hi,
    you should have on project files the Retarget.c .
    This source file redirect the stdio functions to a specific pheriperal like uart.

    In this file you must add the following row:

    #pragma import(__use_no_semihosting_swi)

    About RTX you shoul use the RTX specific time api and not the std C functions of time.h

    A good idea coud be to gain knowledge about semihosting, and RTX.

    Regards
    Maurizio