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
1. In project options->target, make sure 'use MicroLib' is *not* checked (FlashFS is not compatible with MicroLib)
2. In retarget.c options->C/C++ tab, define box, add STDIO
3. Check sample project retarget.c for required changes (if any)
4. FlashFS requires heap space to be defined, if I recall, 0x400 was what I used
- this from memory of past project, ymmv but it is a starting point,
Phil.
thanks for your answer
for the different point:
1) Yes I know and i don't have checked this box :) 2) Same 3) I have copied this file on a example of Keil. I supose that is just! 4) I don't have read this on the different documentation http://www.keil.com/product/brochures/rl-arm_gs.pdf. But I'll keep looking.
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.
But since I could not find the solution, I all over again. And I do not know why, I have even more errors. But what I do not understand is that if I contains the sample project and I change the Main file (with my code) everything works fine. But if I create a new project with the same file include (retarget.c, FS_CM3.lib, file_Config.c, ...) it does not work!
I must be an error in making a new project but I do not know what.
Thank you for your help anyway.
create the basic new project with the problem, zip and send it to ao7wxa598d2eqve@jetable.org see if I can see problem
(email address is temporary only so i dont live with spam forever)
- Phil
Thank you very much but now I have succeeded. I do not know how I could be wrong. I still again and now everything is good! I just still a problem with the UART but that's another story ^^,