Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)

# Set up the project
project(filex
LANGUAGES C ASM
LANGUAGES C
)


Expand Down
2 changes: 0 additions & 2 deletions common/src/fx_utility_logical_sector_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ UCHAR cache_found = FX_FALSE;
return(FX_SECTOR_INVALID);
}

/* Just write the buffer to the media. */

#ifndef FX_MEDIA_STATISTICS_DISABLE

/* Increment the number of driver write sector(s) requests. */
Expand Down
10 changes: 10 additions & 0 deletions ports/win64/vs_2022/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
target_sources(${PROJECT_NAME} PRIVATE
# {{BEGIN_TARGET_SOURCES}}

# {{END_TARGET_SOURCES}}
)

target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_LIST_DIR}/inc
)
368 changes: 368 additions & 0 deletions ports/win64/vs_2022/inc/fx_port.h

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions scripts/build_fx.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[CmdletBinding()]
param(
[ValidateSet('win64', 'win32')]
[string]$Arch = 'win64',

[AllowNull()]
[object]$Configuration = 'all',

[int]$Parallel = [Math]::Max(1, [Environment]::ProcessorCount),

[int]$BuildTimeoutSeconds = 120,

[string]$BuildDir,

[string]$ThreadXDir,

[switch]$Clean
)

$ErrorActionPreference = 'Stop'
. (Join-Path $PSScriptRoot 'fx_windows_common.ps1')

$repoRoot = Split-Path -Parent $PSScriptRoot
$settings = Get-PortSettings -SelectedArch $Arch

if (-not $BuildDir) {
$BuildDir = Join-Path $repoRoot "build\tests\$Arch"
}

if (-not $ThreadXDir) {
$ThreadXDir = Join-Path (Split-Path -Parent $repoRoot) 'threadx-fd-codex'
}

$selectedConfigurations = Resolve-RegressionConfigurations -RequestedConfigurations $Configuration
Write-Host "Selected configurations: $($selectedConfigurations -join ', ')"

Enter-VisualStudioDevShell -VsArch $settings.VsArch

foreach ($currentConfiguration in $selectedConfigurations) {
$currentBuildDirName = Get-RegressionBuildDirectoryName -ConfigurationName $currentConfiguration
$currentBuildDir = Join-Path $BuildDir $currentBuildDirName

if ($Clean) {
Remove-BuildDirectory -Path $currentBuildDir -RepoRoot $repoRoot
}

Remove-NinjaLock -Path $currentBuildDir

Write-Host "Configuring $Arch / $currentConfiguration"
Invoke-NativeCommand -FilePath 'cmake' -Arguments @(
'-S', (Join-Path $repoRoot 'test\cmake'),
'-B', $currentBuildDir,
'-G', 'Ninja',
'-DCMAKE_C_COMPILER_FORCED=TRUE',
'-DCMAKE_C_COMPILER_WORKS=TRUE',
'-DCMAKE_C_ABI_COMPILED=TRUE',
# FileX's root CMakeLists.txt declares LANGUAGES C ASM; suppress the
# ASM compiler probe because the win64 port has no assembly sources.
'-DCMAKE_ASM_COMPILER_FORCED=TRUE',
'-DCMAKE_ASM_COMPILER_WORKS=TRUE',
"-DCMAKE_BUILD_TYPE=$currentConfiguration",
"-DTHREADX_ARCH=$($settings.FileXArch)",
"-DTHREADX_TOOLCHAIN=$($settings.FileXToolchain)",
"-DTHREADX_SOURCE_DIR=$ThreadXDir"
)

Write-Host "Building $Arch / $currentConfiguration"
Invoke-CMakeBuild -BuildDir $currentBuildDir -Parallel $Parallel -TimeoutSeconds $BuildTimeoutSeconds
}
Loading
Loading