This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How should I correctly compile origial "nRF_Segger_RTT"?

Hi all,

I followed the tutorial listed below: devzone.nordicsemi.com/.../

I want to use SEGGER_RTT_printf but I always get this error: Error: L6218E: Undefined symbol SEGGER_RTT_printf (referred from main.o).

image description

However, a senior enginneer at the office makes this happened:

image description

He does not want to teach me how to implement it.

I read the documentation for the sdk11, but it didn't figure me out of it. SEGGER_RTT_WriteString worked fine.

Can anyone teach me?

Thanks a lot.


image description

[Update above: with correct version of source codes of JLINK's segger_rtt] However, I still cannot compile RTT_Syscalls_KEIL.c

Parents
  • Hi,

    This error occurs when you have not added the paths for the .h files.

    You need to add the path for RTT as described in the tutorial

    image description

    image description

    This path is C:\Keil_v5\ARM\Pack\NordicSemiconductor\RTT

    Best regards,

    Øyvind

  • Dear Øyvind, hello, I got no error,but one warning,


    compiling nrf_assert.c... compiling nrf_log.c... compiling retarget.c... compiling RTT_Syscalls_KEIL.c... compiling SEGGER_RTT.c... compiling SEGGER_RTT_printf.c... ............\external\segger_rtt\SEGGER_RTT_printf.c(300): warning: #111-D: statement is unreachable default: goto FilterFieldWidth; break; ............\external\segger_rtt\SEGGER_RTT_printf.c: 1 warning, 0 errors compiling softdevice_handler.c... assembling arm_startup_nrf51.s... compiling system_nrf51.c... linking...


    Could it be the issue of the content of "retarget.c" ? However, this is using codes of JLINK's segger_rtt. thank you very much and best regards~

Reply
  • Dear Øyvind, hello, I got no error,but one warning,


    compiling nrf_assert.c... compiling nrf_log.c... compiling retarget.c... compiling RTT_Syscalls_KEIL.c... compiling SEGGER_RTT.c... compiling SEGGER_RTT_printf.c... ............\external\segger_rtt\SEGGER_RTT_printf.c(300): warning: #111-D: statement is unreachable default: goto FilterFieldWidth; break; ............\external\segger_rtt\SEGGER_RTT_printf.c: 1 warning, 0 errors compiling softdevice_handler.c... assembling arm_startup_nrf51.s... compiling system_nrf51.c... linking...


    Could it be the issue of the content of "retarget.c" ? However, this is using codes of JLINK's segger_rtt. thank you very much and best regards~

Children
No Data
Related