Skip to content

Commit f6d445c

Browse files
committed
sim preset startup default, remove CMakeSettings.json
1 parent aaa31d1 commit f6d445c

File tree

6 files changed

+105
-21
lines changed

6 files changed

+105
-21
lines changed

.gitignore

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ tools/squashelf/**
134134

135135
# Generated configuration files
136136
.config
137-
.vs
138137
*.filters
139138
*.user
140139

@@ -270,13 +269,17 @@ language.settings.xml
270269
*.bak
271270

272271
# Any Visual Studio / VisualGDB
273-
/**/.vs
274-
/**/.visualgdb/*
272+
/**/.vs/**
273+
/**/.visualgdb/**
274+
275+
# --- Whitelist specific files in the *root* .vs folder ---
276+
# Allow Git to descend into the root .vs directory
277+
!/.vs/
275278

276279
# Defaults are set in files otherwise excluded:
277-
!/.vs/README.md
278-
!/.vs/VSWorkspaceState.json
279-
!/.vs/VSWorkspaceSettings.json
280+
!**/.vs/README.md
281+
!**/.vs/VSWorkspaceSettings.json
282+
280283

281284
# Any build directories
282285
/**/build

.vs/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Visual Studio Workspace Files
2+
3+
Normally excludes from source control, but here for a Visual Studio CMake project workaround:
4+
5+
## VSWorkspaceSettings.json
6+
7+
Without the `ExcludedItems` listed in this file, Visual Studio tries top be "helpful"
8+
and set the default startup item to some project file found in the directory tree. This is undesired.

.vs/VSWorkspaceSettings.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"Description": "Items to exclude from Debug Targets",
3+
"ExcludedItems": [
4+
"tools/keytools/**",
5+
"tools/keytools/**/*.sln",
6+
"tools/keytools/**/*.vcxproj",
7+
"tools/keytools/**/*.vcxproj.filters",
8+
"tools/keytools/**/*.vcxproj.user",
9+
"tools/keytools/**/*.csproj",
10+
"tools/keytools/**/*.csproj.filters",
11+
"tools/keytools/**/*.csproj.user",
12+
13+
"lib/wolfssl/**",
14+
"lib/wolfssl/wrapper/CSharp/**",
15+
"lib/wolfssl/**/*.sln",
16+
"lib/wolfssl/**/*.vcxproj",
17+
"lib/wolfssl/**/*.vcxproj.filters",
18+
"lib/wolfssl/**/*.vcxproj.user",
19+
"lib/wolfssl/**/*.csproj",
20+
"lib/wolfssl/**/*.csproj.filters",
21+
"lib/wolfssl/**/*.csproj.user",
22+
23+
"lib/wolfssl/**/*.sln",
24+
"lib/wolfssl/**/*.vcxproj",
25+
"lib/wolfssl/**/*.vcxproj.filters",
26+
"lib/wolfssl/**/*.vcxproj.user",
27+
"lib/wolfssl/**/*.csproj",
28+
"lib/wolfssl/**/*.csproj.filters",
29+
"lib/wolfssl/**/*.csproj.user",
30+
31+
"lib/wolfPKCS11/**",
32+
"lib/wolfPKCS11/**/*.sln",
33+
"lib/wolfPKCS11/**/*.vcxproj",
34+
"lib/wolfPKCS11/**/*.vcxproj.filters",
35+
"lib/wolfPKCS11/**/*.vcxproj.user",
36+
"lib/wolfPKCS11/**/*.csproj",
37+
"lib/wolfPKCS11/**/*.csproj.filters",
38+
"lib/wolfPKCS11/**/*.csproj.user",
39+
40+
"lib/wolfTPM/**",
41+
"lib/wolfTPM/**/*.sln",
42+
"lib/wolfTPM/**/*.vcxproj",
43+
"lib/wolfTPM/**/*.vcxproj.filters",
44+
"lib/wolfTPM/**/*.vcxproj.user",
45+
"lib/wolfTPM/**/*.csproj",
46+
"lib/wolfTPM/**/*.csproj.filters",
47+
"lib/wolfTPM/**/*.csproj.user"
48+
]
49+
}

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ endif()
8484
project(wolfBoot)
8585
#---------------------------------------------------------------------------------------------
8686
#---------------------------------------------------------------------------------------------
87+
88+
# Simulator target is POSIX-only (uses sys/mman.h, etc.)
89+
if(MSVC AND (DEFINED WOLFBOOT_TARGET) AND (WOLFBOOT_TARGET STREQUAL "sim"))
90+
message(FATAL_ERROR "TARGET_sim is POSIX-only. Use a device preset (e.g. stm32h7) or build the sim on Linux/WSL/MinGW.")
91+
endif()
92+
93+
8794
include(cmake/functions.cmake)
8895
include(cmake/utils.cmake)
8996

CMakePresets.json

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,29 @@
66
"patch": 0
77
},
88
"configurePresets": [
9-
{
9+
{
10+
"name": "sim",
11+
"displayName": "~No config selected",
12+
"generator": "Ninja",
13+
"cacheVariables": {
14+
"SIGN": "ED25519",
15+
"HASH": "SHA256",
16+
"WOLFBOOT_TARGET": "sim",
17+
"WOLFBOOT_SECTOR_SIZE": "256",
18+
"WOLFBOOT_CONFIG_MODE": "preset",
19+
"WOLFBOOT_HAS_BASE_PRESET": true,
20+
"ARCH": "HOST",
21+
"SPMATH": "ON",
22+
"DISABLE_BACKUP": "OFF",
23+
"NVM_FLASH_WRITEONCE": "ON",
24+
"BUILD_TEST_APPS": "ON",
25+
"WOLFBOOT_PARTITION_BOOT_ADDRESS": "0x08003000",
26+
"WOLFBOOT_PARTITION_UPDATE_ADDRESS": "0x08009400",
27+
"WOLFBOOT_PARTITION_SWAP_ADDRESS": "0x0800F800",
28+
"WOLFBOOT_PARTITION_SIZE": "0x6400"
29+
}
30+
},
31+
{
1032
"name": "sign_hash_config",
1133
"cacheVariables": {
1234
"SIGN": "ED25519",
@@ -254,6 +276,15 @@
254276
}
255277
],
256278
"buildPresets": [
279+
{
280+
"name": "~No config (wolfBoot sim)",
281+
"configurePreset": "sim",
282+
"jobs": 4,
283+
"verbose": true,
284+
"targets": [
285+
"all"
286+
]
287+
},
257288
{
258289
"name": "vs-debug-trace",
259290
"configurePreset": "vs-debug-trace",

CMakeSettings.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)