Add x64 configuration to Win32-MSVC demo (#1164)

Add x64 configuration to Win32-MSVC demo.

This was originally contributed in this PR - #1139

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: José Simões <jose.simoes@eclo.solutions>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
pull/1128/head^2
Gaurav-Aggarwal-AWS 1 year ago committed by GitHub
parent b0c6296cbf
commit 3d236bd83d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -62,7 +62,8 @@ jobs:
$content = Get-Content -Path 'main.c' -Raw
$newContent = $content -replace 'int\s+main(.*?)void(.*?)\r?\n\s*{', 'int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );'
$newContent | Set-Content -Path 'main.c'
msbuild WIN32.sln -t:rebuild
msbuild WIN32.sln /p:Platform=Win32 -t:rebuild
msbuild WIN32.sln /p:Platform=x64 -t:rebuild
$exitStatus = $?
echo "::endgroup::"
if($exitStatus -eq 1) {
@ -73,11 +74,21 @@ jobs:
}
- env:
stepName: Run and monitor WIN32-MSVC Full Demo
stepName: Run and monitor WIN32-MSVC Full Demo - Win32
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/WIN32-MSVC/Win32/Debug/RTOSDemo.exe
timeout-seconds: 60
success-line: "No errors - tick count"
retry-attempts: 3
- env:
stepName: Run and monitor WIN32-MSVC Full Demo - x64
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/WIN32-MSVC/Debug/RTOSDemo.exe
exe-path: FreeRTOS/Demo/WIN32-MSVC/x64/Debug/RTOSDemo.exe
timeout-seconds: 60
success-line: "No errors - tick count"
retry-attempts: 3
@ -93,7 +104,8 @@ jobs:
$content = Get-Content -Path 'main.c' -Raw
$newContent = $content -replace '#define\s+mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\s+0', '#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1'
$newContent | Set-Content -Path 'main.c'
msbuild WIN32.sln -t:rebuild
msbuild WIN32.sln /p:Platform=Win32 -t:rebuild
msbuild WIN32.sln /p:Platform=x64 -t:rebuild
echo "::endgroup::"
$exitStatus = $?
if($exitStatus -eq 1) {
@ -104,11 +116,21 @@ jobs:
}
- env:
stepName: Run and monitor WIN32-MSVC Blinky Demo
stepName: Run and monitor WIN32-MSVC Blinky Demo - Win32
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/WIN32-MSVC/Win32/Debug/RTOSDemo.exe
timeout-seconds: 60
success-line: "Message received from software timer"
retry-attempts: 3
- env:
stepName: Run and monitor WIN32-MSVC Blinky Demo - x64
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/WIN32-MSVC/Debug/RTOSDemo.exe
exe-path: FreeRTOS/Demo/WIN32-MSVC/x64/Debug/RTOSDemo.exe
timeout-seconds: 60
success-line: "Message received from software timer"
retry-attempts: 3

@ -220,4 +220,7 @@ extern void vAssertCalled( const char * const pcFileName,
/* The UDP port to which print messages are sent. */
#define configPRINT_PORT ( 15000 )
/* Use kernel provided static memory for timer and idle tasks. */
#define configKERNEL_PROVIDED_STATIC_MEMORY 1
#endif /* FREERTOS_CONFIG_H */

@ -83,12 +83,6 @@ void vApplicationIdleHook( void );
void vApplicationStackOverflowHook( TaskHandle_t pxTask,
char * pcTaskName );
void vApplicationTickHook( void );
void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
StackType_t ** ppxIdleTaskStackBuffer,
uint32_t * pulIdleTaskStackSize );
void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
StackType_t ** ppxTimerTaskStackBuffer,
uint32_t * pulTimerTaskStackSize );
/*
* Writes trace data to a disk file when the trace recording is stopped.
@ -322,58 +316,6 @@ static void prvSaveTraceFile( void )
}
/*-----------------------------------------------------------*/
/* configUSE_STATIC_ALLOCATION is set to 1, so the application must provide an
* implementation of vApplicationGetIdleTaskMemory() to provide the memory that is
* used by the Idle task. */
void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
StackType_t ** ppxIdleTaskStackBuffer,
uint32_t * pulIdleTaskStackSize )
{
/* If the buffers to be provided to the Idle task are declared inside this
* function then they must be declared static - otherwise they will be allocated on
* the stack and so not exists after this function exits. */
static StaticTask_t xIdleTaskTCB;
static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ];
/* Pass out a pointer to the StaticTask_t structure in which the Idle task's
* state will be stored. */
*ppxIdleTaskTCBBuffer = &xIdleTaskTCB;
/* Pass out the array that will be used as the Idle task's stack. */
*ppxIdleTaskStackBuffer = uxIdleTaskStack;
/* Pass out the size of the array pointed to by *ppxIdleTaskStackBuffer.
* Note that, as the array is necessarily of type StackType_t,
* configMINIMAL_STACK_SIZE is specified in words, not bytes. */
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
}
/*-----------------------------------------------------------*/
/* configUSE_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the
* application must provide an implementation of vApplicationGetTimerTaskMemory()
* to provide the memory that is used by the Timer service task. */
void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
StackType_t ** ppxTimerTaskStackBuffer,
uint32_t * pulTimerTaskStackSize )
{
/* If the buffers to be provided to the Timer task are declared inside this
* function then they must be declared static - otherwise they will be allocated on
* the stack and so not exists after this function exits. */
static StaticTask_t xTimerTaskTCB;
/* Pass out a pointer to the StaticTask_t structure in which the Timer
* task's state will be stored. */
*ppxTimerTaskTCBBuffer = &xTimerTaskTCB;
/* Pass out the array that will be used as the Timer task's stack. */
*ppxTimerTaskStackBuffer = uxTimerTaskStack;
/* Pass out the size of the array pointed to by *ppxTimerTaskStackBuffer.
* Note that, as the array is necessarily of type StackType_t,
* configMINIMAL_STACK_SIZE is specified in words, not bytes. */
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
}
static uint32_t ulEntryTime = 0U;
void vTraceTimerReset( void )
@ -390,3 +332,5 @@ uint32_t uiTraceTimerGetValue( void )
{
return( xTaskGetTickCount() - ulEntryTime );
}
/*-----------------------------------------------------------*/

