Unable to build project with FreeRTOS, FatFS and sdmmc_host support for FRDM-K64F

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

Unable to build project with FreeRTOS, FatFS and sdmmc_host support for FRDM-K64F

Jump to solution
2,211 Views
ishelly404
Contributor I

Hi,

 

I am having an issue building a FRDM-K64F project with FreeRTOS, FatFS and sdmmc_host_sdhc support. When I create a new project with these three components included together, I cannot build the project and I get the error:

../component/osa/fsl_os_abstraction_bm.c:86:31: error: conflicting types for 'task_handler_t'

This happens even before I have added any code to the project. I am running SDK version 2.9.0 (and also had this issue with 2.8.1), MCUXpresso version 11.3.

Here are the SDK components I am using for the project:

mcuxpresso_config.PNG

Does anyone know what could be causing this issue?

 

Thanks,

Ian

0 Kudos
Reply
1 Solution
2,205 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi ishelly404,

  When you import the frdmk64f_sdcard_fatfs_freertos project directly, do you have the build issues or not?

image.png

image.png

If no issues, you can import this project, the you can use the project right click, copy and past, to rename the project to your own project name, and do the modification based on that project:

image.png

image.png

 

Please try it on your side.

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

View solution in original post

0 Kudos
Reply
4 Replies
2,192 Views
ishelly404
Contributor I

Thank you, I was able to get my project to build starting with the example.

0 Kudos
Reply
2,206 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi ishelly404,

  When you import the frdmk64f_sdcard_fatfs_freertos project directly, do you have the build issues or not?

image.png

image.png

If no issues, you can import this project, the you can use the project right click, copy and past, to rename the project to your own project name, and do the modification based on that project:

image.png

image.png

 

Please try it on your side.

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

0 Kudos
Reply
2,088 Views
axelrietschin
Contributor II

@kerryzhou Great, but what if I want to add some component later-on and the conflicts pops up? Starting over from some sample that builds may not be a viable option.

There is apparently a naming conflict between 

../component/osa/fsl_os_abstraction_bm.c:86:31

    typedef task_control_block_t *task_handler_t;

and

../component/osa/fsl_os_abstraction_free_rtos.h:77:22:

    typedef TaskHandle_t task_handler_t;

The only sane solution is to fix the name conflict, by renaming one or the other type, and reissue the SDK.

Since the first declaration above seems to be local (inside a .c file) it may be best to rename this one as the name change won't spill.

A better name for a pointer to a task_control_block_t could be ptask_control_block_t, thus the typedef could become

    typedef task_control_block_t *ptask_control_block_t;

then all instances of task_handler_t in that file should be renamed to ptask_control_block_t.

0 Kudos
Reply
2,081 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @axelrietschin 

  For your question, please create the new question post.

 Give your board, SDK version information, then we will help you. Don't follow the resolved post with new questions, thanks.

Best Regards,

kerry

0 Kudos
Reply