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

NRF52 DK RTT printf Problem

Hi,

I recently purchased the NRF52 DK. I'm using the ble_uart_example for the SDK 11. I'm using the softdevice PCA10040.

I noticed the the SDK 11 includes the RTT c and h files there, so I don't need to worry about using the tutorial.

I want to test out the SEGGER_rtt_printf, but when I compile and link the project, it gave me an error saying.

"._build\nrf52832_xxaa_s132.axf: Error: L6218E: Undefined symbol SEGGER_RTT_printf (referred from main.o)."

So I defined it as #define SEGGER_RTT_printf, it compiles but it gives me 3 warnings that about expressions that have no effect. That one couldn't print anything on jlink rtt.

I read the documentation for the sdk11, but it didn't give me much help. I currently have the nrf51dk kit and it didn't have this error. And it worked fine.

What am I missing here?

Thanks

Update:

image description

image description

Parents
  • The examples worked for me. Make sure the source files SEGGER_RTT.c and SEGGER_RTT_printf.c are added to your project. You also need to add SEGGER_RTT_Syscalls_KEIL.c (which I think is your problem). If you are using GCC or IAR use the corresponding syscalls file. Once all of these source files are added to your project it should work.

    If it still doesnt work download the latest segger software and documentation pack from here: www.segger.com/jlink-software.html and use these new files instead as they are more up to date and work for me.

    dont define anything. you shouldnt have to and this will rpboably break something. unless you define this (NRF_LOG_USES_RTT=1 ) which has been very useful for me and is a great new feature in the nordic sdk.

Reply
  • The examples worked for me. Make sure the source files SEGGER_RTT.c and SEGGER_RTT_printf.c are added to your project. You also need to add SEGGER_RTT_Syscalls_KEIL.c (which I think is your problem). If you are using GCC or IAR use the corresponding syscalls file. Once all of these source files are added to your project it should work.

    If it still doesnt work download the latest segger software and documentation pack from here: www.segger.com/jlink-software.html and use these new files instead as they are more up to date and work for me.

    dont define anything. you shouldnt have to and this will rpboably break something. unless you define this (NRF_LOG_USES_RTT=1 ) which has been very useful for me and is a great new feature in the nordic sdk.

Children
Related