@ -46,7 +46,7 @@
#define configUSE_DAEMON_TASK_STARTUP_HOOK 1
#define configTICK_RATE_HZ ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 49 * 1024 ) ) /* This demo tests heap_5 so places multiple blocks within this total heap size. See mainREGION_1_SIZE to mainREGION_3_SIZE definitions in main.c. */
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 490 * 1024 ) ) /* This demo tests heap_5 so places multiple blocks within this total heap size. See mainREGION_1_SIZE to mainREGION_3_SIZE definitions in main.c. */
#define configMAX_TASK_NAME_LEN ( 12 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0

@ -1,16 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.34114.132
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RTOSDemo", "WIN32.vcxproj", "{C686325E-3261-42F7-AEB1-DDE5280E1CEB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|Win32.ActiveCfg = Debug|Win32
{C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|Win32.Build.0 = Debug|Win32
{C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|x64.ActiveCfg = Debug|x64
{C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|x64.Build.0 = Debug|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -5,17 +5,22 @@
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{C686325E-3261-42F7-AEB1-DDE5280E1CEB}</ProjectGuid>
<ProjectName>RTOSDemo</ProjectName>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -27,8 +32,8 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@ -43,10 +48,6 @@
<PreprocessorDefinitions>WIN32;WIN32_LEAN_AND_MEAN;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0601;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderOutputFile>.\Debug/WIN32.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
<ObjectFileName>.\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
@ -59,10 +60,9 @@
<Culture>0x0c09</Culture>
</ResourceCompile>
<Link>
<OutputFile>.\Debug/RTOSDemo.exe</OutputFile>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>.\Debug/WIN32.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
@ -73,6 +73,11 @@
<OutputFile>.\Debug/WIN32.bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\Source\include;..\..\Source\portable\MSVC-MingW;..\Common\Include;..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-Trace\kernelports\FreeRTOS;..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-Trace\kernelports\FreeRTOS\include;..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-Trace\include;.\Trace_Recorder_Configuration;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-Trace\kernelports\FreeRTOS\trcKernelPort.c" />
<ClCompile Include="..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-Trace\trcSnapshotRecorder.c" />

@ -225,6 +225,9 @@
<ClInclude Include="..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-Trace\Include\trcRecorder.h">
<Filter>Demo App Source\FreeRTOS+Trace Recorder\include</Filter>
</ClInclude>
<ClInclude Include="..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-Trace\Include\trcKernelPort.h">
<Filter>Configuration Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />

@ -86,9 +86,9 @@
* as this demo could easily create one large heap region instead of multiple
* smaller heap regions - in which case heap_4.c would be the more appropriate
* choice. See http://www.freertos.org/a00111.html for an explanation. */
#define mainREGION_1_SIZE 8201
#define mainREGION_2_SIZE 23905
#define mainREGION_3_SIZE 16807
#define mainREGION_1_SIZE 82010
#define mainREGION_2_SIZE 239050
#define mainREGION_3_SIZE 168070
/* This demo allows for users to perform actions with the keyboard. */
#define mainNO_KEY_PRESS_VALUE -1
@ -149,7 +149,7 @@ static void prvSaveTraceFile( void );
* FreeRTOS simulator. This thread passes data safely into the FreeRTOS
* simulator using a stream buffer.
*/
static DWORD WINAPI prvWindowsKeyboardInputThread( void * pvParam );
static int32_t WINAPI prvWindowsKeyboardInputThread( void * pvParam );
/*
* Interrupt handler for when keyboard input is received.
@ -349,12 +349,7 @@ void vAssertCalled( unsigned long ulLine,
* value. */
while( ulSetToNonZeroInDebuggerToContinue == 0 )
{
__asm {
NOP
};
__asm {
NOP
};
__nop();
}
/* Re-enable the trace recording. */
@ -422,7 +417,7 @@ static void prvInitialiseHeap( void )
* used by the Idle task. */
void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
StackType_t ** ppxIdleTaskStackBuffer,
uint32_t * pulIdleTaskStackSize )
configSTACK_DEPTH_TYPE * pulIdleTaskStackSize )
{
/* If the buffers to be provided to the Idle task are declared inside this
* function then they must be declared static - otherwise they will be allocated on
@ -514,7 +509,7 @@ static uint32_t prvKeyboardInterruptHandler( void )
* FreeRTOS simulator. This thread passes data into the simulator using
* an integer.
*/
static DWORD WINAPI prvWindowsKeyboardInputThread( void * pvParam )
static int32_t WINAPI prvWindowsKeyboardInputThread( void * pvParam )
{
( void ) pvParam;

@ -1 +1 @@
Subproject commit 8e664fc9844e03cc839074aff933fc9b79842d9c
Subproject commit 14dd5b503afc7d9ed88ee9483d586d88d71d20c0

@ -5,7 +5,7 @@ license: "MIT"
dependencies:
- name: "FreeRTOS-Kernel"
version: "8e664fc98"
version: "14dd5b503"
repository:
type: "git"
url: "https://github.com/FreeRTOS/FreeRTOS-Kernel.git"

Loading…
Cancel
Save