I have a problem with the project using Flash file system (RTL-ARM) on LPC2368 (no real time system). I believe the problem is somewhere with the retarget.c file.
Originally I used the retarget.c from http_demo. tcp/ip and dhcp worked fine. I implemented sd card directory read. I can read the flash disk and print the directory using printf.
Problems have started when I tried to read the file. As soon as I declared FILE *fin in my function, I've got an error "L6200E: Symbol __stdout multiply defined (by retarget.o and stdio.o)" when linking.
I replaced the file retarget.c by the file from the project Keil\ARM\RV30\RTL\Boards\Keil\MCB2300\SD_File. Now it compiles and links ok, but when I start debugging (using Ulink), after download it goes straight to the endless loop in _sys_exit in retarget.c. On reset/start it does the same.
Does anybody have a clue what is going on here ? I coudn't find any clear explanation on how to configure the retarget.c.
Gennady
Did you configure the heap size? Try with 4K bytes for a start. RV runtime libraries need a heap for file IO.
Thanks a lot - assigning a heap size fixed the debugging (_sys_exit loop) problem. But now I have another one - formatted print is missing. It seems that both file and printf use stdout. In the project 'SD_File' for the mcb2300 board both file and printf are used, but it doesn't run on my mcb2370, so I don't know if it works.
Any idea how to fix it?
Thank you again, Gennady
Thanks to Brayan (tech support) the problem is solved. Defining STDIO in options\C/C++ for retarget.c fixed it.