We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I use the SLOG function to do some printf in an ouptut file but how is it possible to do some scanf in another file (input file)?
What is the 'SLOG' function? Can you explain what your problem is a little more clearly? Stefan
In µVision2 Debug Commands SLOG is: "SLOG > path filename" "Creates the file filename as a log file. Input and output from the Serial window is written to this file. " This is very useful to 'simulate' the printf on simulator or evaluation board The problem is how to write some values in one file (simulate the printf) and read some value in another file(simulate the scanf) by example for dhrystone test.
Sorry, I don't know much about the debugger. Hopefully someone else will answer your question. Stefan
Note that it is the Simulator's Serial Window that simulates the serial IO - not the SLOG command. The SLOG command simly records ("logs") the activity in the Serial Window. You can simulate serial input by just typing in the Serial Window. To read from a file, you would have to write a uVision Debug Function - see the manual. Alternatively, the uVision Simulator can use the PC's COM: port(s) - so you could have another PC application sending the required data to the COM: port?
The problem is when using µvision with monitor and link to evaluation board by one serial port the "SLOG >> output file" works fine with the same serial line than the monitor but no way to do the same for an input file.