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 serial logging feature (SLOG) in the debugger of uVision (V5.24.2.0).
I want to switch on and off the serial logging, controlled by the running code. My intention was to use a user function each like:
FUNC void SLOGON (void) { SLOG > file.log } FUNC void SLOGOFF (void) { SLOG OFF }
And to trigger it with breakpoints like:
BS main.c\123, 1, "SLOGON()" BS main.c\234, 1, "SLOGOFF()"
The trigger stuff works fine, but defining such a function aborts with syntax error:
FUNC void SLOGON (void) { SLOG > file.log } __________________________^ *** error 10, line 1: Syntax error
What do I wrong or is it not pssible at all?
Thanks for help
this should work for you:
FUNC void SlogOn (void) { exec ("SLOG >C:\\Temp\\slog.log"); } FUNC void SlogOff (void) { exec ("SLOG OFF"); }