Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Getting a stack overflow error when initialising RNG modul in FreeRTOS application

Hi DevZone,'

I am trying to use the crypto library with CC310 backend on a FreeRTOS application using the nRF52840DK.

My problem seems to be that when initializing the RNG module with a call to nrf_crypto_rng_init, the first thing it does is to call nrf_stack_info_overflowed which will always return an error in my application because of the way the fuction makes the check.

Even when not enabling any crypto related configurations in sdk_config.h a call to nrf_stack_info_overflowed returns true. 

My application is configured with reserved RAM and utilizies Softdevice s140 which dictates a placement of the application on the flash that to my understanding causes the misalignement that is misinterpreted as a stack overflow by nrf_stack_info_overflowed.

The error:

Value of NRF_STACK_INFO_GET_SP() = 0x20004160

Value of NRF_STACK_INFO_BASE = 0x2003e000

I have tried using the no-interrupts version of the libnrf_cc310_0.9.12.a as sugested Here. Its doesn't seem to be related to my issue.

My question is then:

  • Do i need to make an adjustment of the placement of the application segments in flash that can satisfy all my needs? is that possible?
  • Or do I have to look into other ways of acieving the crypto functionality that I am looking for like utilizing the nrf_cc310 and ARM TrustZone CryptoCell APIs.

Possibly helpfull information:

I am using: nRF5 SDK 17.1.0, SEGGER Embedded Studio for ARM V6.22a, FreeRTOS v10.

 

Content of the projects .emProject:

