Skip to content

Commit 52dcb87

Browse files
committed
Added a example for c_cpp_properties.json + updated postcreate for dev containers
1 parent 4c37473 commit 52dcb87

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

.devcontainer/postcreate.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,6 @@ done
4545
cd ../klib/
4646

4747
echo "Copying example settings.json"
48-
cp .vscode/settings.json.example .vscode/settings.json
48+
cp .vscode/settings.json.example .vscode/settings.json
49+
cp .vscode/launch.json.example .vscode/launch.json
50+
cp .vscode/c_cpp_properties.json.example .vscode/c_cpp_properties.json
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "gcc-arm",
5+
"includePath": [
6+
"${workspaceFolder}",
7+
"${workspaceFolder}/targets/arm",
8+
"${workspaceFolder}/klib",
9+
"${workspaceFolder}/targets/chip/${config:target_cpu}"
10+
],
11+
"defines": [
12+
"_DEBUG",
13+
"UNICODE",
14+
"_UNICODE",
15+
"TARGET_CPU=${config:target_cpu}",
16+
"KLIB_IRQ=irq_ram",
17+
"KLIB_DEFAULT_COUT=rtt"
18+
],
19+
// "compilerPath": "COMPILER_PATH",
20+
"cStandard": "c17",
21+
"cppStandard": "c++23",
22+
"configurationProvider": "ms-vscode.cmake-tools",
23+
"intelliSenseMode": "gcc-arm"
24+
}
25+
],
26+
"version": 4
27+
}

.vscode/launch.json.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"type": "cortex-debug",
1515
"runToEntryPoint": "main",
1616
"servertype": "jlink",
17-
"armToolchainPath": "TOOLCHAIN_PATH",
17+
// "armToolchainPath": "TOOLCHAIN_PATH",
1818
"rttConfig": {
1919
"enabled": true,
2020
"address": "auto",
@@ -36,7 +36,7 @@
3636
"request": "attach",
3737
"type": "cortex-debug",
3838
"servertype": "jlink",
39-
"armToolchainPath": "TOOLCHAIN_PATH",
39+
// "armToolchainPath": "TOOLCHAIN_PATH",
4040
"rttConfig": {
4141
"enabled": true,
4242
"address": "auto",

0 commit comments

Comments
 (0)