CMSIS-FreeRTOS icon indicating copy to clipboard operation
CMSIS-FreeRTOS copied to clipboard

MSV-MingW port and CMSIS defines are causing problems

Open SirWedeck opened this issue 1 year ago • 0 comments

Hi, I'm currently working with the MSV-MingW port on an X86 and Windows. The controller I want to use at the end of the simulation is a SAML21 Cortex M0 MCU. I'm currently using templates and fake files to simulate the peripherals. in the file 'portmacro.h' these files are included, which causes problems for me: #ifdef WIN32_LEAN_AND_MEAN #include <winsock2.h> #else #include <winsock.h> #endif #include <windows.h> #include <timeapi.h> #include <mmsystem.h> #include <winbase.h> it seems that these CMSIS defines are causing problems: __I, __O, __IO, __IM, __OM, __IOM, __I

with the appropriate undefs before the includes it works: #undef __O #undef __IO #undef __IM #undef __OM #undef __IOM The prerequisite is that there are no further CMSIS files and hardware files after that come.

I have now moved the includes to the file 'port.c' and there don't seem to be any problems.

Could you please take this into account in the next update? thx

SirWedeck avatar Jan 13 '25 08:01 SirWedeck