FAQ

[English]

001 - Using CONFIG Macros to Control Component Registration

The following is an incorrect way to disable components. This is because the armino build system relies on armino_component_register() during the component list generation phase (i.e., the early expansion phase) to generate the component, and the component must be generated first before the component’s Kconfig configuration can be loaded during the component processing phase:

if (CONFIG_C1)
    armino_component_register(SRCS ${src} INCLUDE_DIRS ${inc})
endif()

The following approach may also cause problems when using CONFIG macros to control component registration:

if (CONFIG_C1)
    armino_component_register(SRCS ${src} INCLUDE_DIRS ${inc} REQUIRES c2 c3 c4)
else()
    armino_component_register()
endif()

002 - Function Definition Not Found in Project

In source files under the project’s main directory, if a function or macro from a component is undefined, it’s often because this component has not been added to the main component. You should add the component dependency in CMakeLists.txt under the main directory, such as adding the dependency_component component:

armino_component_register(SRCS "${srcs}" INCLUDE_DIRS "${incs}" PRIV_REQUIRES dependency_component)

003 - Viewing Compilation Toolchain and Compilation Parameters

In the compile_commands.json file in the corresponding project directory under the build directory, which contains compilation commands for all source files, you can view the compilation toolchain and compilation parameters for each source file. For example, for the app project of bk7239, you can view the corresponding compilation commands in build/app/bk7239/compile_commands.json.