Skip to content

Commit aae04b2

Browse files
committed
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 609612c commit aae04b2

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
@@ -7980,7 +7980,6 @@
79807980
"SPI",
79817981
"SPISLAVE",
79827982
"SPI_ASYNCH",
7983-
"TRNG",
79847983
"CAN",
79857984
"FLASH",
79867985
"EMAC",
@@ -8629,7 +8628,6 @@
86298628
"SPI",
86308629
"SPISLAVE",
86318630
"SPI_ASYNCH",
8632-
"TRNG",
86338631
"FLASH",
86348632
"CAN",
86358633
"EMAC",

0 commit comments

Comments
 (0)