2166550_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2166550_en-US

2166550_en-US

wrong macro check in some files

Hi

I refer to SDK 25.06.00.

My projects can use FreeRTOS or be bare metal.

So I can have the USE_RTOS symbol defined as 0 or 1.

And this is generally fine because when the check is done, it is usually:

#if (defined(USE_RTOS) && (USE_RTOS > 0U))

see https://github.com/nxp-mcuxpresso/mcux-component/blob/main/lists/fsl_component_generic_list.c#L17

or https://github.com/nxp-mcuxpresso/mcux-component/blob/main/mem_manager/fsl_component_mem_manager.c#L...

So, as I already mentioned in my bare metal projects, I feel free to set USE_RTOS to 0.

In the fsl_os_abstraction.h file itself, there is this define under certain conditions:

https://github.com/nxp-mcuxpresso/mcux-component/blob/main/osa/fsl_os_abstraction.h#L194

However, there are some files released by NXP that do not follow this paradigm, for example ./middleware/mcuboot_opensource/boot/nxp_mcux_sdk/include/os/os_malloc.h

where the check is simply:

#if defined(USE_RTOS)

https://github.com/nxp-mcuxpresso/mcuboot/blob/mcux_main/boot/nxp_mcux_sdk/include/os/os_malloc.h#L2...

Obviously, this check is not valid if USE_RTOS is defined as 0 in order to disable the functionality.

This is not the only example.
I would ask you to review your entire code base and fix this problem.

best regards

Max

Re: wrong macro check in some files

Hi @mastupristi 


 Yes, you are right.  This is a known issue and I will forward it to  the software team .

Thanks a lot for your feedback.


Regards

Daniel

Re: wrong macro check in some files

Hi @mastupristi 

Be aware that mcuboot repository doesn't have synced main_mcux branch, so please use release braches/tags 

https://github.com/nxp-mcuxpresso/mcuboot/tree/release/26.03.00

where the bug is already fixed.

Regards,

Daniel

Tags (1)
No ratings
Version history
Last update:
a month ago
Updated by: