Skip to content

Commit 6ce51db

Browse files
ccli8adbridge
authored andcommitted
Nuvoton: Remove TRNG support
These targets below just support PRNG, not real TRNG. They cannot annouce TRNG. - NUMAKER_PFM_NUC472 - NUMAKER_PFM_M487 - NUMAKER_IOT_M487 On targets without TRNG, to run mbedtls applications which require entropy source, there are two alternatives to TRNG: - Custom entropy source: Define MBEDTLS_ENTROPY_HARDWARE_ALT and provide custom mbedtls_hardware_poll(...) - NV seed: 1. Define MBEDTLS_ENTROPY_NV_SEED 2. Define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO/MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO and provide custom mbedtls_nv_seed_read(...)/mbedtls_nv_seed_write(...). 3. Don't define MBEDTLS_PSA_INJECT_ENTROPY. Meet mbedtls_psa_inject_entropy(...) undefined and then provide custom one, which must be compatible with mbedtls_nv_seed_read(...)/mbedtls_nv_seed_write(...) above. 4. For development, simulating partial provision process, inject entropy seed via mbedtls_psa_inject_entropy(...) pre-main.
1 parent fb98acb commit 6ce51db

File tree

5 files changed

+2
-192
lines changed

5 files changed

+2
-192
lines changed

targets/TARGET_NUVOTON/TARGET_M480/objects.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* mbed Microcontroller Library
2-
* Copyright (c) 2015-2016 Nuvoton
2+
* Copyright (c) 2015-2019 Nuvoton
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -118,10 +118,6 @@ struct pwmout_s {
118118
uint32_t pulsewidth_us;
119119
};
120120

121-
struct trng_s {
122-
uint8_t dummy;
123-
};
124-
125121
struct can_s {
126122
CANName can;
127123
PinName pin_rd;

targets/TARGET_NUVOTON/TARGET_M480/trng_api.c

Lines changed: 0 additions & 88 deletions
This file was deleted.

targets/TARGET_NUVOTON/TARGET_NUC472/objects.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* mbed Microcontroller Library
2-
* Copyright (c) 2015-2016 Nuvoton
2+
* Copyright (c) 2015-2019 Nuvoton
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -114,10 +114,6 @@ struct pwmout_s {
114114
uint32_t pulsewidth_us;
115115
};
116116

117-
struct trng_s {
118-
uint8_t dummy;
119-
};
120-
121117
struct can_s {
122118
CANName can;
123119
PinName pin_rd;

targets/TARGET_NUVOTON/TARGET_NUC472/trng_api.c

Lines changed: 0 additions & 92 deletions
This file was deleted.

targets/targets.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7895,7 +7895,6 @@
78957895
"SPI",
78967896
"SPISLAVE",
78977897
"SPI_ASYNCH",
7898-
"TRNG",
78997898
"CAN",
79007899
"FLASH",
79017900
"EMAC",
@@ -8543,7 +8542,6 @@
85438542
"SPI",
85448543
"SPISLAVE",
85458544
"SPI_ASYNCH",
8546-
"TRNG",
85478545
"FLASH",
85488546
"CAN",
85498547
"EMAC",

0 commit comments

Comments
 (0)