Unable to checkout submodule repository mbedtls

Hi Team

When I checkout the FreeRTOS-LTS repository using GitHub action checkout (v3.0.2, with recursive), the sub module repository corePKCS11 @ cc4129e also gets checked out but the repository mbedtls @ 848a4e0 which is a submodule listed under source/dependency/3rdparty for corePKCS11 does not get checked out.

I then tried to checkout the FreeRTOS-LTS repository locally and tried to checkout sub modules by giving command
git submodule update --init --recursive
Still the sub module repository folder mbedtls created locally was empty i.e. no files mentioned mbedtls @ 848a4e0 were present.

I then went through the .gitmodules file and found that the one present in repository corePKCS11 has following entries for mbedtls:

[submodule "source/dependency/3rdparty/mbedtls"]
	path = source/dependency/3rdparty/mbedtls
	url = https://github.com/ARMmbed/mbedtls.git
	branch = mbedtls-2.16
	update = none

however when I looked at the git hash (848a4e06b375e067552f1a21d4bc69322c673217) it was pointing to mbedtls-2.16.8 How can I resolve this issue?

That is because of the update = none in the .gitmodules file. You need to provide --checkout option explicitly. If you want to just checkout mbedTLS, you can use the following command from the corePKCS11 directory-

git submodule update --init --checkout source/dependency/3rdparty/mbedtls

If you want to recursively checkout all the dependencies, you can do the following:

git submodule update --init --recursive --checkout

Keep in mind that this will result in a lot of submodules bring checked out.

1 Like