This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF9160 - Using ECC accelerator from user application?

I want to use a nRF9160 to send data over UDP/NB-IoT.

For encryption I want to use eclipse/tinydtls in order to have support for RFC7250 and (upcoming) RFC9146. That works with software ecc (so far). However the software ecc-functions takes a couple of seconds (more or less expected). Therefore, I would like to try to use the ecc-hw-accelerator.

As far as i understand 1.6 Secure vs. nonsecure ,

"However, this feature is more critical when building applications for the nRF9160, since cellular IoT applications has to be build as non-secure in order to communicate with the modem."

it seems to be not possible to access the ecc-hw from such an cellular IoT application, because that must be on non-secure and there the hw-ecc is not available (right?).

It is somehow hard to understand, why cellular IoT applications has to be build as non-secure. Is there a more detailed explanation about that as "in order to communicate with the modem"?

I read also, that maybe mbedtls could use the ecc-hw for crypto functions. But it leaves it unclear to me, if this is then also limited to the "secure mode" and so also not usable in a iot-application itself.

Parents
  • I use SES 5.68 on Ubuntu 18.04.

    Executing nrf-connect 3.9.1 (on Ubuntu 18.04) and starting "toolchain manager v0.10.1" I get unfortunately "linux is currently not supported by this app". I followed the linux install description. Though I can build a lot of samples, so it should not be that wrong.

    So:

    is it required to use Windows?

    Is it required to use cmd-line, SES is not working?

    If I try to open the "tfm_hello_world" in SES, I get

    Creating solution tfm_hello_world.emProject
    cmake -GNinja -DBOARD=thingy91_nrf9160_ns -DBOARD_DIR=/home/achim/repos/ncs-1.8.0/nrf/boards/arm/thingy91_nrf9160 -B/home/achim/repos/ncs-1.8.0/nrf/samples/tfm/tfm_hello_world/build_thingy91_nrf9160_ns -S/home/achim/repos/ncs-1.8.0/nrf/samples/tfm/tfm_hello_world -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=/opt/gcc-arm-none-eabi-9-2019-q4-major -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=/usr/share/arm_segger_embedded_studio_v568_linux_x64_nordic/html/configure_nordic_project_menuconfig.py
    -- Application: /...../ncs-1.8.0/nrf/samples/tfm/tfm_hello_world
    -- Zephyr version: 2.7.0 (/..../ncs-1.8.0/zephyr), build: v2.7.0-ncs1
    -- Found Python3: /usr/bin/python3.6 (found suitable exact version "3.6.9") found components: Interpreter
    -- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
    -- Board: thingy91_nrf9160_ns
    -- Cache files will be written to: /..../.cache/zephyr
    -- Found dtc: /..../bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (/opt/gcc-arm-none-eabi-9-2019-q4-major)
    -- Found BOARD.dts: /..../ncs-1.8.0/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160_ns.dts
    -- Generated zephyr.dts: /..../ncs-1.8.0/nrf/samples/tfm/tfm_hello_world/build_thingy91_nrf9160_ns/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /..../ncs-1.8.0/nrf/samples/tfm/tfm_hello_world/build_thingy91_nrf9160_ns/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: /..../ncs-1.8.0/nrf/samples/tfm/tfm_hello_world/build_thingy91_nrf9160_ns/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: /..../ncs-1.8.0/nrf/samples/tfm/tfm_hello_world/build_thingy91_nrf9160_ns/zephyr/dts.cmake

    (.... is "/home/username/repos")

    You use "--pristine", is that important? Could that be added using SES 5.68 as well? 

  • Hi,

    Ah, I see. Unfortunately there are issues building many of the crypto samples with SES. I recommend either building from command line, or using the new nRF Connect for VS Code addon, which in most regards are better for nRF Connect SDK development than SES. Pleas try to build from the command line and see if that works. If it does, your toolchain etc. is OK, and then it will also work from VS Code (which unlike SES only calls underlying tools for the build process).

    (You can get the same as --pristine from SES by opening the project again and selecting to clean the build folder (or just close SES, delete the build folder, then open the project again).)

  • Thanks!

    (Sorry, that my answers seems to be mixed up an unordered, but the "reply" button in this forum is really a myth to me.)

    cmd-line works (I already wrote that above).

    And I will give VS code a try tomorrow.

Reply Children
No Data
Related