Przeglądaj źródła

VSCode project.

Vladimir N. Shilov 2 lat temu
rodzic
commit
8db18766c8
4 zmienionych plików z 278 dodań i 0 usunięć
  1. 112 0
      .vscode/c_cpp_properties.json
  2. 51 0
      .vscode/launch.json
  3. 86 0
      .vscode/tasks.json
  4. 29 0
      sming.code-workspace

+ 112 - 0
.vscode/c_cpp_properties.json

@@ -0,0 +1,112 @@
+{
+    "env": {},
+    "configurations": [
+        {
+            "name": "Wall Segment Clock",
+            "includePath": [
+                "${workspaceRoot}/include",
+                "C:/ESP/Sming/Sming/Components",
+                "C:/ESP/Sming/Sming/System/include",
+                "C:/ESP/Sming/Sming/Wiring",
+                "C:/ESP/Sming/Sming/Core",
+                "C:/ESP/Sming/Sming",
+                "C:/ESP/Sming/Sming/Components/Storage/src/include",
+                "C:/ESP/Sming/Sming/Arch/Esp8266",
+                "C:/ESP/Sming/Sming/Arch/Esp8266/Core",
+                "C:/ESP/Sming/Sming/Arch/Esp8266/Components",
+                "C:/ESP/Sming/Sming/Arch/Esp8266/Components/libc/include",
+                "C:/ESP/Sming/Sming/Components/rboot/rboot",
+                "C:/ESP/Sming/Sming/Components/rboot/rboot/appcode",
+                "C:/ESP/Sming/Sming/Components/rboot/include",
+                "C:/ESP/Sming/Sming/Arch/Esp8266/Components/esp8266/include",
+                "C:/ESP/Sming/Sming/Arch/Esp8266/Components/esp8266",
+                "C:/ESP/Sming/Sming/Arch/Esp8266/Components/driver/include",
+                "C:/ESP/Sming/Sming/Components/arch_driver/src/include",
+                "C:/ESP/Sming/Sming/Arch/Esp8266/Components/gdbstub",
+                "C:/ESP/Sming/Sming/Arch/Esp8266/Components/driver",
+                "C:/ESP/esp-quick-toolchain/xtensa-lx106-elf/include",
+                "C:/ESP/Sming/Sming/Arch/Esp8266/Components/spi_flash/include",
+                "C:/ESP/Sming/Sming/Arch/Esp8266/Components/esp_wifi/include",
+                "C:/ESP/Sming/Sming/Components/FlashString/src/include",
+                "C:/ESP/Sming/Sming/Libraries/Spiffs/src/include",
+                "C:/ESP/Sming/Sming/Components/IFS/src/include",
+                "C:/ESP/Sming/Sming/Libraries/SPI/src",
+                "C:/ESP/Sming/Sming/Libraries/SPI/src/Arch/Esp8266",
+                "C:/ESP/Sming/Sming/Components/Network/src",
+                "C:/ESP/Sming/Sming/Components/ssl/include",
+                "C:/ESP/Sming/Sming/Components/crypto/include",
+                "C:/ESP/Sming/Sming/Arch/Esp8266/Components/esp-open-lwip/esp-open-lwip/include",
+                "C:/ESP/Sming/Sming/Libraries/ArduinoJson6/include",
+                "C:/ESP/Sming/Sming/Libraries/ArduinoJson6/ArduinoJson/src"
+            ],
+            "defines": [
+                "ARCH_ESP8266=1"
+            ],
+            "compilerPath": "${env:ESP_HOME}/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++.exe",
+            "cStandard": "c11",
+            "cppStandard": "c++17",
+            "intelliSenseMode": "gcc-x86",
+            "compilerArgs": [
+                "-DCOM_SPEED_SERIAL=115200",
+                "-DSERIAL_BAUD_RATE=115200",
+                "-DRBOOT_INTEGRATION",
+                "-DGDBSTUB_GDB_PATCHED=0",
+                "-DSMING_ARCH=Esp8266",
+                "-DSMING_SOC=esp8266",
+                "-DPROJECT_DIR=\\\"/c/ESP/Sming/samples/MeteoControl\\\"",
+                "-DSMING_HOME=\\\"/C/ESP/Sming/Sming\\\"",
+                "-D${SMING_SOC_VAR}=1",
+                "-DENABLE_CMD_EXECUTOR=1",
+                "-DDEBUG_PRINT_FILENAME_AND_LINE=0",
+                "-DCUST_FILE_BASE=$*",
+                "-DDEBUG_VERBOSE_LEVEL=2",
+                "-DSTRING_OBJECT_SIZE=12",
+                "-DUSE_US_TIMER",
+                "-DHTTP_SERVER_EXPOSE_NAME=1",
+                "-DHTTP_SERVER_EXPOSE_VERSION=0"
+            ],
+            "configurationProvider": "ms-vscode.makefile-tools",
+            "browse": {
+                "path": [
+                    "${workspaceRoot}/include",
+                    "${env:SMING_HOME}/Components",
+                    "${env:SMING_HOME}/System/include",
+                    "${env:SMING_HOME}/Wiring",
+                    "${env:SMING_HOME}/Core",
+                    "${env:SMING_HOME}",
+                    "${env:SMING_HOME}/Components/Storage/src/include",
+                    "${env:SMING_HOME}/Arch/Esp8266",
+                    "${env:SMING_HOME}/Arch/Esp8266/Core",
+                    "${env:SMING_HOME}/Arch/Esp8266/Components",
+                    "${env:SMING_HOME}/Arch/Esp8266/Components/libc/include",
+                    "${env:SMING_HOME}/Components/rboot/rboot",
+                    "${env:SMING_HOME}/Components/rboot/rboot/appcode",
+                    "${env:SMING_HOME}/Components/rboot/include",
+                    "${env:SMING_HOME}/Arch/Esp8266/Components/esp8266/include",
+                    "${env:SMING_HOME}/Arch/Esp8266/Components/esp8266",
+                    "${env:SMING_HOME}/Arch/Esp8266/Components/driver/include",
+                    "${env:SMING_HOME}/Components/arch_driver/src/include",
+                    "${env:SMING_HOME}/Arch/Esp8266/Components/gdbstub",
+                    "${env:SMING_HOME}/Arch/Esp8266/Components/driver",
+                    "${env:ESP_HOME}/xtensa-lx106-elf/include",
+                    "${env:SMING_HOME}/Arch/Esp8266/Components/spi_flash/include",
+                    "${env:SMING_HOME}/Arch/Esp8266/Components/esp_wifi/include",
+                    "${env:SMING_HOME}/Components/FlashString/src/include",
+                    "${env:SMING_HOME}/Libraries/Spiffs/src/include",
+                    "${env:SMING_HOME}/Components/IFS/src/include",
+                    "${env:SMING_HOME}/Libraries/SPI/src",
+                    "${env:SMING_HOME}/Libraries/SPI/src/Arch/Esp8266",
+                    "${env:SMING_HOME}/Components/Network/src",
+                    "${env:SMING_HOME}/Components/ssl/include",
+                    "${env:SMING_HOME}/Components/crypto/include",
+                    "${env:SMING_HOME}/Arch/Esp8266/Components/esp-open-lwip/esp-open-lwip/include",
+                    "${env:SMING_HOME}/Libraries/ArduinoJson6/include",
+                    "${env:SMING_HOME}/Libraries/ArduinoJson6/ArduinoJson/src"
+                ],
+                "limitSymbolsToIncludedHeaders": true,
+                "databaseFilename": "${workspaceRoot}/.vscode/browse.vc.db"
+            }
+        }
+    ],
+    "version": 4
+}

