Using V5.10c Software for OS X with my J-Link first of all I'm missing the RTT files in the Samples folder (at least here it is stated it should be there).
I'm not sure where I got my RTT files from, but they are V210.
But the real problem is the bad quality of the printf-implementation. Running the printf-test I get the following output:
Display All
And that's it. All other format specifier's are never printed. So looking into the code I am not sure whats a fix for the bug, because the source code is very chaotic at least in my opinion. But the following line is definitly a bug (for example in _PrintUnsigned l.179):
NumDigits is unsigned and could be zero. So during the first iteration NumDigits = 4294967295...
Probably lines 148-153 are also problematic because Width is never ever used after these lines....
I don't want to waste more time debugging the printf-functions, because these are a advertised features so they should work.
Thanks in Advance
BTW, it would be nice to have these files hosted on a public git server, so you could add a submodule to your git-controlled own project and get upstream updates very easily. Really pleasant, that ARM did the same to CMSIS this year (github.com/ARM-software/CMSIS).
I'm not sure where I got my RTT files from, but they are V210.
But the real problem is the bad quality of the printf-implementation. Running the printf-test I get the following output:
Source Code
- SEGGER Real-Time-Terminal Sample
- ###### Testing SEGGER_printf() ######
- printf Test: %c, 'S' : S.
- printf Test: %5c, 'E' : E.
- printf Test: %-5c, 'G' : G.
- printf Test: %5.3c, 'G' : G.
- printf Test: %.3c, 'E' : E.
- printf Test: %c, 'R' : R.
- printf Test: %s, "RTT" : RTT.
- printf Test: %s, "RTT\r\nRocks." : RTT
- Rocks..
And that's it. All other format specifier's are never printed. So looking into the code I am not sure whats a fix for the bug, because the source code is very chaotic at least in my opinion. But the following line is definitly a bug (for example in _PrintUnsigned l.179):
NumDigits is unsigned and could be zero. So during the first iteration NumDigits = 4294967295...
Probably lines 148-153 are also problematic because Width is never ever used after these lines....
I don't want to waste more time debugging the printf-functions, because these are a advertised features so they should work.
Thanks in Advance
BTW, it would be nice to have these files hosted on a public git server, so you could add a submodule to your git-controlled own project and get upstream updates very easily. Really pleasant, that ARM did the same to CMSIS this year (github.com/ARM-software/CMSIS).