Repository navigation
Conversation
Fixes eclipse-threadx#851 CMake could build standard, SMP, and Module Manager kernels, but had no target for building the module-side shim library that loadable modules link against. Added the opt-in THREADX_MODULE_LIB option and companion target threadx_module_lib (aliased as azrtos::threadx_module_lib). It compiles common module_lib shims and port-specific module_lib sources, exports the required include paths and user definitions, applies GNU PIC compilation options, and provides a portable consumer check. Signed-off-by: Dev10-sys <kalpanagola9897@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #851
Summary
The
devbranch recently added support for Module Manager kernels (-DTHREADX_MODULE_MANAGER=ON, targetazrtos::threadx), but there was no first-class CMake target for building the companion module shim library (module_lib) that dynamically loadable modules link against.This PR adds:
THREADX_MODULE_LIBoption (defaultOFF) and companion targetthreadx_module_lib(aliased asazrtos::threadx_module_lib).common_modules/module_lib/src/and port-specific sources from${TX_PORT_PATH}/module_lib/src/.${TX_PORT_PATH}/inc,common/incorcommon_smp/inc,common_modules/inc, and${CUSTOM_INC_DIR}).TX_INCLUDE_USER_DEFINE_FILEandTX_MPCOREfor SMP builds).-fpic -fno-plt -mno-pic-data-is-text-relative -msingle-pic-baseon 32-bit Arm,-fpicon 64-bit Arm).threadx_module_libdoes not defineTXM_MODULE_MANAGERand does not link kernel sources.module_libsupport.threadx-module-lib-consumer-checkverifying clean compilation against module APIs.README.md.Verification
-DTHREADX_MODULE_LIB=ONon Linux: cleanly fails withThreadX module library is not supported for architecture 'linux' with toolchain 'gnu' (SMP=OFF).-fpic -fno-plt -mno-pic-data-is-text-relative -msingle-pic-base) and inclusion of all 98 shims + port sources.-fpic) and-DTX_MPCOREpropagation without leakingTXM_MODULE_MANAGER.consumer_check.cwith-Wall -Wextra -Werror: clean with zero warnings.PR checklist
Signed-off-by: Dev10-sys kalpanagola9897@gmail.com