+ 51 - 0
.vscode/launch.json

@@ -0,0 +1,51 @@
+{
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Esp32 GDB",
+            "type": "cppdbg",
+            "request": "launch",
+            "program": "",
+            "args": [],
+            "stopAtEntry": true,
+            "cwd": "${workspaceFolder}",
+            "environment": [],
+            "externalConsole": true,
+            "MIMode": "gdb"
+        },
+        {
+            "name": "Host GDB",
+            "type": "cppdbg",
+            "request": "launch",
+            "program": "",
+            "args": [],
+            "stopAtEntry": true,
+            "cwd": "${workspaceFolder}",
+            "environment": [],
+            "externalConsole": false,
+            "MIMode": "gdb",
+            "setupCommands": [
+                {
+                    "description": "Enable pretty-printing for gdb",
+                    "text": "-enable-pretty-printing",
+                    "ignoreFailures": true
+                }
+            ]
+        },
+        {
+            "name": "Esp8266 GDB",
+            "type": "cppdbg",
+            "request": "launch",
+            "program": "${workspaceFolder}/out/Esp8266/release/build/app_0.out",
+            "args": [],
+            "stopAtEntry": true,
+            "cwd": "${workspaceFolder}",
+            "environment": [],
+            "externalConsole": true,
+            "MIMode": "gdb",
+            "miDebuggerPath": "${env:ESP_HOME}/xtensa-lx106-elf/bin/xtensa-lx106-elf-gdb.exe",
+            "miDebuggerServerAddress": "COM3",
+            "miDebuggerArgs": "-x ${env:SMING_HOME}/Arch/Esp8266/Components/gdbstub/gdbcmds -b 115200"
+        }
+    ]
+}

