CubeMx generates cmsis-v1 functions when using FATFS+FREERTOS cmsis-v2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-12 1:04 AM
I am using cubeMX 6.6.1.
When selected FREERTOS cmsis-v2 and FATFS, everytime cubeMX generates code it oveerrides syscall.c with FREERTOS cmsis-v1 prototype funcions.
int ff_cre_syncobj ( /* TRUE:Function succeeded, FALSE:Could not create due to any error */
BYTE vol, /* Corresponding logical drive being processed */
_SYNC_t *sobj /* Pointer to return the created sync object */
)
{
int ret;
osSemaphoreDef(SEM);
//*sobj = osSemaphoreCreate(osSemaphore(SEM), 1);//cubeMX generates this
*sobj = osSemaphoreNew(1, 1, osSemaphore(SEM));///cmsis-v2 equivalent
ret = (*sobj != NULL);
return ret;
}
int ff_req_grant ( /* TRUE:Got a grant to access the volume, FALSE:Could not get a grant */
_SYNC_t sobj /* Sync object to wait */
)
{
int ret = 0;
//if(osSemaphoreWait(sobj, _FS_TIMEOUT) == osOK)
if(osSemaphoreAcquire(sobj, _FS_TIMEOUT) == osOK)
{
ret = 1;
}
return ret;
}
is there any way i could prevent cubeMX to override this two functions every time GENERATE CODE is clicked?
is this a cubeMX bug? or is it expected?
- Labels:
-
FatFS
-
FreeRTOS
-
STM32CubeMX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-23 8:10 AM
Hello @Javier Muñoz​
Issue reproduced using cubeMX 6.6.1 , stm32cubeIDE 1.10.1 and Nucleo-F767ZI , I added the two functions that you wrote above in the syscall.c and i clicked "Generate code " again nothing change the functions still there and cubeMX didn't overcome the two functions .
Can you please provide more details about the issue .
Ghofrane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-23 8:40 AM
Thanks for giving it a look @Ghofrane GSOURI​ .
I made a video for you
also ,find attached my cubeMx file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-24 1:06 AM
Good morning @Javier Muñoz
I recommend you to use stm32cubeide version 1.10.1
It is the latest version and your problem will be resolved
This is the link to download the latest version that i told you about
https://www.st.com/en/development-tools/stm32cubeide.html
Ghofrane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-24 1:13 AM
I dont think CubeIDE is the problem here, anyway, ill download the latest version and get back to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-07 3:44 AM
Hello @Javier Muñoz​
If your issue is resolved, please close this post by clicking the "Select as Best" button on the previous answer. This will help other members of the community find this response more quickly.
Thanks for your contribution and do not hesitate to raise any issues or feedback.
Regards,
Ghofrane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-08 1:01 AM
@Ghofrane GSOURI​ I just downloaded the 1.10.1 CUbeIDE
And as i expected ,the issue is still there, this has nothing to do with the Cube IDE,
Same thing could be detected using a plain text editor.
When generating the boiler plate code wth CUBEMX , when freertosv2 is selected, CUBEMX uses old freertos v1 function definitions in syscall.c causing this error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-08 1:02 AM
the issue is not yet resolved
