SDK 2.7.0 on RT1050 - FatFS leaves Win32 calls enabled

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

SDK 2.7.0 on RT1050 - FatFS leaves Win32 calls enabled

Jump to solution
746 Views
dmarks_ls
Senior Contributor I

Seems to be an oversight in the FatFS module... I've created a new SDK 2.7.0 project to integrate into my existing SDK 2.6.1 project, and am slowly merging the two together.  (The directory structure changes are rather frustrating from a revision control standpoint.)  I've noticed that in fatfs/source/ffsystem.c, the Win32 API calls have been left enabled.  Example:

int ff_cre_syncobj ( /* 1:Function succeeded, 0:Could not create the sync object */
 BYTE vol,   /* Corresponding volume (logical drive number) */
 FF_SYNC_t* sobj  /* Pointer to return the created sync object */
)
{
 /* Win32 */
 *sobj = CreateMutex(NULL, FALSE, NULL);
 return (int)(*sobj != INVALID_HANDLE_VALUE);

 /* uITRON */
// T_CSEM csem = {TA_TPRI,1,1};
// *sobj = acre_sem(&csem);
// return (int)(*sobj > 0);

 /* uC/OS-II */
// OS_ERR err;
// *sobj = OSMutexCreate(0, &err);
// return (int)(err == OS_NO_ERR);

 /* FreeRTOS */
 *sobj = xSemaphoreCreateMutex();
 return (int)(*sobj != NULL);

 /* CMSIS-RTOS */
// *sobj = osMutexCreate(&Mutex[vol]);
// return (int)(*sobj != NULL);
}

Interestingly, the FreeRTOS calls have also been left enabled, but because of positioning, the Win32 calls will always run instead of the FreeRTOS calls.  The SDK distribution of this file should have the Win32 calls disabled.

David R.

0 Kudos
1 Solution
601 Views
jeremyzhou
NXP Employee
NXP Employee

Hi David Rodgers,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
Thanks for your sharing, I'll transfer the suggestion to SDK library team for checking.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

1 Reply
602 Views
jeremyzhou
NXP Employee
NXP Employee

Hi David Rodgers,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
Thanks for your sharing, I'll transfer the suggestion to SDK library team for checking.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------