fsl_os_abstraction

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

fsl_os_abstraction

2,482 次查看
oaf
Contributor IV

Hi,

 

After several hours in my debugger, I've found that I've forgotten to define the used OS, when include fsl_os_abstraction.h.

If no OS is defined it defaults to BearMetal, but as I linked with MQX I got some interesting results!

 

Suggestion:

The used OS should always be defined or else the compilation stops with an error message,

then this kind of problem could NOT occur.

 

ORIGINAL:

#if defined (FSL_RTOS_MQX)

    #define USE_RTOS 1

    #include "fsl_os_abstraction_mqx.h"

#elif defined (FSL_RTOS_FREE_RTOS)

    #define USE_RTOS 1

    #include "fsl_os_abstraction_free_rtos.h"

#elif defined (FSL_RTOS_UCOSII)

    #define USE_RTOS 1

    #include "fsl_os_abstraction_ucosii.h"

#elif defined (FSL_RTOS_UCOSIII)

    #define USE_RTOS 1

    #include "fsl_os_abstraction_ucosiii.h"

#else

    #define USE_RTOS 0

    #include "fsl_os_abstraction_bm.h"

#endif

 

SUGGESTION:

#if defined (FSL_RTOS_MQX)

    #define USE_RTOS 1

    #include "fsl_os_abstraction_mqx.h"

#elif defined (FSL_RTOS_FREE_RTOS)

    #define USE_RTOS 1

    #include "fsl_os_abstraction_free_rtos.h"

#elif defined (FSL_RTOS_UCOSII)

    #define USE_RTOS 1

    #include "fsl_os_abstraction_ucosii.h"

#elif defined (FSL_RTOS_UCOSIII)

    #define USE_RTOS 1

    #include "fsl_os_abstraction_ucosiii.h"   

#elif defined (FSL_BARE_METAL)

    #define USE_RTOS 0

    #include "fsl_os_abstraction_bm.h"

#else

    #error "Must define OS used"

#endif

标签 (1)
标记 (2)
1 回复

1,859 次查看
DavidS
NXP Employee
NXP Employee

Hi Ole,

Great suggestions.

I will pass it along to the KSDK team.

Regards,

David