diff --git a/.gitignore b/.gitignore index 61d4cfa..fc60861 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,6 @@ cmake-build-debug-stm32cube /STM32H723VGTx_FLASH.ld -/compile_commands.json \ No newline at end of file +/compile_commands.json + +.idea \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 35410ca..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# 默认忽略的文件 -/shelf/ -/workspace.xml -# 基于编辑器的 HTTP 客户端请求 -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 13bf869..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -TronOneH7_Scaffold \ No newline at end of file diff --git a/.idea/TronOneH7_Scaffold.iml b/.idea/TronOneH7_Scaffold.iml deleted file mode 100644 index f08604b..0000000 --- a/.idea/TronOneH7_Scaffold.iml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/.idea/copilot.data.migration.agent.xml b/.idea/copilot.data.migration.agent.xml deleted file mode 100644 index 4ea72a9..0000000 --- a/.idea/copilot.data.migration.agent.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask.xml b/.idea/copilot.data.migration.ask.xml deleted file mode 100644 index 7ef04e2..0000000 --- a/.idea/copilot.data.migration.ask.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask2agent.xml b/.idea/copilot.data.migration.ask2agent.xml deleted file mode 100644 index 1f2ea11..0000000 --- a/.idea/copilot.data.migration.ask2agent.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/copilot.data.migration.edit.xml b/.idea/copilot.data.migration.edit.xml deleted file mode 100644 index 8648f94..0000000 --- a/.idea/copilot.data.migration.edit.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/editor.xml b/.idea/editor.xml deleted file mode 100644 index 17f50d3..0000000 --- a/.idea/editor.xml +++ /dev/null @@ -1,349 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index bce41e5..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index de7b4d1..5d74715 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,15 +2,6 @@ cmake_minimum_required(VERSION 3.22) include("cmake/gcc-arm-none-eabi.cmake") project(TronOneH7_Scaffold) -# option(BALANCE "Enable balance" ON) -# option(STEER "Enable steer" ON) -#option(OMNI "Enable omni" ON) -# option(INFANTRY_OMNI "Enable infantry moni" ON) -# option(HERO "Enable hero" ON) -# option(HERO_STEER "Enable hero_steer" ON) -# option(DART_STAND "Enable dart stand" ON) -# option(ENGINEER "Enable engineer" ON) - # 启用编译命令以便于使用例如 clangd 进行索引 set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE) # 启用对 ASM 和 C 语言的 CMake 支持 @@ -47,69 +38,18 @@ if (NOT CMAKE_BUILD_TYPE) endif () message("Build type: ${CMAKE_BUILD_TYPE}") -# 创建可执行对象类型 +# 创建可执行对象 add_executable(${CMAKE_PROJECT_NAME}) -# 添加子目录 -#add_subdirectory(cmake/stm32cubemx) -#add_subdirectory(User_Code/bsp) -#add_subdirectory(User_Code/module) -#if (STEER) -# add_subdirectory(User_Code/user/steer) -# message("You set STEER") -# -#elseif (BALANCE) -# add_subdirectory(User_Code/user/balance) -# message("You set BALANCE") -# -#elseif (OMNI) -# add_subdirectory(User_Code/user/omni) -# message("You set OMNI") -# -#elseif (INFANTRY_OMNI) -# add_subdirectory(User_Code/user/infantry_omni) -# message("You set INFANTRY_OMNI") -# -#elseif (DART_STAND) -# add_subdirectory(User_Code/user/dart_stand) -# message("You set DART_STAND") -# -#elseif (ENGINEER) -# add_subdirectory(User_Code/user/engineer) -# message("You set ENGINEER") -# -#elseif (HERO) -# add_subdirectory(User_Code/user/hero) -# message("You set HERO") -# -#elseif (HERO_STEER) -# add_subdirectory(User_Code/user/hero_steer) -# message("You set HERO_STEER") -#endif () - -# # 强制包含头文件 -# target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -# # -include "${CMAKE_SOURCE_DIR}/User_Code/bsp/safe_check/packed_struct.hpp" -# ) - # Add STM32CubeMX generated sources add_subdirectory(cmake/stm32cubemx) # 添加链接库 target_link_libraries(${CMAKE_PROJECT_NAME} stm32cubemx - # ${CMAKE_SOURCE_DIR}/Drivers/CMSIS/DSP/Lib/GCC/libarm_cortexM7lfdp_math.a -) -#link_libraries("Drivers/CMSIS/DSP/Lib/GCC/libarm_cortexM7lfdp_math.a") -# 添加包含路径 -include_directories( - ./Drivers/CMSIS/Include - ./Drivers/CMSIS/DSP/Include/ -) -# 添加链接目录 -link_directories( - ./Drivers/CMSIS/DSP/Lib/GCC ) + + # 添加编译选项 add_compile_options(-pipe -Wall -fmessage-length=0 # basic options -ffunction-sections -fdata-sections -fno-common # optimize options @@ -118,6 +58,7 @@ add_link_options(-pipe -Wl,--no-warn-rwx-segments # close RWX warning -lc -lstdc++ -lm -lnosys # lib options -Wl,--gc-sections -flto -specs=nano.specs -specs=nosys.specs # optimize options ) + # 添加全局宏定义 add_definitions( -DUSE_HAL_DRIVER @@ -135,19 +76,6 @@ target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -mfloat-abi=hard ) - -# 忽略 usbd_desc.c 文件中由于缺少字段初始化引起的警告 -#set_source_files_properties( -# ${CMAKE_CURRENT_SOURCE_DIR}/USB_DEVICE/App/usbd_desc.c -# PROPERTIES COMPILE_FLAGS -Wno-missing-field-initializers -#) -# 忽略特定文件中的未使用参数警告 -#set_source_files_properties( -# ${CMAKE_CURRENT_SOURCE_DIR}/Core/Src/freertos.c -# ${CMAKE_CURRENT_SOURCE_DIR}/USB_DEVICE/App/usbd_cdc_if.c -# PROPERTIES COMPILE_FLAGS -Wno-unused-parameter -#) - # Add sources to executable target_sources(${CMAKE_PROJECT_NAME} PRIVATE User_Code/bsp/fdcan/bsp_fdcan.c @@ -172,41 +100,4 @@ target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE # 添加全局宏定义 target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE # RM_REFEREE -) - -# 添加全局宏定义 -#if (OMNI) -# target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE -# SENTRY -# OMNI -# ) -#elseif (INFANTRY_OMNI) -# target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE -# # SENTRY -# INFANTRY_OMNI -# ) -#elseif (STEER) -# target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE -# STEER -# ) -#elseif (BALANCE) -# target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE -# BALANCE -# ) -#elseif (HERO) -# target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE -# HERO -# ) -#elseif (HERO_STEER) -# target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE -# HERO_STEER -# ) -#elseif (DART_STAND) -# target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE -# DART_STAND -# ) -#elseif (ENGINEER) -# target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE -# ENGINEER -# ) -#endif () +) \ No newline at end of file