Skip to content

架构更新#4

Merged
00lllooolll00 merged 7 commits into
masterfrom
develop/nn
Feb 1, 2026
Merged

架构更新#4
00lllooolll00 merged 7 commits into
masterfrom
develop/nn

Conversation

@00lllooolll00

Copy link
Copy Markdown
Collaborator

修改原来将所有层级都链接为静态库的问题,现在只有第三方中间件会链接成静态库,其他都是.o库

Copilot AI review requested due to automatic review settings February 1, 2026 06:23
@00lllooolll00 00lllooolll00 merged commit 0f4ab30 into master Feb 1, 2026
14 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the build architecture by changing most layers from STATIC libraries to OBJECT libraries. Previously, all layers (L0-L5) were compiled as static libraries. Now, only third-party middleware (L3) remains as static libraries, while application and framework layers (L0, L1, L2, L4, L5) are compiled as OBJECT libraries whose object files directly participate in final linking.

Changes:

  • Modified CMakeLists.txt files across L0-L5 layers to use OBJECT libraries instead of STATIC libraries
  • Simplified L1_MCU build by removing intermediate cubemx_hal library
  • Added build scripts for GCC and STARM toolchains
  • Enabled LVGL examples and added extensive LVGL example source files
  • Updated documentation to explain OBJECT library architecture

Reviewed changes

Copilot reviewed 211 out of 253 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
L0_Assets/CMakeLists.txt Changed from STATIC to OBJECT library
L1_MCU/CMakeLists.txt Changed to OBJECT library and added dependency links
L1_MCU/STM32F4*/CMakeLists.txt Removed cubemx_hal intermediate library, sources added directly to l1_mcu
L2_Core/CMakeLists.txt Changed from STATIC to OBJECT library
L3_Middlewares/CMakeLists.txt Enabled LVGL examples, added circular dependency issue
L4_Components/CMakeLists.txt Changed to OBJECT library, switched to GLOB_RECURSE
L5_App/CMakeLists.txt Changed to OBJECT library, removed trailing whitespace
Script/*.sh New build scripts for GCC and STARM toolchains
L3_Middlewares/LVGL/examples/* Added extensive LVGL example files
*/readme.md Added OBJECT library architecture documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 26 to 27
LV_CONF_BUILD_DISABLE_DEMOS=1
)

Copilot AI Feb 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LVGL configuration change removes LV_CONF_BUILD_DISABLE_EXAMPLES=1 which will cause LVGL examples to be compiled. However, the examples are added to the link in L3_Middlewares/CMakeLists.txt line 41 with lvgl::examples, but this may not be correctly defined. LVGL typically uses lvgl as the main target and examples are usually optional. This could cause build failures if the LVGL examples target doesn't exist or isn't properly configured.

Copilot uses AI. Check for mistakes.
LV_CONF_BUILD_DISABLE_EXAMPLES=1
LV_CONF_BUILD_DISABLE_DEMOS=1
)
target_link_libraries(lvgl PUBLIC l1_mcu)

Copilot AI Feb 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding target_link_libraries(lvgl PUBLIC l1_mcu) creates a circular dependency. The dependency hierarchy should be: l1_mcu -> l2_core -> l3_middlewares (which includes lvgl). Making lvgl depend on l1_mcu reverses this hierarchy and will cause CMake configuration errors or unexpected linking behavior.

Suggested change
target_link_libraries(lvgl PUBLIC l1_mcu)

Copilot uses AI. Check for mistakes.
@@ -1,8 +1,10 @@
file(GLOB L4_SRCS "src/*.c")
file(GLOB_RECURSE L4_SRCS "src/*.c")

Copilot AI Feb 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed from file(GLOB ...) to file(GLOB_RECURSE ...) which will now recursively search all subdirectories. While this matches the intent to support subdirectories, it may unintentionally include files from backup directories, build artifacts, or other unwanted subdirectories if they exist under L4_Components/src/. Consider being more explicit about which subdirectories should be included.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants