Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FDS breaks RTT

Hi there,

I'm using ARMGCC in combination with Make, nRF5 SDK, nRF SDK for Mesh, FreeRTOS and C++. Everything except one single thing is working. I've just implemented FDS without FreeRTOS in a separate repository and was in the proces of integrating it with the main repository that contains everything else; leds, audio, beacon scanning, mesh, etc.

Now, the RTT logging doesn't work anymore. I've literally got no idea why or how. I only changed FDS_ENABLED and NRF_FSTORAGE_ENABLED to 1 and included the neccesary files. The code isn't even called; only compiled...

SRC_FILES += \  
  $(SDK_ROOT)/components/libraries/fstorage/nrf_fstorage.c \
  $(SDK_ROOT)/components/libraries/fstorage/nrf_fstorage_sd.c \
  $(SDK_ROOT)/components/libraries/crc16/crc16.c \
  $(SDK_ROOT)/components/libraries/fds/fds.c \
  
INC_FOLDERS += \
  $(SDK_ROOT)/components/libraries/fstorage \
  $(SDK_ROOT)/components/libraries/crc16 \
  $(SDK_ROOT)/components/libraries/fds \

I've been trying for a good time now, but it just won't work. Has anyone faced this issue before? The second the sourcefiles and include folders aren't included in the makefile, the logging comes back up... Very strange...

Kind regards,

(confused) Jochem

Parents
  • Hi Jochem,

    There should not be any link between RTT logging and fstorage/FDS. However, both the logger module and fstorage rely on section variables, and that does not work well out of the box with C++, particularly with GCC. See this post. I suspect that perhaps the log backend is never registered properly by the linker.

    Can you check if the log backend (NRF_LOG_BACKEND_SECTION_NAME) is iterated over properly in components/libraries/log/src/nrf_log_frontend.c and compare to see the difference with and without FDS/fstorage, and that the data in the struct is correct?

    Einar

  • Hi Einar,

    I'm sorry to have wasted your time. Turns out, I made a very silly mistake with the JLinkRTTClient... I've added it as a target in the makefile so I can run 'make terminal' to have the output in VS code. However, I was using the wrong command to setup RTT communication.

    I used

     

    JLink -device NRF52 -speed 4000 -if SWD -AutoConnect 1

    while I should have used 

    JLink -device NRF52840_XXAA -speed 4000 -if SWD -AutoConnect 1

    I can't believe it actually worked all this time! I have probably been developing and using the terminal like this for nearly three months already. Oh well, it's at least working now. FDS was just the unlucky addition that overflowed the bucket...

    Anyway, thanks for your help and time.

    Kind regards,

    Jochem

Reply
  • Hi Einar,

    I'm sorry to have wasted your time. Turns out, I made a very silly mistake with the JLinkRTTClient... I've added it as a target in the makefile so I can run 'make terminal' to have the output in VS code. However, I was using the wrong command to setup RTT communication.

    I used

     

    JLink -device NRF52 -speed 4000 -if SWD -AutoConnect 1

    while I should have used 

    JLink -device NRF52840_XXAA -speed 4000 -if SWD -AutoConnect 1

    I can't believe it actually worked all this time! I have probably been developing and using the terminal like this for nearly three months already. Oh well, it's at least working now. FDS was just the unlucky addition that overflowed the bucket...

    Anyway, thanks for your help and time.

    Kind regards,

    Jochem

Children
No Data
Related