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

problem to use fopen with Flash FS library

Hello everybody,

I use a LP1768 (cortex-M3) and I would like to use an SD card. For this, i use the Flash FS library. But when i want to use the "fopen()" this fuction doesn't work. it return an error.

I have read the different posts on this forum and they speak about the "retarget file". But when i implement this file on my project, I have an error :
".\Obj\test.axf: Error: L6915E: Library reports error: __use_no_semihosting_swi was requested, but a semihosting fputc was linked in"
I do not understand exactly what is the problem, but I do not really understand the usefulness of this file.

Can you help me ?

thank you

Parents
  • The error is sort of telling you what went wrong...

    Semihosting is an I/O retargetting method whereby the I/O of functions can be re-directed to the UV4 debugging environment on your PC instead of local resources. Example is to use the pc file system (instead of your' flash card). A common use for this in Keil demos is to redirect stdio to the debuggers serial->debug window in UV4, eliminating the need for using a hardware serial port.

    The linker is telling you that you have called a semihosting function, while also specifying #pragma import(__use_no_semihosting_swi). in this case, fputc is calling a semihosting fn - recheck the retarget.c file against the samples again, maybe you are calling sendchar() from fputc() = sendchar from memory is a retargetting fn which ultimately calls ITM_SendChar(), unless you change it.

Reply
  • The error is sort of telling you what went wrong...

    Semihosting is an I/O retargetting method whereby the I/O of functions can be re-directed to the UV4 debugging environment on your PC instead of local resources. Example is to use the pc file system (instead of your' flash card). A common use for this in Keil demos is to redirect stdio to the debuggers serial->debug window in UV4, eliminating the need for using a hardware serial port.

    The linker is telling you that you have called a semihosting function, while also specifying #pragma import(__use_no_semihosting_swi). in this case, fputc is calling a semihosting fn - recheck the retarget.c file against the samples again, maybe you are calling sendchar() from fputc() = sendchar from memory is a retargetting fn which ultimately calls ITM_SendChar(), unless you change it.

Children