<!DOCTYPE CrossStudio_Project_File>
<solution Name="Wearable" target="8" version="2">
  <project Name="Wearable">
    <configuration
      Name="Common"
      arm_architecture="v7EM"
      arm_core_type="Cortex-M4"
      arm_endian="Little"
      arm_fp_abi="Hard"
      arm_fpu_type="FPv4-SP-D16"
      arm_linker_heap_size="8192"
      arm_linker_process_stack_size="0"
      arm_linker_stack_size="8192"
      arm_linker_treat_warnings_as_errors="No"
      arm_simulator_memory_simulation_parameter="RWX 00000000,00100000,FFFFFFFF;RWX 20000000,00010000,CDCDCDCD"
      arm_target_device_name="nRF52840_xxAA"
      arm_target_interface_type="SWD"
      c_preprocessor_definitions="BOARD_PCA10056;CONFIG_GPIO_AS_PINRESET;FLOAT_ABI_HARD;FREERTOS;INITIALIZE_USER_SECTIONS;NO_VTOR_CONFIG;NRF52840_XXAA;DEBUG_MODE;NRF_SD_BLE_API_VERSION=7;S140;SOFTDEVICE_PRESENT;SWI_DISABLE0;"
      c_user_include_directories="$(SDK)/components/libraries/fstorage/;$(SDK)/components/libraries/experimental_section_vars;$(SDK)/components/softdevice/common;$(SDK)/components/softdevice/s140/headers;$(SDK)/components/softdevice/s140/headers/nrf52;$(SDK)/modules/nrfx/drivers/src/prs;$(SDK)/components/libraries/sdcard;$(SDK)/components/libraries/block_dev/sdc;$(SDK)/components/libraries/block_dev;$(SDK)/modules/nrfx/drivers/include;$(SDK)/integration/nrfx/legacy;$(ProjectDir)/Source/Include;$(ProjectDir)/Source/Include/Trace;$(ProjectDir)/Source/Include/USB;$(ProjectDir)/Source;$(ProjectDir)/Source/Configuration/FreeRTOS;$(ProjectDir)/Source/Configuration/nRFSDK;$(ProjectDir)/Configuration;$(SDK)/components;$(SDK)/components/boards;$(SDK)/components/libraries/atomic;$(SDK)/components/libraries/balloc;$(SDK)/components/libraries/bsp;$(SDK)/components/libraries/button;$(SDK)/components/libraries/experimental_section_vars;$(SDK)/components/libraries/log;$(SDK)/components/libraries/log/src;$(SDK)/components/libraries/memobj;$(SDK)/components/libraries/ringbuf;$(SDK)/components/libraries/strerror;$(SDK)/components/libraries/timer;$(SDK)/components/libraries/util;$(SDK)/components/toolchain/cmsis/include;$(SDK)/external/fprintf;$(SDK)/external/freertos/config;$(SDK)/external/freertos/portable/CMSIS/nrf52;$(SDK)/external/freertos/portable/GCC/nrf52;$(SDK)/external/freertos/source/include;$(SDK)/integration/nrfx;$(SDK)/integration/nrfx/legacy;$(SDK)/modules/nrfx;$(SDK)/modules/nrfx/drivers/include;$(SDK)/modules/nrfx/hal;$(SDK)/modules/nrfx/mdk;$(SDK)/components/libraries/delay;$(SDK)/components/libraries/uart;$(SDK)/components/libraries/fifo;$(SDK)\\components\\libraries\\usbd;$(SDK)\\components\\libraries\\usbd\\class\\msc;$(SDK)\\components\\libraries\\block_dev\\sdc;$(SDK)\\components\\libraries\\atomic_fifo;$(SDK)\\external\\utf_converter;$(SDK)\\components\\libraries\\sdcard;$(SDK)\\external\\protothreads;$(SDK)\\external\\protothreads\\pt-1.4;$(SDK)/components/libraries/crypto;$(SDK)/components/libraries/crypto/backend/cc310;$(SDK)/components/libraries/crypto/backend/cc310_bl;$(SDK)/components/libraries/crypto/backend/cifra;$(SDK)/components/libraries/crypto/backend/mbedtls;$(SDK)/components/libraries/crypto/backend/micro_ecc;$(SDK)/components/libraries/crypto/backend/nrf_hw;$(SDK)/components/libraries/crypto/backend/nrf_sw;$(SDK)/components/libraries/crypto/backend/oberon;$(SDK)/components/libraries/crypto/backend/optiga;$(SDK)/external/nrf_tls/mbedtls/nrf_crypto/config;$(SDK)/external/cifra_AES128-EAX;$(SDK)/external/fprintf;$(SDK)/external/mbedtls/include;$(SDK)/external/micro-ecc/micro-ecc;$(SDK)/external/nrf_cc310/include;$(SDK)/external/nrf_oberon;$(SDK)/external/nrf_oberon/include;$(SDK)/external/segger_rtt;$(SDK)/components/libraries/stack_info;$(SDK)/components/libraries/mutex;"
      debug_register_definition_file="$(SDK)/modules/nrfx/mdk/nrf52840.svd"
      debug_start_from_entry_point_symbol="No"
      debug_target_connection="J-Link"
      gcc_debugging_level="Level 3"
      gcc_entry_point="Reset_Handler"
      linker_output_format="hex"
      linker_printf_fmt_level="long"
      linker_printf_width_precision_supported="Yes"
      linker_scanf_fmt_level="long"
      linker_section_placement_file="flash_placement.xml"
      linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x27000;FLASH_SIZE=0xd9000;RAM_START=0x20002ae8;RAM_SIZE=0x3d518"
      linker_section_placements_segments="FLASH1 RX 0x0 0x100000;RAM1 RWX 0x20000000 0x40000"
      macros="SDK=C:/SDK/nRF5_SDK_17.1.0_ddde560;CMSIS_CONFIG_TOOL=C:/SDK/nRF5_SDK_17.1.0_ddde560/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar;InputPath=C:/SDK/nRF5_SDK_17.1.0_ddde560/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar;"
      project_directory=""
      project_type="Executable" />
    <folder Name="Segger Startup Files">
      <file file_name="$(StudioDir)/source/thumb_crt0.s" />
    </folder>
    <folder Name="nRF_Log">
      <file file_name="$(SDK)/components/libraries/log/src/nrf_log_frontend.c" />
      <file file_name="$(SDK)/components/libraries/log/src/nrf_log_str_formatter.c" />
      <file file_name="$(SDK)/components/libraries/log/src/nrf_log_default_backends.c" />
      <file file_name="$(SDK)/components/libraries/log/src/nrf_log_backend_uart.c" />
      <file file_name="$(SDK)/components/libraries/log/src/nrf_log_backend_rtt.c" />
      <file file_name="$(SDK)/components/libraries/log/src/nrf_log_backend_flash.c" />
      <file file_name="$(SDK)/components/libraries/log/src/nrf_log_backend_serial.c" />
    </folder>
    <folder Name="Board Definition">
      <file file_name="$(SDK)/components/boards/boards.c" />
    </folder>
    <folder Name="Third Parties">
      <file file_name="$(SDK)/external/freertos/source/croutine.c" />
      <file file_name="$(SDK)/external/freertos/source/event_groups.c" />
      <file file_name="$(SDK)/external/freertos/source/list.c" />
      <file file_name="$(SDK)/external/freertos/portable/GCC/nrf52/port.c" />
      <file file_name="$(SDK)/external/freertos/portable/CMSIS/nrf52/port_cmsis.c" />
      <file file_name="$(SDK)/external/freertos/portable/CMSIS/nrf52/port_cmsis_systick.c" />
      <file file_name="$(SDK)/external/freertos/source/queue.c" />
      <file file_name="$(SDK)/external/freertos/source/stream_buffer.c" />
      <file file_name="$(SDK)/external/freertos/source/tasks.c" />
      <file file_name="$(SDK)/external/freertos/source/timers.c" />
      <file file_name="$(SDK)/external/freertos/source/portable/MemMang/heap_4.c" />
    </folder>
    <folder Name="nRF_Libraries">
      <file file_name="$(SDK)/components/libraries/button/app_button.c" />
      <file file_name="$(SDK)/components/libraries/util/app_error.c" />
      <file file_name="$(SDK)/components/libraries/util/app_error_handler_gcc.c" />
      <file file_name="$(SDK)/components/libraries/util/app_error_weak.c" />
      <file file_name="$(SDK)/components/libraries/timer/app_timer_freertos.c" />
      <file file_name="$(SDK)/components/libraries/util/app_util_platform.c" />
      <file file_name="$(SDK)/components/libraries/util/nrf_assert.c" />
      <file file_name="$(SDK)/components/libraries/atomic/nrf_atomic.c" />
      <file file_name="$(SDK)/components/libraries/balloc/nrf_balloc.c" />
      <file file_name="$(SDK)/external/fprintf/nrf_fprintf.c" />
      <file file_name="$(SDK)/external/fprintf/nrf_fprintf_format.c" />
      <file file_name="$(SDK)/components/libraries/memobj/nrf_memobj.c" />
      <file file_name="$(SDK)/components/libraries/ringbuf/nrf_ringbuf.c" />
      <file file_name="$(SDK)/components/libraries/strerror/nrf_strerror.c" />
      <file file_name="$(SDK)/components/libraries/fifo/app_fifo.c" />
      <file file_name="$(SDK)/components/libraries/uart/app_uart_fifo.c" />
      <file file_name="$(SDK)/components/libraries/usbd/app_usbd.c" />
      <file file_name="$(SDK)/components/libraries/usbd/app_usbd_core.c" />
      <file file_name="$(SDK)/components/libraries/usbd/app_usbd_string_desc.c" />
      <file file_name="$(SDK)/components/libraries/atomic_fifo/nrf_atfifo.c" />
      <file file_name="$(SDK)/components/libraries/hardfault/nrf52/handler/hardfault_handler_gcc.c" />
      <file file_name="$(SDK)/components/libraries/hardfault/hardfault_implementation.c" />
      <file file_name="$(SDK)/components/libraries/experimental_section_vars/nrf_section_iter.c" />
      <file file_name="$(SDK)/components/libraries/fstorage/nrf_fstorage.c" />
      <file file_name="$(SDK)/components/libraries/fstorage/nrf_fstorage_sd.c" />
    </folder>
    <folder Name="nRF_Drivers">
      <file file_name="$(SDK)/integration/nrfx/legacy/nrf_drv_clock.c" />
      <file file_name="$(SDK)/modules/nrfx/soc/nrfx_atomic.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_clock.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_gpiote.c" />
      <file file_name="$(SDK)/integration/nrfx/legacy/nrf_drv_spi.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_spim.c" />
      <file file_name="$(SDK)/integration/nrfx/legacy/nrf_drv_uart.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_uarte.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_uart.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/prs/nrfx_prs.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_rtc.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_usbd.c" />
      <file file_name="$(SDK)/integration/nrfx/legacy/nrf_drv_power.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_systick.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_power.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_twi.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_twim.c" />
      <file file_name="$(SDK)/modules/nrfx/drivers/src/nrfx_timer.c" />
      <file file_name="$(SDK)/integration/nrfx/legacy/nrf_drv_twi.c" />
    </folder>
    <folder Name="nRF_Crypto">
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_aead.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_aes.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_aes_shared.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_ecc.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_ecdh.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_ecdsa.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_eddsa.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_error.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_hash.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_hkdf.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_hmac.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_init.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_rng.c" />
      <file file_name="$(SDK)/components/libraries/crypto/nrf_crypto_shared.c" />
    </folder>
    <folder Name="nrf_cc310">
      <file file_name="$(SDK)/external/nrf_cc310/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_0.9.13.a" />
    </folder>
    <folder Name="nRF_Crypto backend CC310">
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_aes.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_aes_aead.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_chacha_poly_aead.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_ecc.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_ecdh.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_ecdsa.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_eddsa.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_hash.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_hmac.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_init.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_mutex.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_rng.c" />
      <file file_name="$(SDK)/components/libraries/crypto/backend/cc310/cc310_backend_shared.c" />
    </folder>
    <folder Name="Board Support" />
    <folder Name="None">
      <file file_name="$(SDK)/modules/nrfx/mdk/ses_startup_nrf52840.s" />
      <file file_name="$(SDK)/modules/nrfx/mdk/ses_startup_nrf_common.s" />
    </folder>
    <folder Name="Source" exclude="" filter="" path="Source" recurse="Yes" />
    <folder Name="nRF_SoftDevice">
      <file file_name="$(SDK)/components/softdevice/common/nrf_sdh.c" />
      <file file_name="$(SDK)/components/softdevice/common/nrf_sdh_ble.c" />
      <file file_name="$(SDK)/components/softdevice/common/nrf_sdh_soc.c" />
      <file file_name="$(SDK)/components/softdevice/common/nrf_sdh_freertos.c" />
    </folder>
    <folder Name="nRF_BLE">
      <file file_name="$(SDK)/components/ble/nrf_ble_qwr/nrf_ble_qwr.c" />
    </folder>
  </project>
  <configuration
    Name="Release"
    c_preprocessor_definitions="NDEBUG; BL654_MODULE"
    gcc_optimization_level="None" />
  <configuration
    Name="Breadboard"
    c_preprocessor_definitions="DEBUG; DEBUG_NRF; TEST;"
    gcc_optimization_level="None" />
  <configuration
    Name="Common"
    c_additional_options="-Wno-address-of-packed-member"
    c_preprocessor_definitions=""
    c_user_include_directories="SDK/modules/nrfx/drivers/include;SDK/integration/nrfx/legacy;."
    debug_additional_load_file="$(SDK)/components/softdevice/s140/hex/s140_nrf52_7.2.0_softdevice.hex"
    linker_output_format="hex"
    linker_printf_fp_enabled="Float"
    linker_scanf_fp_enabled="Yes" />
  <configuration
    Name="Test"
    c_preprocessor_definitions="DEBUG; BL654_MODULE; TEST; DEBUG_NRF;"
    gcc_optimization_level="None" />
