From a1c8c0a7b7d07544efc988933cccfdcde68a7336 Mon Sep 17 00:00:00 2001 From: Vaibhav Sethia Date: Fri, 13 Dec 2024 20:02:26 +0530 Subject: [PATCH] chore: Ci fix --- .gitmodules | 2 +- CMakeLists.txt | 4 +++- utilities/cmake/firmware/firmware.cmake | 4 +--- utilities/cmake/simulator/simulator.cmake | 4 +--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitmodules b/.gitmodules index 39795457b..5da64a7e6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,4 +9,4 @@ url = ../nanopb [submodule "vendor/mini-gmp"] path = vendor/mini-gmp - url = https://github.com/Cypherock/mini-gmp + url = ../mini-gmp diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d5a3e5cc..9f88ab9ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,8 @@ include(utilities/cmake/version.cmake) file(GLOB_RECURSE PROTO_SRCS "generated/proto/*.*") list(APPEND PROTO_SRCS "vendor/nanopb/pb_common.c" "vendor/nanopb/pb_decode.c" "vendor/nanopb/pb_encode.c" "vendor/nanopb/pb_common.h" "vendor/nanopb/pb_decode.h" "vendor/nanopb/pb_encode.h" "vendor/nanopb/pb.h") +list (APPEND MINI_GMP_SRCS "vendor/mini-gmp/mini-gmp-helpers.c" "vendor/mini-gmp/mini-gmp.c") + OPTION(DEV_SWITCH "Additional features/logs to aid developers" OFF) OPTION(UNIT_TESTS_SWITCH "Compile build for main firmware or unit tests" OFF) @@ -49,7 +51,7 @@ else() endif() # Include nanopb source headers -target_include_directories( ${EXECUTABLE} PRIVATE vendor/nanopb generated/proto ) +target_include_directories( ${EXECUTABLE} PRIVATE vendor/nanopb generated/proto vendor/mini-gmp) # Enable support for dynamically allocated fields in nanopb # Ref: vendor/nanopb/pb.h diff --git a/utilities/cmake/firmware/firmware.cmake b/utilities/cmake/firmware/firmware.cmake index 82936bf25..38c89ac4f 100644 --- a/utilities/cmake/firmware/firmware.cmake +++ b/utilities/cmake/firmware/firmware.cmake @@ -19,7 +19,7 @@ ELSE() file(GLOB_RECURSE SOURCES "stm32-hal/*.*" "common/*.*" "src/*.*" "apps/*.*") ENDIF(UNIT_TESTS_SWITCH) -add_executable(${EXECUTABLE} ${SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/version.c vendor/mini-gmp/mini-gmp-helpers.c vendor/mini-gmp/mini-gmp.c ${PROTO_SRCS} ${PROTO_HDRS} ${INCLUDES} ${LINKER_SCRIPT} ${STARTUP_FILE}) +add_executable(${EXECUTABLE} ${SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/version.c ${MINI_GMP_SRCS} ${PROTO_SRCS} ${PROTO_HDRS} ${INCLUDES} ${LINKER_SCRIPT} ${STARTUP_FILE}) target_compile_definitions(${EXECUTABLE} PRIVATE -DUSE_HAL_DRIVER -DSTM32L486xx ) add_compile_definitions(USE_SIMULATOR=0 USE_BIP32_CACHE=0 USE_BIP39_CACHE=0 STM32L4 USBD_SOF_DISABLED ENABLE_HID_WEBUSB_COMM=1) IF (DEV_SWITCH) @@ -133,8 +133,6 @@ target_include_directories(${EXECUTABLE} PRIVATE common/lvgl/src/lv_objx common/lvgl/src/lv_themes - vendor/mini-gmp - # Device stm32-hal stm32-hal/BSP diff --git a/utilities/cmake/simulator/simulator.cmake b/utilities/cmake/simulator/simulator.cmake index c7a977d55..1e6e72348 100644 --- a/utilities/cmake/simulator/simulator.cmake +++ b/utilities/cmake/simulator/simulator.cmake @@ -20,7 +20,7 @@ set(EXECUTABLE ${PROJECT_NAME}) find_package(SDL2 REQUIRED SDL2) include_directories(${SDL2_INCLUDE_DIRS}) -add_executable(${EXECUTABLE} ${SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/version.c vendor/mini-gmp/mini-gmp-helpers.c vendor/mini-gmp/mini-gmp.c ${PROTO_SRCS} ${PROTO_HDRS} ${INCLUDES}) +add_executable(${EXECUTABLE} ${SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/version.c ${MINI_GMP_SRCS} ${PROTO_SRCS} ${PROTO_HDRS} ${INCLUDES}) if ("${FIRMWARE_TYPE}" STREQUAL "Main") add_compile_definitions(X1WALLET_INITIAL=0 X1WALLET_MAIN=1) @@ -129,8 +129,6 @@ target_include_directories(${PROJECT_NAME} PRIVATE common/lvgl/src/lv_objx common/lvgl/src/lv_themes - vendor/mini-gmp - # Simulator simulator simulator/BSP