I've upgraded RTT from 4.98e to 5.10g.
5.10g now also has _write_r in SEGGER_RTT_Syscalls_GCC.c.
Compiling for the Freescale K64F processor, I get the following warnings / errors that I fixed:
SEGGER_RTT_Syscalls_GCC.c:98:21: warning: 'struct _reent' declared inside parameter list [enabled by default]
int _write_r(struct _reent *r, int file, char *ptr, int len) {
To fix, I #include <reent.h>
Next was an error:
SEGGER_RTT_Syscalls_GCC.c:98:5: error: conflicting types for '_write_r'
int _write_r(struct _reent *r, int file, char *ptr, int len) {
To fix, I modified signature to this:
int _write_r(struct _reent *r, int file, const void *ptr, size_t len);
Everything compiles fine, and it runs - however, when I hit stop on my Jlink on occasion I get multiple terminal windows popping up on the RTT Viewer (around 12 of them) and see the All Terminal window flooding with the following message:
WARNING: Could not add output to terminal -1
I didn't have any compiler issues that I had to fix or errors like the above in 4.98e. I'm working around this by disabling use of RTT and using the serial I/O console for debugging. But wondering if I did something wrong?
Thanks,
-Raj
5.10g now also has _write_r in SEGGER_RTT_Syscalls_GCC.c.
Compiling for the Freescale K64F processor, I get the following warnings / errors that I fixed:
SEGGER_RTT_Syscalls_GCC.c:98:21: warning: 'struct _reent' declared inside parameter list [enabled by default]
int _write_r(struct _reent *r, int file, char *ptr, int len) {
To fix, I #include <reent.h>
Next was an error:
SEGGER_RTT_Syscalls_GCC.c:98:5: error: conflicting types for '_write_r'
int _write_r(struct _reent *r, int file, char *ptr, int len) {
To fix, I modified signature to this:
int _write_r(struct _reent *r, int file, const void *ptr, size_t len);
Everything compiles fine, and it runs - however, when I hit stop on my Jlink on occasion I get multiple terminal windows popping up on the RTT Viewer (around 12 of them) and see the All Terminal window flooding with the following message:
WARNING: Could not add output to terminal -1
I didn't have any compiler issues that I had to fix or errors like the above in 4.98e. I'm working around this by disabling use of RTT and using the serial I/O console for debugging. But wondering if I did something wrong?
Thanks,
-Raj