</solution>
 

Content of the projects flash_placement.xml:

<!DOCTYPE Linker_Placement_File>
<Root name="Flash Section Placement">
  <MemorySegment name="FLASH1" start="$(FLASH_PH_START)" size="$(FLASH_PH_SIZE)">
    <ProgramSection load="no" name=".reserved_flash" start="$(FLASH_PH_START)" size="$(FLASH_START)-$(FLASH_PH_START)" />
    <ProgramSection alignment="0x100" load="Yes" name=".vectors" start="$(FLASH_START)" />
    <ProgramSection alignment="4" load="Yes" name=".init" />
    <ProgramSection alignment="4" load="Yes" name=".init_rodata" />
    <ProgramSection alignment="4" load="Yes" name=".text" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".crypto_data" inputsections="*(SORT(.crypto_data*))" address_symbol="__start_crypto_data" end_symbol="__stop_crypto_data" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_ble_observers" inputsections="*(SORT(.sdh_ble_observers*))" address_symbol="__start_sdh_ble_observers" end_symbol="__stop_sdh_ble_observers" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".cli_command" inputsections="*(.cli_command*)" address_symbol="__start_cli_command" end_symbol="__stop_cli_command" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".pwr_mgmt_data" inputsections="*(SORT(.pwr_mgmt_data*))" address_symbol="__start_pwr_mgmt_data" end_symbol="__stop_pwr_mgmt_data" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".nrf_queue" inputsections="*(.nrf_queue*)" address_symbol="__start_nrf_queue" end_symbol="__stop_nrf_queue" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_req_observers" inputsections="*(SORT(.sdh_req_observers*))" address_symbol="__start_sdh_req_observers" end_symbol="__stop_sdh_req_observers" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_state_observers" inputsections="*(SORT(.sdh_state_observers*))" address_symbol="__start_sdh_state_observers" end_symbol="__stop_sdh_state_observers" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_stack_observers" inputsections="*(SORT(.sdh_stack_observers*))" address_symbol="__start_sdh_stack_observers" end_symbol="__stop_sdh_stack_observers" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_const_data" inputsections="*(SORT(.log_const_data*))" address_symbol="__start_log_const_data" end_symbol="__stop_log_const_data" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_soc_observers" inputsections="*(SORT(.sdh_soc_observers*))" address_symbol="__start_sdh_soc_observers" end_symbol="__stop_sdh_soc_observers" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_backends" inputsections="*(SORT(.log_backends*))" address_symbol="__start_log_backends" end_symbol="__stop_log_backends" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".nrf_balloc" inputsections="*(.nrf_balloc*)" address_symbol="__start_nrf_balloc" end_symbol="__stop_nrf_balloc" />
    <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections" address_symbol="__start_nrf_sections" />
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".fs_data"  inputsections="*(.fs_data*)" runin=".fs_data_run"/>
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".cli_sorted_cmd_ptrs"  inputsections="*(.cli_sorted_cmd_ptrs*)" runin=".cli_sorted_cmd_ptrs_run"/>
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_dynamic_data"  inputsections="*(SORT(.log_dynamic_data*))" runin=".log_dynamic_data_run"/>
    <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_filter_data"  inputsections="*(SORT(.log_filter_data*))" runin=".log_filter_data_run"/>
    <ProgramSection alignment="4" load="Yes" name=".dtors" />
    <ProgramSection alignment="4" load="Yes" name=".ctors" />
    <ProgramSection alignment="4" load="Yes" name=".rodata" />
    <ProgramSection alignment="4" load="Yes" name=".ARM.exidx" address_symbol="__exidx_start" end_symbol="__exidx_end" />
    <ProgramSection alignment="4" load="Yes" runin=".fast_run" name=".fast" />
    <ProgramSection alignment="4" load="Yes" runin=".data_run" name=".data" />
    <ProgramSection alignment="4" load="Yes" runin=".tdata_run" name=".tdata" />
  </MemorySegment>
  <MemorySegment name="RAM1" start="$(RAM_PH_START)" size="$(RAM_PH_SIZE)">
    <ProgramSection load="no" name=".reserved_ram" start="$(RAM_PH_START)" size="$(RAM_START)-$(RAM_PH_START)" />
    <ProgramSection alignment="0x100" load="No" name=".vectors_ram" start="$(RAM_START)" address_symbol="__app_ram_start__"/>
    <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections_run" address_symbol="__start_nrf_sections_run" />
    <ProgramSection alignment="4" keep="Yes" load="No" name=".fs_data_run" address_symbol="__start_fs_data" end_symbol="__stop_fs_data" />
    <ProgramSection alignment="4" keep="Yes" load="No" name=".cli_sorted_cmd_ptrs_run" address_symbol="__start_cli_sorted_cmd_ptrs" end_symbol="__stop_cli_sorted_cmd_ptrs" />
    <ProgramSection alignment="4" keep="Yes" load="No" name=".log_dynamic_data_run" address_symbol="__start_log_dynamic_data" end_symbol="__stop_log_dynamic_data" />
    <ProgramSection alignment="4" keep="Yes" load="No" name=".log_filter_data_run" address_symbol="__start_log_filter_data" end_symbol="__stop_log_filter_data" />
    <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections_run_end" address_symbol="__end_nrf_sections_run" />
    <ProgramSection alignment="4" load="No" name=".fast_run" />
    <ProgramSection alignment="4" load="No" name=".data_run" />
    <ProgramSection alignment="4" load="No" name=".tdata_run" />
    <ProgramSection alignment="4" load="No" name=".bss" />
    <ProgramSection alignment="4" load="No" name=".tbss" />
    <ProgramSection alignment="4" load="No" name=".non_init" />
    <ProgramSection alignment="4" size="__HEAPSIZE__" load="No" name=".heap" />
    <ProgramSection alignment="8" size="__STACKSIZE__" load="No" place_from_segment_end="Yes" name=".stack"  address_symbol="__StackLimit" end_symbol="__StackTop"/>
    <ProgramSection alignment="8" size="__STACKSIZE_PROCESS__" load="No" name=".stack_process" />
  </MemorySegment>
