Skip to content

Commit 2f86c15

Browse files
author
Cruz Monrreal
authored
Merge pull request #6794 from RonEld/cc310_porting
Cryptocell 310 support
2 parents 13dcef6 + 77e87d3 commit 2f86c15

File tree

95 files changed

+12908
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+12908
-8
lines changed

.astyleignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
BUILD
22
cmsis
3+
features/cryptocell
34
features/mbedtls
45
features/FEATURE_LWIP/lwip
56
rtos/TARGET_CORTEX/rtx4

doxyfile_options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,7 @@ EXCLUDE_PATTERNS = */tools/* \
841841
*/BUILD/* \
842842
*/rtos/TARGET_CORTEX/rtx* \
843843
*/cmsis/* \
844+
*/features/cryptocell/* \
844845
*/features/mbedtls/* \
845846
*/features/storage/* \
846847
*/features/unsupported/* \
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Guidelines for porting Cryptocell to Mbed OS
2+
3+
Cryptocell (CC) 310 is a hardware accelerator that can be ported to several boards, assuming these boards have CC 310 embedded in their hardware.
4+
5+
The CC 310 driver consists of three libraries:
6+
7+
* A common core library(`libcc_core.a`).
8+
* 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 containing extra information, such as the CC register's base addresses on the specific board. (`libcc_ext.a`)
10+
11+
To port your CC 310 driver to Mbed OS on your specific target, do the following:
12+
13+
1. In `targets.json` add the following to your target:
14+
* `MBEDTLS_CONFIG_HW_SUPPORT` to `macros_add` key. This instructs Mbed TLS to look for an alternative cryptographic implementation.
15+
* `CRYPTOCELL310` to `feature`. Use this in your common code that you need to remove from compilation in case CC exists in your board. Use `#if !defined(FEATURE_CRYPTOCELL310)` and `#if defined(FEATURE_CRYPTOCELL310)`.
16+
1. In `objects.h`, include `objects_cryptocell.h`. You can use the `FEATURE_CRYPTOCELL310` precompilation check as defined above.
17+
1. In `features/cryptocell/FEATURE_CRYPTOCELL310/TARGET_<target name>`, add your platform-specific libraries for all toolchains in `TOOLCHAIN_ARM`, `TOOLCHAIN_GCC_ARM` and `TOOLCHAIN_IAR` respectively.
18+
1. Add your CC setup code:
19+
* Implement `cc_platform_setup()` and `cc_platform_terminate()` to enable CC on your platform, in case you have board-specific setup functionality, required for CC setup. These functions can be empty.
20+
* Define `cc_platform_ctx` in `cc_platform.h` in a way that suits your implementation.
21+

0 commit comments

Comments
 (0)