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

Semihosting Error (L6915E)

Hi all!

I am looking to read from a file within Keil µVision (v5.22.0.0). To be more specific, I just have a function which loops through said file with fgetc( ) (it can actually just be reproduced with one call to fgetc( ) in the start of main( )). However, I am met with the following compiler error:

Error: L6915E: Library reports error: __use_no_semihosting_swi was requested, but a semihosting fgetc was linked in

I have read through this post as well as other similar posts with the same error, but I could not get much from there. I have also gone through these (this, that, and this) pages in the support guide, too. From those pages, I think I have a better understanding of what is going on and what needs to be done. Essentially, (please correct me if I'm wrong!) fgetc( ) is a semihosting function and it is contradicting with the __use_no_semihosting_swi macro being imported.

From the support guide pages referred above, it looks like I would need to retarget the call to fgetc( ) to my own implementation of it in Retarget.c. The problem is, I am not sure how to write my own implementation of fgetc( ) without using fgetc( ), or any of the other semihosting functions for that matter (fgets( )scanf( ), etc.).

Here are some other tidbits that may (or may not) be helpful:

  • The said file from the beginning is in the same directory where the code is to read that file.
  • The C compiler, as well as the assembler, linker and other parts, are on v5.06 update 4 (build 422)
  • The MDK-Lite version is 5.22

Any direction on this would be greatly appreciated!

Thank you,

- Dan 

Parents Reply Children
No data