Skip to content

Commit fff8357

Browse files
committed
[NUC472] Fix compile error with Travis CI
Use MBED_CONF_RTOS_PRESENT to filter out mbedtls alternative for mbed OS 2.
1 parent fc16917 commit fff8357

File tree

8 files changed

+40
-0
lines changed

8 files changed

+40
-0
lines changed

targets/TARGET_NUVOTON/TARGET_NUC472/crypto/aes/aes_alt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
* http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
2222
*/
2323

24+
/* Compatible with mbed OS 2 which doesn't support mbedtls */
25+
#if MBED_CONF_RTOS_PRESENT
26+
2427
#if !defined(MBEDTLS_CONFIG_FILE)
2528
#include "mbedtls/config.h"
2629
#else
@@ -588,3 +591,5 @@ int mbedtls_aes_crypt_ctr( mbedtls_aes_context *ctx,
588591

589592

590593
#endif /* MBEDTLS_AES_C */
594+
595+
#endif /* MBED_CONF_RTOS_PRESENT */

targets/TARGET_NUVOTON/TARGET_NUC472/crypto/des/des_alt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
/* Compatible with mbed OS 2 which doesn't support mbedtls */
18+
#if MBED_CONF_RTOS_PRESENT
19+
1720
#if !defined(MBEDTLS_CONFIG_FILE)
1821
#include "mbedtls/config.h"
1922
#else
@@ -408,3 +411,5 @@ static int mbedtls_des_docrypt(uint16_t keyopt, uint8_t key[3][MBEDTLS_DES_KEY_S
408411

409412
#endif /* MBEDTLS_DES_ALT */
410413
#endif /* MBEDTLS_DES_C */
414+
415+
#endif /* MBED_CONF_RTOS_PRESENT */

targets/TARGET_NUVOTON/TARGET_NUC472/crypto/des/des_alt_sw.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
* http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf
2626
*/
2727

28+
/* Compatible with mbed OS 2 which doesn't support mbedtls */
29+
#if MBED_CONF_RTOS_PRESENT
30+
2831
#if !defined(MBEDTLS_CONFIG_FILE)
2932
#include "mbedtls/config.h"
3033
#else
@@ -795,3 +798,5 @@ int mbedtls_des3_sw_crypt_cbc( mbedtls_des3_sw_context *ctx,
795798

796799
#endif /* MBEDTLS_DES_ALT */
797800
#endif /* MBEDTLS_DES_C */
801+
802+
#endif /* MBED_CONF_RTOS_PRESENT */

targets/TARGET_NUVOTON/TARGET_NUC472/crypto/sha/sha1_alt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
/* Compatible with mbed OS 2 which doesn't support mbedtls */
18+
#if MBED_CONF_RTOS_PRESENT
19+
1720
#if !defined(MBEDTLS_CONFIG_FILE)
1821
#include "mbedtls/config.h"
1922
#else
@@ -134,3 +137,5 @@ void mbedtls_sha1_process(mbedtls_sha1_context *ctx, const unsigned char data[64
134137

135138
#endif /* MBEDTLS_SHA1_ALT */
136139
#endif /* MBEDTLS_SHA1_C */
140+
141+
#endif /* MBED_CONF_RTOS_PRESENT */

targets/TARGET_NUVOTON/TARGET_NUC472/crypto/sha/sha1_alt_sw.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
* http://www.itl.nist.gov/fipspubs/fip180-1.htm
2525
*/
2626

27+
/* Compatible with mbed OS 2 which doesn't support mbedtls */
28+
#if MBED_CONF_RTOS_PRESENT
29+
2730
#if !defined(MBEDTLS_CONFIG_FILE)
2831
#include "mbedtls/config.h"
2932
#else
@@ -335,3 +338,5 @@ void mbedtls_sha1_sw_finish( mbedtls_sha1_sw_context *ctx, unsigned char output[
335338
#endif /* MBEDTLS_SHA1_ALT */
336339

337340
#endif /* MBEDTLS_SHA1_C */
341+
342+
#endif /* MBED_CONF_RTOS_PRESENT */

targets/TARGET_NUVOTON/TARGET_NUC472/crypto/sha/sha256_alt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
/* Compatible with mbed OS 2 which doesn't support mbedtls */
18+
#if MBED_CONF_RTOS_PRESENT
19+
1720
#if !defined(MBEDTLS_CONFIG_FILE)
1821
#include "mbedtls/config.h"
1922
#else
@@ -138,3 +141,5 @@ void mbedtls_sha256_process(mbedtls_sha256_context *ctx, const unsigned char dat
138141

139142
#endif /* MBEDTLS_SHA256_ALT */
140143
#endif /* MBEDTLS_SHA256_C */
144+
145+
#endif /* MBED_CONF_RTOS_PRESENT */

targets/TARGET_NUVOTON/TARGET_NUC472/crypto/sha/sha256_alt_sw.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
* http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
2525
*/
2626

27+
/* Compatible with mbed OS 2 which doesn't support mbedtls */
28+
#if MBED_CONF_RTOS_PRESENT
29+
2730
#if !defined(MBEDTLS_CONFIG_FILE)
2831
#include "mbedtls/config.h"
2932
#else
@@ -306,3 +309,5 @@ void mbedtls_sha256_sw_finish( mbedtls_sha256_sw_context *ctx, unsigned char out
306309
#endif /* MBEDTLS_SHA1_ALT */
307310

308311
#endif /* MBEDTLS_SHA256_C */
312+
313+
#endif /* MBED_CONF_RTOS_PRESENT */

targets/TARGET_NUVOTON/TARGET_NUC472/crypto/sha/sha_alt_hw.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
/* Compatible with mbed OS 2 which doesn't support mbedtls */
18+
#if MBED_CONF_RTOS_PRESENT
19+
1720
#if !defined(MBEDTLS_CONFIG_FILE)
1821
#include "mbedtls/config.h"
1922
#else
@@ -331,3 +334,5 @@ void crypto_sha_getinternstate(unsigned char output[], size_t olen)
331334
#endif /* MBEDTLS_SHA1_ALT || MBEDTLS_SHA256_ALT || MBEDTLS_SHA512_ALT */
332335

333336
#endif /* MBEDTLS_SHA1_C || MBEDTLS_SHA256_C || MBEDTLS_SHA512_C */
337+
338+
#endif /* MBED_CONF_RTOS_PRESENT */

0 commit comments

Comments
 (0)