From 067b37ad32ff34975e930ed4dedf66f150aaaf90 Mon Sep 17 00:00:00 2001 From: cepetr Date: Wed, 4 Oct 2023 10:58:15 +0200 Subject: [PATCH] feat(core): add STM32CubeU5 submodule [no changelog] --- .gitmodules | 3 +++ core/SConscript.bootloader | 1 - core/SConscript.bootloader_ci | 1 - core/SConscript.firmware | 1 - core/SConscript.prodtest | 1 - core/SConscript.reflash | 1 - core/embed/rust/build.rs | 1 - core/site_scons/boards/stm32f4_common.py | 2 ++ core/vendor/stm32cube-u5 | 1 + vendor/stm32cube-u5 | 1 + 10 files changed, 7 insertions(+), 6 deletions(-) create mode 120000 core/vendor/stm32cube-u5 create mode 160000 vendor/stm32cube-u5 diff --git a/.gitmodules b/.gitmodules index b4cf44ea8..6253d89b9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -21,3 +21,6 @@ [submodule "vendor/fido2-tests"] path = vendor/fido2-tests url = https://github.com/trezor/fido2-tests.git +[submodule "vendor/stm32cube-u5"] + path = vendor/stm32cube-u5 + url = https://github.com/STMicroelectronics/STM32CubeU5.git diff --git a/core/SConscript.bootloader b/core/SConscript.bootloader index f408f1280..04efb6e6b 100644 --- a/core/SConscript.bootloader +++ b/core/SConscript.bootloader @@ -156,7 +156,6 @@ env.Replace( 'embed/models', 'embed/trezorhal', 'embed/extmod/modtrezorui', - 'vendor/micropython/lib/cmsis/inc', 'vendor/nanopb', ] + CPPPATH_MOD + PATH_HAL, CPPDEFINES=[ diff --git a/core/SConscript.bootloader_ci b/core/SConscript.bootloader_ci index afffdbc86..62e3c9e03 100644 --- a/core/SConscript.bootloader_ci +++ b/core/SConscript.bootloader_ci @@ -148,7 +148,6 @@ env.Replace( 'embed/models', 'embed/trezorhal', 'embed/extmod/modtrezorui', - 'vendor/micropython/lib/cmsis/inc', 'vendor/nanopb', ] + CPPPATH_MOD + PATH_HAL, CPPDEFINES=[ diff --git a/core/SConscript.firmware b/core/SConscript.firmware index 72527c149..cc02cf569 100644 --- a/core/SConscript.firmware +++ b/core/SConscript.firmware @@ -439,7 +439,6 @@ env.Replace( 'embed/trezorhal', 'embed/extmod/modtrezorui', 'vendor/micropython', - 'vendor/micropython/lib/cmsis/inc', ] + CPPPATH_MOD + PATH_HAL, CPPDEFINES=[ 'FIRMWARE', diff --git a/core/SConscript.prodtest b/core/SConscript.prodtest index 2cafbd9a1..6fbad98e1 100644 --- a/core/SConscript.prodtest +++ b/core/SConscript.prodtest @@ -146,7 +146,6 @@ env.Replace( 'embed/models', 'embed/trezorhal', 'embed/extmod/modtrezorui', - 'vendor/micropython/lib/cmsis/inc', ] + CPPPATH_MOD + PATH_HAL, CPPDEFINES=[ 'TREZOR_PRODTEST', diff --git a/core/SConscript.reflash b/core/SConscript.reflash index 7e84ceb6f..83c18b1f6 100644 --- a/core/SConscript.reflash +++ b/core/SConscript.reflash @@ -116,7 +116,6 @@ env.Replace( 'embed/models', 'embed/trezorhal', 'embed/extmod/modtrezorui', - 'vendor/micropython/lib/cmsis/inc', ] + CPPPATH_MOD + PATH_HAL, CPPDEFINES=[ 'TREZOR_MODEL_'+TREZOR_MODEL, diff --git a/core/embed/rust/build.rs b/core/embed/rust/build.rs index 810f01954..a6de34623 100644 --- a/core/embed/rust/build.rs +++ b/core/embed/rust/build.rs @@ -103,7 +103,6 @@ fn prepare_bindings() -> bindgen::Builder { clang_args.push("-nostdinc"); clang_args.push("-I../firmware"); clang_args.push("-I../../build/firmware"); - clang_args.push("-I../../vendor/micropython/lib/cmsis/inc"); clang_args.push("-DUSE_HAL_DRIVER"); bindings = bindings.clang_args(&clang_args); diff --git a/core/site_scons/boards/stm32f4_common.py b/core/site_scons/boards/stm32f4_common.py index 329de344c..7759ed18f 100644 --- a/core/site_scons/boards/stm32f4_common.py +++ b/core/site_scons/boards/stm32f4_common.py @@ -8,6 +8,7 @@ def stm32f4_common_files(env, defines, sources, paths): paths += [ "embed/trezorhal/stm32f4", + "vendor/micropython/lib/cmsis/inc", "vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Inc", "vendor/micropython/lib/stm32lib/CMSIS/STM32F4xx/Include", ] @@ -64,5 +65,6 @@ def stm32f4_common_files(env, defines, sources, paths): "-I../trezorhal/stm32f4;" "-I../../vendor/micropython/lib/stm32lib/STM32F4xx_HAL_Driver/Inc;" "-I../../vendor/micropython/lib/stm32lib/CMSIS/STM32F4xx/Include;" + "-I../../vendor/micropython/lib/cmsis/inc;" "-DSTM32_HAL_H=" ) diff --git a/core/vendor/stm32cube-u5 b/core/vendor/stm32cube-u5 new file mode 120000 index 000000000..60475d6a3 --- /dev/null +++ b/core/vendor/stm32cube-u5 @@ -0,0 +1 @@ +../../vendor/stm32cube-u5 \ No newline at end of file diff --git a/vendor/stm32cube-u5 b/vendor/stm32cube-u5 new file mode 160000 index 000000000..7942fc4ea --- /dev/null +++ b/vendor/stm32cube-u5 @@ -0,0 +1 @@ +Subproject commit 7942fc4ea05026e4e9ce72d680f704e9433bce42