Improvement for 64bit Windows port - #1011
Conversation
Especially it is introduced for 64bit compiler.(x64 platform on MSVC and MinGW-w64)
…ly.(MinGW-w64 only)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1011 +/- ##
=======================================
Coverage 93.00% 93.00%
=======================================
Files 6 6
Lines 3200 3200
Branches 879 879
=======================================
Hits 2976 2976
Misses 111 111
Partials 113 113
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@watsk |
|
@chinglee-iot |
chinglee-iot
left a comment
There was a problem hiding this comment.
Thank you for creating this PR. The information is very clear to me.
| NULL ); /* No name. */ | ||
|
|
||
|
|
||
| #ifdef __x86_64__ |
There was a problem hiding this comment.
Why is this needed only on x64 and not on Win32?
There was a problem hiding this comment.
@aggarg
Thank you for pointing out. You are correct. Win32 is also needed.
I added #pragma only for x64 because I observed that MinGW32 does not report warning and I thought it is x64 unique.
But I found that MinGW32 version on my PC is too old and the latest MinGW32 reports same warning as MinGW64.
I modified __x86_64__ to __GNUC__.
(I didn't delete #ifdef because MSVC does not recognize this pragma directive.)
Could you review modification?
I tested again all combinations of TickType_t width and compiler width on MinGW and MSVC.
No problem was found.
There was a problem hiding this comment.
Thank you for your contribution. Looks good!
…tion. Before modification: Compiler warning was ignored only on MinGW64 After modification: Compiler warning is ignored on MinGW32 and MinGW64 Reason of modification: The cast warning here is unavoidable not only on MinGW64 but also on MinGW32. "__GNUC__" macro is used because MSVC does not recognize this #pragma directive.
|
* Add IPv6 Demo (FreeRTOS#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (FreeRTOS#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (FreeRTOS#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (FreeRTOS#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (FreeRTOS#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (FreeRTOS#969) * Update demo to latest +TCP dev/IPv6_integration (FreeRTOS#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (FreeRTOS#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (FreeRTOS#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (FreeRTOS#1002) * Update IPv6 demo ReadMe (FreeRTOS#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (FreeRTOS#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (FreeRTOS#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
* 64bit TickType_t is supported on Windows port.(MSVC and MinGW) Especially it is introduced for 64bit compiler.(x64 platform on MSVC and MinGW-w64) * Unnecessary compiler warning for the cast operation is disabled locally.(MinGW-w64 only) * Modify the condition for ignoring compiler warning for the cast operation. Before modification: Compiler warning was ignored only on MinGW64 After modification: Compiler warning is ignored on MinGW32 and MinGW64 Reason of modification: The cast warning here is unavoidable not only on MinGW64 but also on MinGW32. "__GNUC__" macro is used because MSVC does not recognize this #pragma directive.




Improvement for 64bit Windows port
Description
64bit TickType_t is supported. (MSVC and MinGW)
The case
configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITSis added in portmacro.h.It is straightforward extension from 16bit and 32bit.
This change is based on the following discussion on the FreeRTOS forum.
https://forums.freertos.org/t/64bit-application-on-freertos-windows-port/19110
Unnecessary compiler warning is disabled locally. (MinGW-w64 only)
#pragma for ignoring the warning
cast-function-typeis added in port.c.MinGW-w64 reports this warning for the for the cast operation from
TaskFunction_ttoLPTHREAD_START_ROUTINE.This warning should be ignored because it is unavoidable.
TaskFunction_tis an essential type in FreeRTOS andLPTHREAD_START_ROUTINEis an essential type in win32api.This pragma option affects only one line. Other part is not affected.
Test Steps
Define
configTICK_TYPE_WIDTH_IN_BITSasTICK_TYPE_WIDTH_64_BITSin FreeRTOSConfig.h and build FreeRTOS by MinGW-w64 or x64 platform on MSVC(Visual Studio).Regression tests are performed.
All combinations of tick type width and compiler type have been tested.
MingW Demo: CodeCoverage configuration runs successfully in all cases. No error is reported in the console. No regression is found on coverage score.
MSVC Demo: Demo application runs successfully. No error is reported in the console.
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.