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

NRF_LOG() / CLI problem - NRF_CLI_CMD_BUFF_SIZE is undefined

Hi All,

I am working on  ISP1507 which is based on NRF52832. My IDE is Keil V5.26.2.0.  I have had the following problem in the UART example (pca10040e) from SDK 15.0.0. I am fairly new working with all these. 

I was trying to amend the UART example according to my needs. However at some point, the application started to reset continuously due an error that I could not have defined. After some research I have found that I have to check the error log written to SEGGER RTT by NRF_LOG (please correct me if I am wrong). I have then tried to get the NRF_LOG working according to the instructions I have found here. However I have stuck.

I have included the necessary ".h" files and their paths. I have also added the ".c" files under "nRF_Libraries" (under "Groups" in "Manage Project Items"). The files I have added, includes some other files which were not initially found by the compiler however, I have gradually added every single missing file. However in the last file I have added, nfc_cli.h, there is a missing MACRO, NRF_CLI_CMD_BUFF_SIZE, and I could not have overcome this one. Where is it defined? What else should I include?

Thanks,

D

Parents Reply Children
  • Thank you very much Jakub. I will go through your project to see what I am doing wrong and share it. 

    Regards

    D

  • Thank you very much for all your efforts. However, unfortunately I have not been able get it work. I open the uart_pca10040.uvprojx and try to compile it, I get 29 errors, it cannot find some of the files. I check the Folder Setup to make sure of the paths. I have confirmed a number of them, I have even reselected some of them but I still get error for them. 

    Please see the project section in the left. I think there is problem with arm_startup_nr52.s and system_nrf32.c  under Device. 

    Am I missing a setting or something?

    *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'E:\Keil_v5\ARM\ARMCC\Bin'
    Build target 'nrf52832_xxaa'
    compiling nrfx_prs.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\modules\nrfx\drivers\src\prs\nrfx_prs.c": No such file or directory
    ..\..\..\..\..\..\modules\nrfx\drivers\src\prs\nrfx_prs.c: 0 warnings, 1 error
    compiling app_error.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\util\app_error.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\util\app_error.c: 0 warnings, 1 error
    compiling nrfx_uart.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\modules\nrfx\drivers\src\nrfx_uart.c": No such file or directory
    ..\..\..\..\..\..\modules\nrfx\drivers\src\nrfx_uart.c: 0 warnings, 1 error
    compiling nrf_drv_uart.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\integration\nrfx\legacy\nrf_drv_uart.c": No such file or directory
    ..\..\..\..\..\..\integration\nrfx\legacy\nrf_drv_uart.c: 0 warnings, 1 error
    compiling nrfx_uarte.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\modules\nrfx\drivers\src\nrfx_uarte.c": No such file or directory
    ..\..\..\..\..\..\modules\nrfx\drivers\src\nrfx_uarte.c: 0 warnings, 1 error
    compiling main.c...
    ..\..\..\main.c(53): error: #5: cannot open source input file "app_uart.h": No such file or directory
    #include "app_uart.h"
    ..\..\..\main.c: 0 warnings, 1 error
    compiling boards.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\boards\boards.c": No such file or directory
    ..\..\..\..\..\..\components\boards\boards.c: 0 warnings, 1 error
    compiling app_error_handler_keil.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\util\app_error_handler_keil.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\util\app_error_handler_keil.c: 0 warnings, 1 error
    compiling app_uart_fifo.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\uart\app_uart_fifo.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\uart\app_uart_fifo.c: 0 warnings, 1 error
    compiling app_util_platform.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\util\app_util_platform.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\util\app_util_platform.c: 0 warnings, 1 error
    compiling nrf_assert.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\util\nrf_assert.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\util\nrf_assert.c: 0 warnings, 1 error
    compiling app_error_weak.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\util\app_error_weak.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\util\app_error_weak.c: 0 warnings, 1 error
    compiling app_fifo.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\fifo\app_fifo.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\fifo\app_fifo.c: 0 warnings, 1 error
    compiling nrf_atomic.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\atomic\nrf_atomic.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\atomic\nrf_atomic.c: 0 warnings, 1 error
    compiling nrf_balloc.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\balloc\nrf_balloc.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\balloc\nrf_balloc.c: 0 warnings, 1 error
    compiling nrf_fprintf_format.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\external\fprintf\nrf_fprintf_format.c": No such file or directory
    ..\..\..\..\..\..\external\fprintf\nrf_fprintf_format.c: 0 warnings, 1 error
    compiling nrf_ringbuf.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\ringbuf\nrf_ringbuf.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\ringbuf\nrf_ringbuf.c: 0 warnings, 1 error
    compiling nrf_strerror.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\strerror\nrf_strerror.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\strerror\nrf_strerror.c: 0 warnings, 1 error
    compiling nrf_memobj.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\memobj\nrf_memobj.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\memobj\nrf_memobj.c: 0 warnings, 1 error
    compiling nrf_fprintf.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\external\fprintf\nrf_fprintf.c": No such file or directory
    ..\..\..\..\..\..\external\fprintf\nrf_fprintf.c: 0 warnings, 1 error
    compiling nrf_log_backend_rtt.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\log\src\nrf_log_backend_rtt.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\log\src\nrf_log_backend_rtt.c: 0 warnings, 1 error
    compiling retarget.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\uart\retarget.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\uart\retarget.c: 0 warnings, 1 error
    compiling nrf_log_default_backends.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\log\src\nrf_log_default_backends.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\log\src\nrf_log_default_backends.c: 0 warnings, 1 error
    compiling nrf_log_backend_serial.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\log\src\nrf_log_backend_serial.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\log\src\nrf_log_backend_serial.c: 0 warnings, 1 error
    compiling nrf_log_str_formatter.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\log\src\nrf_log_str_formatter.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\log\src\nrf_log_str_formatter.c: 0 warnings, 1 error
    compiling SEGGER_RTT.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\external\segger_rtt\SEGGER_RTT.c": No such file or directory
    ..\..\..\..\..\..\external\segger_rtt\SEGGER_RTT.c: 0 warnings, 1 error
    compiling nrf_log_frontend.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\components\libraries\log\src\nrf_log_frontend.c": No such file or directory
    ..\..\..\..\..\..\components\libraries\log\src\nrf_log_frontend.c: 0 warnings, 1 error
    compiling SEGGER_RTT_Syscalls_KEIL.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\external\segger_rtt\SEGGER_RTT_Syscalls_KEIL.c": No such file or directory
    ..\..\..\..\..\..\external\segger_rtt\SEGGER_RTT_Syscalls_KEIL.c: 0 warnings, 1 error
    compiling SEGGER_RTT_printf.c...
    "no source": Error: #5: cannot open source input file "..\..\..\..\..\..\external\segger_rtt\SEGGER_RTT_printf.c": No such file or directory
    ..\..\..\..\..\..\external\segger_rtt\SEGGER_RTT_printf.c: 0 warnings, 1 error
    assembling arm_startup_nrf52.s...
    compiling system_nrf52.c...
    ".\_build\nrf52832_xxaa.axf" - 29 Error(s), 0 Warning(s).
    Target not created.
    Build Time Elapsed: 00:00:02

  • Hi Denin,

    I apologize, please find attached corrected zip. It shall work fine now on SDK15.2.8524.uart.7z

  • Hi Jakup,

    I appreciate all your efforts and help. However it seems that it still has some missing files. I will work on ble_app_uart and that one has the correct settings for RTT. It works fine. So don't worry.

    Thank you very much for everything. 

    Denin

Related