From 3833eac9fe23ed6e51c411709cf50ee4e3c66ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20G=C3=B3rski?= Date: Mon, 15 Sep 2025 16:39:53 +0200 Subject: [PATCH 1/3] Make the URL for the submodule valid CMSIS-SVD repository was moved plus git:// makes the git command hang. [Recent change](https://github.com/NixOS/nixpkgs/commit/5cd869caa4ea1bf1bde71731ecc96b24e1bdcc2d) in the Rust platform in `NixOS/nixpkgs` prevents a user from packaging a Rust program using crates from this repository to be used as dependencies as it forces their submodules to be checked out, regardless of the `submodule.*.update` setting. --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 9a8da720..97a6ce44 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "cmsis-svd"] path = cmsis-svd - url = git://github.com/posborne/cmsis-svd.git + url = https://github.com/cmsis-svd/cmsis-svd.git update = none From db8ad9565b37e621c3d660dd3ed26f7a56b0bcb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20G=C3=B3rski?= Date: Tue, 30 Sep 2025 21:08:57 +0200 Subject: [PATCH 2/3] Remove `cmsis-svd` submodule --- .gitmodules | 4 ---- cmsis-svd | 1 - 2 files changed, 5 deletions(-) delete mode 160000 cmsis-svd diff --git a/.gitmodules b/.gitmodules index 97a6ce44..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +0,0 @@ -[submodule "cmsis-svd"] - path = cmsis-svd - url = https://github.com/cmsis-svd/cmsis-svd.git - update = none diff --git a/cmsis-svd b/cmsis-svd deleted file mode 160000 index 9c416c5f..00000000 --- a/cmsis-svd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9c416c5ff18e7d272a792c13bd235ebe30eef816 From 8b62650863c04abbcf57392237e3ecebadc610ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20G=C3=B3rski?= Date: Tue, 30 Sep 2025 22:05:16 +0200 Subject: [PATCH 3/3] Replace the submodule with an explicit repository clone --- .gitignore | 5 +++++ generate-tests.sh | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c626e048..74c39944 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,8 @@ [._]*.sw[a-p] Cargo.lock target + +# generate-tests.sh related ignores +cmsis-svd-data +tests/cmsis.rs +tests/cmsis_tests diff --git a/generate-tests.sh b/generate-tests.sh index ab3fadad..c6829eaf 100644 --- a/generate-tests.sh +++ b/generate-tests.sh @@ -24,8 +24,14 @@ main() { rm -rf tests/cmsis_tests mkdir -p tests/cmsis_tests + local svd_source=cmsis-svd-data + if [ ! -d $svd_source ] + then + git clone https://github.com/cmsis-svd/cmsis-svd-data.git + fi + local vendor_dir - for vendor_dir in $(echo cmsis-svd/data/*); do + for vendor_dir in $(echo $svd_source/data/*); do local vendor=$(basename $vendor_dir) cat >"$cmsis_dir/$vendor.rs" <