Skip to content

Commit 55e7690

Browse files
Ron EldorRon Eldor
authored andcommitted
Refactor Readme after comment from Tech Writer
Rephrase usage guideline on `objects.h` and explain usage of every label in `targets.json`
1 parent de2e487 commit 55e7690

File tree

1 file changed

+5
-5
lines changed
  • features/mbedtls/targets/TARGET_CRYPTOCELL310

1 file changed

+5
-5
lines changed

features/mbedtls/targets/TARGET_CRYPTOCELL310/Readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ The CC 310 driver consists of three libraries:
66

77
* A common core library(`libcc_core.a`).
88
* A platform-specific TRNG library, containing TRNG-related information, for sampling sufficient entropy on the specific platform(`libcc_trng.a`).
9-
* A platform-specific library containig extra information, such as the CC register's base addresses on the specific board. (`libcc_ext.a`)
9+
* A platform-specific library containing extra information, such as the CC register's base addresses on the specific board. (`libcc_ext.a`)
1010

1111
To port your CC 310 driver to Mbed OS on your specific target, do the following:
1212

1313
1. In `targets.json` add the following to your target:
14-
* `MBEDTLS_CONFIG_HW_SUPPORT` to `macros_add` key.
15-
* `CRYPTOCELL` to `device_has_add` key.
16-
* `CRYPTOCELL310` to `extra_labels_add` key.
17-
1. In `objects.h`, include `objects_cryptocell.h`. (You can condition it with `#if DEVICE_CRYPTOCELL` in case you have another `trng` engine for a differnt board, and `objects.h` is common file for your boards, in this case your common `trng_api.c` file should be compiled only if `#if !defined(DEVICE_CRYPTOCELL)`).
14+
* `MBEDTLS_CONFIG_HW_SUPPORT` to `macros_add` key. This is used to suggest there is HW accelerated cryptography engine that will replace the default Mbed TLS implementation.
15+
* `CRYPTOCELL` to `device_has_add` key. This should be used in your common code, that you need to remove from compilation in case CC exists in your board. Use `#if !defined(DEVICE_CRYPTOCELL)` or `#if DEVICE_CRYPTOCELL`.
16+
* `CRYPTOCELL310` to `extra_labels_add` key. This is used for the build system to look for the CC 310 code and binaries.
17+
1. In `objects.h`, include `objects_cryptocell.h`. You can use the `DEBICE_CRYPTOCELL` pre-compilation check as defined above.
1818
1. In `features/mbedtls/targets/TARGET_CRYPTOCELL310/TARGET_<target name>`, add your platform-specific libraries for all toolchains in `TOOLCHAIN_ARM`, `TOOLCHAIN_GCC_ARM` and `TOOLCHAIN_IAR` respectively.
1919
1. Add your CC setup code:
2020
* Implement `cc_platform_setup()` and `cc_platform_terminate()` to enable CC on your platform, in case you have such limitations. You can implement these functions as empty functions.

0 commit comments

Comments
 (0)