Channel sounding not enough memory to store step data (530 > 512)

Hi, 

I am currently working with the channel_sounding/connected_cs sample for nrf54l15 and I keep getting the error: Not enough memory to store step data (530 > 512). I tried increasing CONFIG_MAIN_STACK_SIZE but the same error still showed up. Do you have any advice on how to resolve this issue?

Parents
  • Hi,

    Is this the default (ie. completely unmodified) version of the sample? Are you using nrf54l15 DKs? What NCS version are you using?

    Regards,

    Elfving

  • Hi, 

    Yes, this is completely unmodified. I am using nrf54l15-dk with NCS version 3.0.0, thank you so much for your response.

  • I have tried to use the version with real time ranging, but every time I tried to compile it I get the error:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    error: 'RAS_FEAT_REALTIME_RD' undeclared (first use in this function)
    176 | if (!(ras_feature_bits & RAS_FEAT_REALTIME_RD))
    In function 'main':
    593 | const bool realtime_rd = ras_feature_bits & RAS_FEAT_REALTIME_RD;
    warning: implicit declaration of function 'bt_ras_rreq_realtime_rd_subscribe'; did you mean 'bt_ras_rreq_rd_ready_subscribe'? [-Wimplicit-function-declaration]
    596 | err = bt_ras_rreq_realtime_rd_subscribe(connection,
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | bt_ras_rreq_rd_ready_subscribe
    [29/360] Building C object zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/hci_core.c.obj
    ninja: build stopped: subcommand failed.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Even though I just cloned it from the github repository. I could not get it to compile and I have 3.0.1 which is the latest version. Am I supposed to add something extra into the config file?

  • It builds on my side.

    Make sure that you are using the right SDK and toolchain version. You would eg. need to use the entire to mainbranch SDK, not just the sample code. There has been changes in the API etc. after all. Download the entire SDK for the main branch, then make a new sample.

    Are you continuously seeing this issue when trying the sample in the previous version? Could you send me the logs that you are getting?

    Regards,

    Elfving

  • Hi, 

    I was able to build it after downloading all the zephyr dependencies, where as before I just cloned the repository from Github. What is the purpose of real-time ranging? I don't really see a difference between the two versions. Thanks in advance.

  • I see. Could you then provide me the logs you are getting with this error.

    Triscuit said:
    What is the purpose of real-time ranging?

    It could give faster and more accurate results. And as it reduces the number of GATT transactions needed to transfer the data between the devices, and therefore makes it possible to reduce the procedure interval. You should likely see less of the "Ranging data overwritten" issue.

    Regards,

    Elfving

  • Hi,

    Before I got it to work this was the error:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v3.0.1/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf54l15dk, qualifiers: nrf54l15/cpuapp
    Parsing c:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator/Kconfig.sysbuild
    Loaded configuration 'C:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator/build/_sysbuild/empty.conf'
    Merged configuration 'C:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator/build/_sysbuild/empty.conf'
    Configuration saved to 'C:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator/build/zephyr/.config'
    Kconfig header saved to 'C:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator/build/_sysbuild/autoconf.h'
    --
    ****************************************************
    * Running CMake for channel_sounding_ras_initiator *
    ****************************************************
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v3.0.1/zephyr/.cache
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Now when I got it to work it says:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    I: Distance estimates on antenna path 0: ifft: 0.585532, phase_slope: 1.027580, rtt: 1.500325
    I: Sleeping for a few seconds...
    E: Tried to parse empty step data.
    E: Tried to parse empty step data.
    E: Tried to parse empty step data.
    E: Tried to parse empty step data.
    I: Distance estimates on antenna path 0: ifft: 0.585532, phase_slope: 1.217534, rtt: 1.221137
    I: Sleeping for a few seconds...
    E: Tried to parse empty step data.
    E: Tried to parse empty step data.
    E: Tried to parse empty step data.
    I: Distance estimates on antenna path 0: ifft: 0.585532, phase_slope: 1.055818, rtt: 1.346389
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Is there a way to reduce the number of empty step data?

    Thank you.

Reply
  • Hi,

    Before I got it to work this was the error:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v3.0.1/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf54l15dk, qualifiers: nrf54l15/cpuapp
    Parsing c:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator/Kconfig.sysbuild
    Loaded configuration 'C:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator/build/_sysbuild/empty.conf'
    Merged configuration 'C:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator/build/_sysbuild/empty.conf'
    Configuration saved to 'C:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator/build/zephyr/.config'
    Kconfig header saved to 'C:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator/build/_sysbuild/autoconf.h'
    --
    ****************************************************
    * Running CMake for channel_sounding_ras_initiator *
    ****************************************************
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/sdk-nrf/samples/bluetooth/channel_sounding_ras_initiator
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v3.0.1/zephyr/.cache
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Now when I got it to work it says:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    I: Distance estimates on antenna path 0: ifft: 0.585532, phase_slope: 1.027580, rtt: 1.500325
    I: Sleeping for a few seconds...
    E: Tried to parse empty step data.
    E: Tried to parse empty step data.
    E: Tried to parse empty step data.
    E: Tried to parse empty step data.
    I: Distance estimates on antenna path 0: ifft: 0.585532, phase_slope: 1.217534, rtt: 1.221137
    I: Sleeping for a few seconds...
    E: Tried to parse empty step data.
    E: Tried to parse empty step data.
    E: Tried to parse empty step data.
    I: Distance estimates on antenna path 0: ifft: 0.585532, phase_slope: 1.055818, rtt: 1.346389
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Is there a way to reduce the number of empty step data?

    Thank you.

Children
  • Hmm I see, this should supposedly not happen in main. And I am just a bit surprised that I am not seeing any of this on my side. Could you do a quick check if you are seeing it with these hex files I've built here?

    merged_i.hexmerged_r.hex

    Regards,

    Elfving

  • Hi Elfving, I tried out the hex files you provided, it does not show the empty step data I was encountering earlier.

  • Hi

    Håkon is currently out of office, so I have been assigned this ticket in his place. Glad to hear the .hex file works for you, but that does point toward something being wrong with how you've added to the main nRF Connect SDK and toolchain to your environment. This should also work as expected with NCS v3.0.1, which should be easier to set up from within the VS Code nRF extension instead of needing any extra steps. Biggest thing is that you need to make sure the toolchain matches the SDK version used.

    Best regards,

    Simon