nxp-mcuxpresso / mcux-sdk

MCUXpresso SDK
BSD 3-Clause "New" or "Revised" License
339 stars 148 forks source link

[BUG] CONFIG_USE_middleware_freertos-kernel requires *-kernel_template and *-kernel_extension #185

Open stefanct opened 7 months ago

stefanct commented 7 months ago

Describe the bug

The SDK's FreeRTOS setup requires CONFIG_USE_middleware_freertos-kernel_template and CONFIG_USE_middleware_freertos-kernel_extension to be set if CONFIG_USE_middleware_freertos-kernel is to be used (i.e., whenever FreeRTOS is selected).

The respective test is here and produces the typical "middleware_freertos-kernel dependency does not meet, please check..." message here.

I don't see a reason for this check at all... I noticed it because the template adds its own FreeRTOSConfig.h which in my case had precedence over my own config due to the order of include directories. This led to unwanted behavior.

To Reproduce

Should be rather obvious from the code but please ask if not! This is with the source code from MCUX SDK 2.15.0.

Expected behavior

The extension and template should not be required by the base kernel (but the other way around only - which is not explicitly checked AFAICT, which is another bug hidden by this one).

Additional context

I simply deleted the whole check at line 47 and the corresponding else clause if no obvious ill intent.

MichalPrincNXP commented 7 months ago

Hello @stefanct , thanks for your report, it deals with known limitation. Extension and template is forced to be added into the project because we wanted

mttjcksn commented 4 months ago

I just ran into this issue too. Separating the requirement for CONFIG_USE_middleware_freertos-kernel and CONFIG_USE_middleware_freertos-kernel_template would make a lot of sense, and I presume that was the original intention.

MichalPrincNXP commented 4 months ago

Hello @stefanct , thank you for providing your inputs. As I indicted the user options definition and the way of defining components dependencies is going to be changed soon. Hope it will bring better user experience ... Regards Michal