+ 86 - 0
.vscode/tasks.json

@@ -0,0 +1,86 @@
+{
+    "version": "2.0.0",
+    "presentation": {
+        "echo": true,
+        "reveal": "always",
+        "focus": true,
+        "panel": "shared",
+        "showReuseMessage": true,
+        "clear": false
+    },
+    "tasks": [
+        {
+            "label": "Build",
+            "detail": "Normal build",
+            "type": "shell",
+            "command": "make -j SMING_ARCH=${command:cpptools.activeConfigName}",
+            "problemMatcher": [],
+            "group": {
+                "kind": "build",
+                "isDefault": true
+            }
+        },
+        {
+            "label": "Full rebuild (no debugging)",
+            "detail": "Rebuild application and all Components",
+            "type": "shell",
+            "command": "make -j ENABLE_GDB=",
+            "dependsOn": [
+                "Full clean"
+            ],
+            "problemMatcher": []
+        },
+        {
+            "label": "Full rebuild (with debugging)",
+            "detail": "Rebuild application and all Components",
+            "type": "shell",
+            "command": "make -j ENABLE_GDB=1",
+            "dependsOn": [
+                "Full clean"
+            ],
+            "problemMatcher": []
+        },
+        {
+            "label": "flash",
+            "detail": "Write all partitions to device",
+            "type": "shell",
+            "command": "make flash SMING_ARCH=${command:cpptools.activeConfigName}",
+            "problemMatcher": []
+        },
+        {
+            "label": "run",
+            "detail": "Run application for Host",
+            "type": "shell",
+            "command": "make -j run SMING_ARCH=Host",
+            "problemMatcher": []
+        },
+        {
+            "label": "Flash and Run",
+            "detail": "Build, flash and run application for Host",
+            "type": "shell",
+            "command": "make -j flash run SMING_ARCH=Host",
+            "problemMatcher": []
+        },
+        {
+            "label": "clean",
+            "detail": "Clean just the application",
+            "type": "shell",
+            "command": "make clean SMING_ARCH=${command:cpptools.activeConfigName}",
+            "problemMatcher": []
+        },
+        {
+            "label": "Full clean",
+            "detail": "Clean application and all Components",
+            "type": "shell",
+            "command": "make clean components-clean SMING_ARCH=${command:cpptools.activeConfigName}",
+            "problemMatcher": []
+        },
+        {
+            "label": "Distribution Clean",
+            "detail": "Cleans application, all components and re-initialises all submodules",
+            "type": "shell",
+            "command": "make dist-clean",
+            "problemMatcher": []
+        }
+    ]
+}

+ 29 - 0
sming.code-workspace

@@ -0,0 +1,29 @@
+{
+    "folders": [
+        {
+            "path": "."
+        }
+    ],
+    "settings": {
+        "terminal.integrated.defaultProfile.windows": "Command Prompt",
+        "files.associations": {
+            "*.hw": "jsonc",
+            "*.fwfs": "jsonc",
+            "optional": "cpp"
+        },
+        "json.schemas": [
+            {
+                "fileMatch": [
+                    "*.hw"
+                ],
+                "url": "file:///C/ESP/Sming/Sming/Components/Storage/schema.json"
+            },
+            {
+                "fileMatch": [
+                    "*.fwfs"
+                ],
+                "url": "file:///C/ESP/Sming/Sming/Components/IFS/fsbuild/schema.json"
+            }
+        ]
+    }
+}