How to update mbedtls version 2.25 to 3.2.1 in mbed-os 6.16.0

while following “mbed-os\connectivity\mbedtls\tools\importer\Makefile” steps to upgrade Mbed TLS version :

  1. Set the MBED_TLS_RELEASE variable to the required mbed TLS release tag
  2. make update
  3. make

Note:- Upgrading to Mbed tls-3.2.1 on Mbed OS-6.16.0

We are getting following error at step 3:-

Adjusting the default mbed TLS config file to mbed purposes ./adjust-config.sh TARGET_IGNORE/mbedtls/scripts/config.pl

…/…/include/mbedtls/config.h
Traceback (most recent call last):
File “/home/parag/Mbed
Programs/mbed-os-example-for-aws/mbed-os/connectivity/mbedtls/tools/importer/TARGET_IGNORE/mbedtls/scripts/config.py”,
line 574, in
sys.exit(main())
File “/home/parag/Mbed
Programs/mbed-os-example-for-aws/mbed-os/connectivity/mbedtls/tools/importer/TARGET_IGNORE/mbedtls/scripts/config.py”,
line 542, in main
config = ConfigFile(args.file)
File “/home/parag/Mbed
Programs/mbed-os-example-for-aws/mbed-os/connectivity/mbedtls/tools/importer/TARGET_IGNORE/mbedtls/scripts/config.py”,
line 375, in init
with open(filename, ‘r’, encoding=‘utf-8’) as file:
FileNotFoundError: [Errno 2] No such file or directory:
‘…/…/include/mbedtls/config.h’
make: *** [Makefile:87: deploy] Error 1

Hi,

The config.h in the include/mbedtls/ was renamed to mbedtls_config.h.
See below:

So, you can modify the Makefile.

--- a/connectivity/mbedtls/tools/importer/Makefile
+++ b/connectivity/mbedtls/tools/importer/Makefile
@@ -27,7 +27,8 @@
 #
 
 # Set the mbed TLS release to import (this can/should be edited before import)
-MBED_TLS_RELEASE ?= v2.25.0
+# MBED_TLS_RELEASE ?= v2.25.0
+MBED_TLS_RELEASE ?= v3.2.1
 MBED_TLS_REPO_URL ?= git@github.com:ARMmbed/mbedtls.git
 
 # Translate between mbed TLS namespace and mbed namespace
@@ -84,7 +85,7 @@ rsync:
 deploy: rsync
 	#
 	# Adjusting the default mbed TLS config file to mbed purposes
-	./adjust-config.sh $(MBED_TLS_DIR)/scripts/config.pl $(TARGET_INC)/mbedtls/config.h
+	./adjust-config.sh $(MBED_TLS_DIR)/scripts/config.pl $(TARGET_INC)/mbedtls/mbedtls_config.h
 	#