Can't use RTT with CMake project
I tried to use cmake with CubeMx but I cant make RTT works.
Error:
multiple definition of `_write_r'; /usr/lib/gcc/arm-none-eabi/13.2.0/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libc_nano.a(libc_a-writer.o):/build/arm-none-eabi-newlib/src/build-nano/arm-none-eabi/thumb/v7-m/nofp/newlib/../../../../../../newlib-4.3.0.20230120/newlib/libc/reent/writer.c:45: first defined here
RTT needs to define _write_r but seems already define.
If I comment this line from the gcc tool chain it solves the problem:
set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -Wl,--start-group -lc -lm -Wl,--end-group")
Before I used my custom cmake this way:
```
target_link_options(${EXECUTABLE} PRIVATE
-T${MCU_LINKER_SCRIPT}
${CPU_PARAMETERS}
-Wl,-Map=${CMAKE_PROJECT_NAME}.map
--specs=nosys.specs
-Wl,--start-group
-lc
-lm
-lstdc++
-Wl,--end-group
-Wl,--print-memory-usage)
```
and have no problem so I don't really understand why.
Also tried -fcommon it does nothing.
