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

Thingy:52 SDK v2.1.0 No logs with JLink v6.22g

Hello,

I have inherited a Thingy:52 project which was using some old versions of SDKs. Now I am trying to port it to a newer version in order to make it compatible with Bluetooth mesh.

In the current version I am using JLink v6.22g to see debug messages, but I just downloaded the Thingy:52 SDK v2.1.0, bare bones, no changes. I installed the software on the Thingy:52 successfully using this script

make -C "$(dirname "$0")/armgcc" clean &&
make -j -C "$(dirname "$0")/armgcc" &&
nrfjprog --eraseall
nrfjprog -f NRF52 --program "$(dirname "$0")/../../external/sdk13/components/softdevice/s132/hex/s132_nrf52_4.0.2_softdevice.hex" &&
nrfjprog -f NRF52 --program "$(dirname "$0")/armgcc/_build/nrf52832_xxaa_s132.hex" &&
nrfjprog --reset

This seems to work correctly, I have checked the memory layout after running it, it works on the older version and the LED-behaviour is correct.

But whatever logs I put in my code, it just prints nothing in the RTT.

As I said I am running Thingy:52 SDK v2.1.0 and JLink v6.22g (from recommendation by a Nordic Semiconductor engineer a while back). But maybe this version doesn't work with this SDK?

Parents Reply Children
  • Ahh yes I had forgot to enable it actually. I added a #define NRF_LOG_ENABLED 1 to the start of my main.c file for now.

    Now I have this strange error which is not necessarily relevant to Nordic, but this is part of my output

    ...
    Linking target: nrf52832_xxaa_s132.out
    _build/main.o: In function `m_batt_meas_handler':
    /home/robban/sommarjobb/hubben/nrf5_sdk_for_mesh/external/thingysdkv210/project/pca20020_s132/thingy.c:149: undefined reference to `nrf_log_frontend_std_3'
    ...

    However I did add nrf_log_frontend.c to the source files in my Makefile, and libraries/log to include paths.

    ...
    $(abspath ../../../sdk_components/libraries/log/src/nrf_log_frontend.c) \
    ...
    INC_PATHS += -I$(abspath ../../../sdk_components/libraries/log)
    INC_PATHS += -I$(abspath ../../../sdk_components/libraries/log/src)
    ...

    No clue what's happening here.

  • Apparently I shouldn't have defined the NRF_LOG_ENABLED in the main.c file, but actually in the config file, not sure what went wrong because of it, but something did :) And I didn't need to add to the makefile either.

Related