Build Error: Please enable allocator or disable MQXCFG_ENABLE_FP

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

Build Error: Please enable allocator or disable MQXCFG_ENABLE_FP

695 Views
rajbatra
Contributor IV

Hi,

 

I am getting a compile error when building a project for the K64F:

 

C:\Users\raj\Development\lib\Freescale\KSDK_1.2.0/rtos/mqx/lib/frdmk64f.kds/debug/mqx/mqx_cnfg.h:1328:6: error: #error FP tasks need enabled allocator. Please enable allocator or disable MQXCFG_ENABLE_FP.

     #error FP tasks need enabled allocator. Please enable allocator or disable MQXCFG_ENABLE_FP.

 

I did find one instance in which MQXCFG_ENABLE_FP was set to 1. It was in KSDK_1.2.0/rtos/mqx/config/mcu/MK64F12/mqx_sdk_config.h (not sure why, as everywhere else I see it set to 0).

 

So I set it to zero there as well as in my local project which appears to be a copy of it located in Config/mcu/MK64F12/mqx_sk_config.h

 

I rebuilt the mqx_stdlib_frdm64f, and ksdk_mqx_lib_K64F12 but when I rebuild my local project I still get the error message.

It goes away, if I don't include MQX.h in one of my .c files. But I don't know what is triggering the error.

 

Any tips appreciated.

Labels (1)
0 Kudos
4 Replies

389 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

I think maybe this is a configuration issue.  I guess you config your system as MQX_LITE_CONFIG.

please see  mqx_config_config.h

#define MQX_COMMON_CONFIGMQX_SMALL_RAM_CONFIG

if you define

#define MQX_COMMON_CONFIGLITE_CONFIG

You need to

#define MQXCFG_ENABLE_FP  0

Regards

Daniel

0 Kudos

389 Views
rajbatra
Contributor IV

Hi Daniel,

I shouldn't be using lite:

My mqx_sdk_config.h file (located in my project) has this:

#ifndef __mqx_sdk_config_h__

#define __mqx_sdk_config_h__

/* Select initial MQX configuration

* Set one of following configuration:

* MQX_LITE_CONFIG       - lower memory usage, less features

* MQX_SMALL_RAM_CONFIG  - higer memory usage, more features

*/

#define MQX_COMMON_CONFIG    MQX_SMALL_RAM_CONFIG

#define CMSIS_ENABLED                       1

#define MQX_USE_IDLE_TASK                   1

#define MQXCFG_ENABLE_FP                    1   // I TRIED CHANGING THIS TO 0 BUT DIDN"T HELP.

#define MQX_TASK_DESTRUCTION                1

....

I don't see mqx_config.h, I do have mqx_cnfg.h which includes mqx_sdk_config.h

Thanks,

-Raj

0 Kudos

389 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Raj:

According to the following code, I know that in your system , MQXCFG_ALLOCATOR == MQX_ALLOCATOR_NONE. So I think your system is mqx_lite.

You can trace MQXCFG_ALLOCATOR, maybe somewhere, you see it as MQX_ALLOCATOR_NONE (0). Otherwise, this error message can not display.

mqx_cnfg.h Line1328

#if (MQXCFG_ENABLE_FP == 1)&&(MQXCFG_ALLOCATOR == MQX_ALLOCATOR_NONE)

    #error FP tasks need enabled allocator. Please enable allocator or disable MQXCFG_ENABLE_FP.

#endif

Regards

Daniel

0 Kudos

389 Views
rajbatra
Contributor IV

Hi Daniel,

I see your point. Doing a search, MQXCFG_ALLOCATOR is defined as MQX_ALLOCATOR_NONE in lite_config.h and MQX_ALLOCATOR_LWMEM in small_ram_config.h.

I'll have to hunt down where it's including lite_config.h given my mqx_sdk_config.h says MQX_SMALL_RAM_CONFIG.

I find it confusing that when I created the project, KDS copied a bunch of header files from the ksdk_mqx_lib_k64F12 include folders to my local project. Seems there's a danger that I can get them out of sync (I.e. make a change to my local .h file and not rebuild the ksdk_mqx_lib with the change). Is there a point to doing that versus just referring to the headers that are associated with the .a file located in the ksdk_mqx_lib folder?

Thanks,

-Raj

0 Kudos