</Root>

 

Thank you in advance. Please let me know if moreinformation is needed.

Best reguards

Mads.

Parents
  • Have you checked this thread where this is discussed. You can comment out the nRFSDK stack check nrf_stack_info_overflowed.

    This will only disable nRF SDK stack overflow check but the FreeRTOS stack overflow check still works so your application can still use freertos stack checking mechanism if necessary.

  • Thanks for your answer.

    Yes that would provide a solution to the problem, but in order to avaid changing the SDK i have moved on to use the CRYPTOCELL APIs directly which seems to work.

    The last thing i need to understand now is if there is a way to use the APIs in a non blocking way, where the CC310 peripheral can be set going on crypto calculations while the application does other stuff and is then notified once the peripheral is done?

    It doesn't look like it to me from reading the documentation, but i want to make sure im not mistaken.

    Best regards 

    Mads 

Reply
  • Thanks for your answer.

    Yes that would provide a solution to the problem, but in order to avaid changing the SDK i have moved on to use the CRYPTOCELL APIs directly which seems to work.

    The last thing i need to understand now is if there is a way to use the APIs in a non blocking way, where the CC310 peripheral can be set going on crypto calculations while the application does other stuff and is then notified once the peripheral is done?

    It doesn't look like it to me from reading the documentation, but i want to make sure im not mistaken.

    Best regards 

    Mads 

Children
Related