Wrong types in x64 build of RTOS demo


I’ve adjusted the MSVC RTOS demo to build under VS2022 and also x64 arch.
There are a few places where the compilers warns about wrong types being used because of size diferences in x86 vs x64.
Would you accept a PR with this migration to VS2022 and also fixing the code to take care of those compiler warnings?

1 Like

Yes! PRs are always welcome. Thanks.

As you note, MSVC is a Win32 port, actually quite old now. It was one of the original ports as it’s used for development and testing - the TCP/IP stack being written using the Win32 port as a very feature rich development environment.

Ideally the port will automatically switch between 32 and 64-bits. I’m sure there will be a compile time constant from the compiler itself that will let you know which configuration is used. That constant can be tested in portmacro.h where the data sizes get set.

Note MSVC generates some warnings from the Tracealyzer trace macros, which are integrated into the main MSVC demo by default. There is another about the use of an uninitialised variable where, as far as I can tell, there are no code paths that could lead to the variable being used before being set (plus no other compilers output the same warning).

Hi Richard. Great!
I’ll do that in the coming days, as time permits.

Related PRs:
FreeRTOS - PR #1139
FreeRTOS-Kernel PR #924

(looks like I can’t add URLs… so just adding the PR numbers for reference)