Skip to content

Commit 3f28aad

Browse files
committed
Fix paths in Mbed TLS importer
Note: Now we need to export common.h to the include path, because this header is now also needed by PSA Crypto service.
1 parent 37c22f5 commit 3f28aad

File tree

1 file changed

+12
-11
lines changed
  • connectivity/mbedtls/tools/importer

1 file changed

+12
-11
lines changed

connectivity/mbedtls/tools/importer/Makefile

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ MBED_TLS_RELEASE ?= mbedtls-2.22.0
3131
MBED_TLS_REPO_URL ?= [email protected]:ARMmbed/mbedtls.git
3232

3333
# Translate between mbed TLS namespace and mbed namespace
34-
TARGET_PREFIX:=../
35-
TARGET_EXPERIMENTAL:=../../FEATURE_EXPERIMENTAL_API/
36-
TARGET_SRC:=$(TARGET_PREFIX)src
37-
TARGET_INC:=$(TARGET_PREFIX)inc
34+
TARGET_PREFIX:=../../
35+
TARGET_EXPERIMENTAL:=../../../../platform/FEATURE_EXPERIMENTAL_API/
36+
TARGET_SRC:=$(TARGET_PREFIX)source
37+
TARGET_INC:=$(TARGET_PREFIX)include
3838
TARGET_PSA:=$(TARGET_EXPERIMENTAL)FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls
39-
TARGET_PSA_INC:=$(TARGET_PSA)/inc
40-
TARGET_TESTS:=$(TARGET_PREFIX)TESTS
39+
TARGET_PSA_INC:=$(TARGET_EXPERIMENTAL)FEATURE_PSA/TARGET_MBED_PSA_SRV/inc
40+
TARGET_TESTS:=$(TARGET_PREFIX)tests/TESTS
4141

4242
# mbed TLS source directory - hidden from mbed via TARGET_IGNORE
4343
MBED_TLS_DIR:=TARGET_IGNORE/mbedtls
@@ -60,18 +60,19 @@ rsync:
6060
# Copying mbed TLS headers to mbed includes...
6161
rm -rf $(TARGET_INC)
6262
mkdir -p $(TARGET_INC)
63-
mkdir -p $(TARGET_PSA_INC)
6463
rsync -a --delete $(MBED_TLS_API) $(TARGET_INC)
65-
rsync -a --delete --exclude='crypto_struct.h' $(CRYPTO_API) $(TARGET_PSA_INC)/
64+
#
65+
# Export common.h into the include path, so PSA Crypto can find it
66+
mv $(TARGET_SRC)/common.h $(TARGET_INC)/mbedtls/
6667
#
6768
# Copying licenses
6869
cp $(MBED_TLS_DIR)/LICENSE $(TARGET_PREFIX)
6970
#
70-
# Copying Mbed Crypto into Mbed OS...
71+
# Copying PSA for single-core targets...
72+
rm $(TARGET_PSA_INC)/psa/crypto_*.h
73+
rsync -a --exclude='crypto_struct.h' $(CRYPTO_API) $(TARGET_PSA_INC)/
7174
rm -rf $(TARGET_PSA)
72-
7375
mkdir -p $(TARGET_PSA)
74-
7576
rsync -a --delete $(CRYPTO_API)/crypto_struct.h $(TARGET_PSA)/
7677
rsync -a --delete $(MBED_TLS_DIR)/library/psa_*.c $(TARGET_PSA)/
7778
rsync -a --delete $(MBED_TLS_DIR)/library/psa_*.h $(TARGET_PSA)/

0 commit comments

Comments
 (0)