I'm trying to show this in C (gcc, C11)
#define xstr(a) _str(a)
#define _str(a) #a
#pragma message "System clock = " xstr(SYS_CLOCK)
Now the SYS_CLOCK is a macro, computing from values of prescalers, dividers, etc
But the message is not calculated
#pragma message: System clock= ((8000000u/4)*50)/4
Which is better than nothing :) but actually, I'd be very happy if I can show 25000000 Hz.
Can be done with some preprocesor magic?
Thanks,