From 937b7d34d0f481b7c7787f4e2fcc73b622cbd3f0 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 94a322261..d4e09291d 100644 --- a/core/SConscript.bootloader +++ b/core/SConscript.bootloader @@ -158,7 +158,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 d730e8349..b5824d357 100644 --- a/core/SConscript.bootloader_ci +++ b/core/SConscript.bootloader_ci @@ -150,7 +150,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 0ad54da33..469ca571b 100644 --- a/core/SConscript.firmware +++ b/core/SConscript.firmware @@ -448,7 +448,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 c2f9b9d10..5bf315edb 100644 --- a/core/SConscript.prodtest +++ b/core/SConscript.prodtest @@ -150,7 +150,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 026e82689..27afdbae2 100644 --- a/core/SConscript.reflash +++ b/core/SConscript.reflash @@ -118,7 +118,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 5363c028c..0413e81c8 100644 --- a/core/embed/rust/build.rs +++ b/core/embed/rust/build.rs @@ -123,7 +123,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 8f4ccc8cf..7f6fd0c1a 100644 --- a/core/site_scons/boards/stm32f4_common.py +++ b/core/site_scons/boards/stm32f4_common.py @@ -10,6 +10,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", ] @@ -68,6 +69,7 @@ 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=;" "-DFLASH_BLOCK_WORDS=1;" "-DFLASH_BIT_ACCESS=1" 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