diff --git a/config-examples/README.md b/config-examples/README.md new file mode 100644 index 0000000..3e7d1ba --- /dev/null +++ b/config-examples/README.md @@ -0,0 +1,11 @@ +* zebra/: zebra based configuration + + Copy all of these into components/zebra_mini/.vscode + + Currently I checked only build and local debug + +* appcloud/: appcloud based configuration + + Copy these into third-parties/appcloud/.vscode + + Should be more or less workable diff --git a/config-examples/appcloud/c_cpp_properties.json b/config-examples/appcloud/c_cpp_properties.json new file mode 100644 index 0000000..1e58746 --- /dev/null +++ b/config-examples/appcloud/c_cpp_properties.json @@ -0,0 +1,79 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**", + "${workspaceFolder}/app/src/**", + "${env:zmk.bundleDir}/appcloud_sdk/include", + "${env:zmk.bundleDir}/bitsery/include", + "${env:zmk.bundleDir}/boost-1.69/include", + "${env:zmk.bundleDir}/breakpad/include", + "${env:zmk.bundleDir}/breakpad_host/include", + "${env:zmk.bundleDir}/cares-1.12.0/include", + "${env:zmk.bundleDir}/carousels/include", + "${env:zmk.bundleDir}/chrtrsi-0.1/include", + "${env:zmk.bundleDir}/common_runtime/include", + "${env:zmk.bundleDir}/common_utils/include", + "${env:zmk.bundleDir}/cpsl/include", + "${env:zmk.bundleDir}/crt_protocol/include", + "${env:zmk.bundleDir}/dcdparser-0.1/include", + "${env:zmk.bundleDir}/disk_mgr/include", + "${env:zmk.bundleDir}/disk_storage/include", + "${env:zmk.bundleDir}/dom/include", + "${env:zmk.bundleDir}/dom_message/include", + "${env:zmk.bundleDir}/dvbs/include", + "${env:zmk.bundleDir}/dvbs-server/include", + "${env:zmk.bundleDir}/eudev-4/include", + "${env:zmk.bundleDir}/ffmpeg-4.0.1/include", + "${env:zmk.bundleDir}/firmware_updater/include", + "${env:zmk.bundleDir}/freetype-2.5.5/include", + "${env:zmk.bundleDir}/fuse-2.9.7/include", + "${env:zmk.bundleDir}/glib-2.52.3/include", + "${env:zmk.bundleDir}/gtest-1.10.0/include", + "${env:zmk.bundleDir}/ipc/include", + "${env:zmk.bundleDir}/jansson-2.11/include", + "${env:zmk.bundleDir}/json-c-0.12.1/include", + "${env:zmk.bundleDir}/libatasmart-0.19/include", + "${env:zmk.bundleDir}/libcurl-7.68.0/include", + "${env:zmk.bundleDir}/libev-4.33/include", + "${env:zmk.bundleDir}/libffi-3.2.1/include", + "${env:zmk.bundleDir}/libjpeg-8d/include", + "${env:zmk.bundleDir}/libmessage_bus/include", + "${env:zmk.bundleDir}/libopus-1.3.1/include", + "${env:zmk.bundleDir}/libpng-1.5.10/include", + "${env:zmk.bundleDir}/libservicectl/include", + "${env:zmk.bundleDir}/libubox-1.0/include", + "${env:zmk.bundleDir}/libuuid-1.0.3/include", + "${env:zmk.bundleDir}/libwebp-1.0.3/include", + "${env:zmk.bundleDir}/libxml2-2.9.6/include", + "${env:zmk.bundleDir}/libyaml-0.1.6/include", + "${env:zmk.bundleDir}/microxml-1.0/include", + "${env:zmk.bundleDir}/mms-0.1/include", + "${env:zmk.bundleDir}/nanomsg-1.1.4/include", + "${env:zmk.bundleDir}/net-snmp-5.7.3/include", + "${env:zmk.bundleDir}/protobuf_host-2.5.0/include", + "${env:zmk.bundleDir}/protobuf_static-2.5.0/include", + "${env:zmk.bundleDir}/serviced_message/include", + "${env:zmk.bundleDir}/span-cpp20/include", + "${env:zmk.bundleDir}/ubus-1.0/include", + "${env:zmk.bundleDir}/uriparser-0.8.5/include", + "${env:zmk.bundleDir}/util-linux-2.34/include", + "${env:zmk.bundleDir}/wvcdm_wrapper/include", + "${env:zmk.bundleDir}/zlib-1.2.11/include", + "${env:zmk.bundleDir}/ztl/include" + ], + "defines": [ + "WITHOUT_TRACE_EVENT", + "ZM_APP_CONTROLLER_CLIENT", + "ZM_WIDEVINE_ENABLED", + "Z_BUILD_VARIANT=\"dev\"" + ], + "compilerPath": "/usr/bin/clang", + "cStandard": "c11", + "cppStandard": "c++17", + "intelliSenseMode": "clang-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/config-examples/appcloud/launch.json b/config-examples/appcloud/launch.json new file mode 100644 index 0000000..c77e846 --- /dev/null +++ b/config-examples/appcloud/launch.json @@ -0,0 +1,82 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "(gdb) Remote", + "type": "cppdbg", + "request": "launch", + // "preLaunchTask": "make", + "program": "${command:extension.zmkGetBuildDir}/obj/third-parties/appcloud/build/appcloud", + "miDebuggerPath": "/opt/toolchains/zstbgcc-8.3.0-arm-eglibc-2.18-8/bin/arm-linux-gdb", + // "miDebuggerArgs": "/opt/toolchains/stbgcc-4.8-1.5/bin/arm-linux-gdb", + "miDebuggerServerAddress": "192.168.90.65:5555", + + "stopAtEntry": false, + "cwd": "${command:extension.zmkGetBuildDir}", + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { "text": "-gdb-set sysroot ${command:extension.zmkGetRootDir}/out.charter-arriswb20-appcloud-dev/linux/build_nfs_image" }, + { "text": "-gdb-set solib-search-path ${command:extension.zmkGetRootDir}/out.charter-arriswb20-appcloud-dev/linux/build_nfs_image"} + // { "text": "-gdb-set $sysroot=target:/" }, + // { "text": "-gdb-set $solib-search-path=target:/"} + ], + + "logging": { + "trace": false, + "traceResponse": false, + "engineLogging": false + } + }, + + { + "name": "(gdb) Local", + "type": "cppdbg", + "request": "launch", + // "preLaunchTask": "make", + "program": "${command:extension.zmkGetBuildDir}/obj/third-parties/appcloud/build/appcloud", + "environment": [ + { "name": "APPCLOUD_CONFIG_FILE_", "value": "/home/osesov/zodiac/valhalla/.local/ac.config.yaml"} + ], + "args": [ + // "--standalone" + "-h", "a87acab95f201449583e9ee50bf63da9-381020955.eu-west-1.elb.amazonaws.com" + ], + "stopAtEntry": false, + "cwd": "${command:extension.zmkGetBuildDir}", + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + // { "text": "-enable-pretty-printing", "ignoreFailures": true }, + { "text": "-gdb-set env LD_LIBRARY_PATH ${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib" } + ] + }, + + { + "name": "(gdb) Local unit tests", + "type": "cppdbg", + "request": "launch", + // "preLaunchTask": "make", + "program": "${command:extension.zmkGetBuildDir}/obj/third-parties/appcloud/build/appcloud_test", + "args": [ + // "--gtest_filter=handoff*" + ], + "stopAtEntry": false, + "cwd": "${command:extension.zmkGetBuildDir}", + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + // { "text": "-enable-pretty-printing", "ignoreFailures": true }, + { "text": "-gdb-set env LD_LIBRARY_PATH ${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib" } + ] + }, + ] +} diff --git a/config-examples/appcloud/settings.json b/config-examples/appcloud/settings.json new file mode 100644 index 0000000..f16c539 --- /dev/null +++ b/config-examples/appcloud/settings.json @@ -0,0 +1,137 @@ +{ + // "zmk.config": "zodiac-pc_linux-unit_tests-dev", + // "zmk.target": "components/zebra_mini/unit_tests:sysroot", + // "zmk.target": "components/zebra_mini/unit_tests/units-zebra_mini-state_controller:run_unittests", + + // "zmk.config": "zodiac-pc_linux-appcloud-dev", + "zmk.config": "local-arriswb20-appcloud-dev", + + "zmk.target": "third-parties/appcloud/app:build", + // "zmk.target": "third-parties/appcloud/app:install_to_bundle", + // "zmk.target": "third-parties/appcloud/app:nfs", + // "zmk.target": "third-parties/appcloud/app:sysroot", + // "zmk.target": "nfs_image", + + // "zmk.target": "components/gst_player:sysroot", + // "zmk.config": "zodiac-humaxwb20-zebra-tst", + + "psi-header.templates": [ + { + "language": "*", + "template": [ + "Copyright (C) 2019-<> <>", + "", + "@developer <> <>", + "", + " Proprietary and Confidential.", + " Unauthorized distribution or copying is prohibited.", + " All rights reserved.", + "", + " No part of this computer software may be reprinted, reproduced or utilized", + " in any form or by any electronic, mechanical, or other means, now known or", + " hereafter invented, including photocopying and recording, or using any", + " information storage and retrieval system, without permission in writing", + " from DOB, LLC." + ] + } + ], + "psi-header.variables": [ + ["company", "Zodiac Systems Inc"], + ["authoremail", ""] + ], + + "files.associations": { + "atomic": "cpp", + "system_error": "cpp", + "optional": "cpp", + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "array": "cpp", + "bit": "cpp", + "*.tcc": "cpp", + "bitset": "cpp", + "charconv": "cpp", + "chrono": "cpp", + "cinttypes": "cpp", + "codecvt": "cpp", + "condition_variable": "cpp", + "cstdint": "cpp", + "deque": "cpp", + "forward_list": "cpp", + "list": "cpp", + "map": "cpp", + "set": "cpp", + "unordered_map": "cpp", + "unordered_set": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "random": "cpp", + "ratio": "cpp", + "regex": "cpp", + "string": "cpp", + "string_view": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "fstream": "cpp", + "future": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "mutex": "cpp", + "new": "cpp", + "ostream": "cpp", + "shared_mutex": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "thread": "cpp", + "cfenv": "cpp", + "typeinfo": "cpp", + "valarray": "cpp", + "variant": "cpp", + "cassert": "cpp", + "hash_map": "cpp", + "hash_set": "cpp", + "complex": "cpp", + "typeindex": "cpp", + "cerrno": "cpp", + "cfloat": "cpp", + "ciso646": "cpp", + "climits": "cpp", + "filesystem": "cpp", + "ios": "cpp", + "locale": "cpp", + "queue": "cpp", + "stack": "cpp", + "cstdbool": "cpp", + "*.inc": "cpp", + "*.def": "cpp", + "strstream": "cpp", + "csignal": "cpp", + "*.ipp": "cpp", + "compare": "cpp", + "concepts": "cpp", + "ranges": "cpp", + "stop_token": "cpp" + }, + "cmake.configureOnOpen": false +} diff --git a/zebra/tasks.json b/config-examples/appcloud/tasks.json similarity index 51% rename from zebra/tasks.json rename to config-examples/appcloud/tasks.json index e7bc291..1c0fdb7 100644 --- a/zebra/tasks.json +++ b/config-examples/appcloud/tasks.json @@ -19,13 +19,8 @@ "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] }, "presentation": { - "echo": true, - "reveal": "always", - "focus": false, - "panel": "shared", - "showReuseMessage": true, "clear": true - } + }, }, { "label": "Compile current file", @@ -39,75 +34,101 @@ "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] }, "presentation": { - "echo": true, - "reveal": "always", - "focus": false, - "panel": "shared", - "showReuseMessage": true, "clear": true } }, { - "label": "build all", + "label": "make symbols", "type": "shell", - "command": "./gnb ${command:extension.zmkGetTargetConfig}", + "command": "../gnb --no-gen ${command:extension.zmkGetTargetConfig} -- generate_symbols", "options": { - "cwd": "${command:extension.zmkGetRootDir}" + "cwd": "${command:extension.zmkGetBuildDir}" }, + // "group": { + // "kind": "build", + // "isDefault": true + // }, "problemMatcher": { "base": "$gcc", "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] }, + "presentation": { + "clear": true + }, + // "dependsOn": "pre-clean" }, { - "label": "rebuild", + "label": "refresh ninja", "type": "shell", - "command": "bash -c './gnb --clean ${command:extension.zmkGetTargetConfig} -- ${command:extension.zmkGetNinjaTarget} && tools/dev/ccmake.sh ${command:extension.zmkGetTargetConfig}'", + "command": "./gnb ${command:extension.zmkGetTargetConfig} -- empty", "options": { "cwd": "${command:extension.zmkGetRootDir}" }, "problemMatcher": { "base": "$gcc", - "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] + "fileLocation": [ "relative", "${command:extension.zmkGetRootDir}" ] }, + "presentation": { + "clear": true + } }, { - "label": "Bootstrap and make compile_commands.json", + "label": "build all", "type": "shell", + "command": "./gnb ${command:extension.zmkGetTargetConfig}", "options": { "cwd": "${command:extension.zmkGetRootDir}" }, - "command": "./gnb ${command:extension.zmkGetTargetConfig} -- ${command:extension.zmkGetNinjaTarget}", + "problemMatcher": { + "base": "$gcc", + "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] + }, + }, + { + "label": "zebra: Valgrind/Callgrind", + "type": "shell", + "options": { "cwd": "${command:extension.zmkGetBuildDir}", + "env": { + "LD_LIBRARY_PATH": "${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib", + "V8_FLAGS": "--max-old-space-size=50", + "DFBARGS": "system=x11,module-dir=${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib/directfb-1.7-8,no-cursor,no-debug,mode=1280x720,depth=32,no-sighandler", + "SKIA_FONTS": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/fonts", + "ZEBRA_POLYFILLS_PATH": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/polyfills", + } + }, + "command": [ "valgrind", "--tool=callgrind", + "${command:extension.zmkGetBuildDir}/zebra_mini", + "--standalone", "http://lets.developonbox.ru/customers/comcast/comcast-x1/proto/" + ], "problemMatcher": { "base": "$gcc", "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] }, "presentation": { - "echo": true, - "reveal": "always", - "focus": false, - "panel": "shared", - "showReuseMessage": true, "clear": true } }, { - "label": "Generate compile_commands.json", + "label": "zebra: Direct run", "type": "shell", - "options": { - "cwd": "${command:extension.zmkGetRootDir}" + "options": { "cwd": "${command:extension.zmkGetBuildDir}", + "env": { + "LD_LIBRARY_PATH": "${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib", + "V8_FLAGS": "--max-old-space-size=50", + "DFBARGS": "system=x11,module-dir=${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib/directfb-1.7-8,no-cursor,no-debug,mode=1280x720,depth=32,no-sighandler", + "SKIA_FONTS": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/fonts", + "ZEBRA_POLYFILLS_PATH": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/polyfills", + } }, - "command": "bash -c 'tools/dev/ccmake.sh ${command:extension.zmkGetTargetConfig} && mv compile_commands.json \"${command:extension.zmkGetBuildDir}\"'", + "command": [ + "${command:extension.zmkGetBuildDir}/zebra_mini", + "--standalone", "http://lets.developonbox.ru/customers/comcast/comcast-x1/proto/" + ], "problemMatcher": { "base": "$gcc", "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] }, "presentation": { - "echo": true, - "reveal": "always", - "focus": false, - "panel": "shared", - "showReuseMessage": true, "clear": true } } diff --git a/config-examples/zebra/c_cpp_properties.json b/config-examples/zebra/c_cpp_properties.json new file mode 100644 index 0000000..4d975ac --- /dev/null +++ b/config-examples/zebra/c_cpp_properties.json @@ -0,0 +1,78 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**", + "${workspaceFolder}/app/src/**", + "${env:zmk.bundleDir}/appcloud_sdk/include", + "${env:zmk.bundleDir}/bitsery/include", + "${env:zmk.bundleDir}/boost-1.69/include", + "${env:zmk.bundleDir}/breakpad/include", + "${env:zmk.bundleDir}/breakpad_host/include", + "${env:zmk.bundleDir}/cares-1.12.0/include", + "${env:zmk.bundleDir}/carousels/include", + "${env:zmk.bundleDir}/chrtrsi-0.1/include", + "${env:zmk.bundleDir}/common_runtime/include", + "${env:zmk.bundleDir}/common_utils/include", + "${env:zmk.bundleDir}/cpsl/include", + "${env:zmk.bundleDir}/crt_protocol/include", + "${env:zmk.bundleDir}/dcdparser-0.1/include", + "${env:zmk.bundleDir}/disk_mgr/include", + "${env:zmk.bundleDir}/disk_storage/include", + "${env:zmk.bundleDir}/dom/include", + "${env:zmk.bundleDir}/dom_message/include", + "${env:zmk.bundleDir}/dvbs/include", + "${env:zmk.bundleDir}/dvbs-server/include", + "${env:zmk.bundleDir}/eudev-4/include", + "${env:zmk.bundleDir}/ffmpeg-4.0.1/include", + "${env:zmk.bundleDir}/firmware_updater/include", + "${env:zmk.bundleDir}/freetype-2.5.5/include", + "${env:zmk.bundleDir}/fuse-2.9.7/include", + "${env:zmk.bundleDir}/glib-2.52.3/include", + "${env:zmk.bundleDir}/gtest-1.10.0/include", + "${env:zmk.bundleDir}/ipc/include", + "${env:zmk.bundleDir}/jansson-2.11/include", + "${env:zmk.bundleDir}/json-c-0.12.1/include", + "${env:zmk.bundleDir}/libatasmart-0.19/include", + "${env:zmk.bundleDir}/libcurl-7.68.0/include", + "${env:zmk.bundleDir}/libev-4.33/include", + "${env:zmk.bundleDir}/libffi-3.2.1/include", + "${env:zmk.bundleDir}/libjpeg-8d/include", + "${env:zmk.bundleDir}/libmessage_bus/include", + "${env:zmk.bundleDir}/libopus-1.3.1/include", + "${env:zmk.bundleDir}/libpng-1.5.10/include", + "${env:zmk.bundleDir}/libservicectl/include", + "${env:zmk.bundleDir}/libubox-1.0/include", + "${env:zmk.bundleDir}/libuuid-1.0.3/include", + "${env:zmk.bundleDir}/libwebp-1.0.3/include", + "${env:zmk.bundleDir}/libxml2-2.9.6/include", + "${env:zmk.bundleDir}/libyaml-0.1.6/include", + "${env:zmk.bundleDir}/microxml-1.0/include", + "${env:zmk.bundleDir}/mms-0.1/include", + "${env:zmk.bundleDir}/nanomsg-1.1.4/include", + "${env:zmk.bundleDir}/net-snmp-5.7.3/include", + "${env:zmk.bundleDir}/protobuf_host-2.5.0/include", + "${env:zmk.bundleDir}/protobuf_static-2.5.0/include", + "${env:zmk.bundleDir}/serviced_message/include", + "${env:zmk.bundleDir}/span-cpp20/include", + "${env:zmk.bundleDir}/ubus-1.0/include", + "${env:zmk.bundleDir}/uriparser-0.8.5/include", + "${env:zmk.bundleDir}/util-linux-2.34/include", + "${env:zmk.bundleDir}/wvcdm_wrapper/include", + "${env:zmk.bundleDir}/zlib-1.2.11/include", + "${env:zmk.bundleDir}/ztl/include" + ], + "defines": [ + "WITHOUT_TRACE_EVENT", + "Z_BUILD_VARIANT=\"dev\"" + ], + "compilerPath": "/usr/bin/clang", + "cStandard": "c11", + "cppStandard": "c++17", + "intelliSenseMode": "clang-x64", + "compileCommands": "${env:zmk.buildDir}/compile_commands.json" + } + ], + "version": 4 +} diff --git a/zebra/launch.json b/config-examples/zebra/launch.json similarity index 62% rename from zebra/launch.json rename to config-examples/zebra/launch.json index 140494f..fe62854 100644 --- a/zebra/launch.json +++ b/config-examples/zebra/launch.json @@ -5,68 +5,59 @@ "version": "0.2.0", "configurations": [ { - "name": "gdb - remote", + "name": "(gdb) Remote", "type": "cppdbg", "request": "launch", - "program": "${command:extension.zmkGetBuildDir}/zebra_mini", - "miDebuggerServerAddress": "172.17.0.2:9999", - "args": [], - "stopAtEntry": false, - "cwd": "${command:extension.zmkGetBuildDir}", - "environment": [], - "externalConsole": true, + "miDebuggerPath": "/opt/toolchains/zstbgcc-8.3.0-arm-eglibc-2.18-8/bin/arm-linux-gdb", + // "miDebuggerArgs": "/opt/toolchains/stbgcc-4.8-1.5/bin/arm-linux-gdb", + "miDebuggerServerAddress": "192.168.90.65:5555", + "externalConsole": false, "MIMode": "gdb", - "miDebuggerPath": "/usr/bin/gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true }, - { - "text": "-gdb-set sysroot target:/", - "ignoreFailures": true - }, - { - "text": "-gdb-set solib-search-path target:${command:extension.zmkGetBuildDir}/linux/symbols/dbg", - "ignoreFailures": true - }, - ] - }, - { - "name": "gdb - local", - "type": "cppdbg", - "request": "launch", - // "preLaunchTask": "make", - "miDebuggerPath": "/usr/bin/gdb", - "program": "${command:extension.zmkGetBuildDir}/zebra_mini", - // "args": [ "--standalone", "http://lets.developonbox.ru/products/ibc2019/zodiac-ref-ui-3/latest/" ], - // "args": [ "--standalone", "file://${workspaceFolder}/zebra_index.html" ], - // "args": [ "--standalone", "http://lets.developonbox.ru/tests/keypress/" ], - // "args": [ "--standalone", "http://lets.developonbox.ru/customers/metrological/2019-10-07/" ], - // "args": [ "--standalone", "http://lets.developonbox.ru/customers/metrological/2019-09-25/" ], - // "args": [ "--standalone", "http://lets.developonbox.ru/customers/metrological/load-test/fetch-big.html" ], - // "args": [ "--standalone", "file://${workspaceFolder}/.vscode/run/lets.developonbox.ru/customers/metrological/load-test/fetch-big.html" ], - // "args": [ "--standalone", "file://${workspaceFolder}/.vscode/run/index.html" ], - // "args": [ "--standalone", "http://cdn.metrological.com/static/charter/es5_v11/index.html" ], - // "args": [ "--standalone", "http://localhost:8000/cdn.metrological.com/static/charter/es5_v07/index.html" ], - "args": [ "--standalone", "https://widgets.metrological.com/lightning/charter/cd0f9db10ae2b516ba005a98d99411ef" ], - // "args": [ "--standalone", "http://localhost:8000/mt/widgets.metrological.com/lightning/charter/cd0f9db10ae2b516ba005a98d99411ef.html" ], - // "args": [ "--standalone", "http://lets.developonbox.ru/products/ibc2019/charter-spectrum-ui/latest/" ], + { "text": "-gdb-set sysroot ${command:extension.zmkGetBuildDir}/linux/build_nfs_image" }, + { "text": "-gdb-set solib-search-path ${command:extension.zmkGetBuildDir}/linux/build_nfs_image"} + // { "text": "-gdb-set $sysroot=target:/" }, + // { "text": "-gdb-set $solib-search-path=target:/"} + ], + + "logging": { + "trace": false, + "traceResponse": false, + "engineLogging": false + }, + "stopAtEntry": false, + + // "preLaunchTask": "make", "cwd": "${command:extension.zmkGetBuildDir}", "environment": [ { "name": "LD_LIBRARY_PATH", "value": "${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib" }, + // { "name": "V8_FLAGS", "value": "--max-old-space-size=128 --max-semi-space-size=1" }, // { "name": "V8_FLAGS", "value": "--max-old-space-size=128 --max-semi-space-size=1 --single-threaded --single-threaded-gc" }, // { "name": "V8_FLAGS", "value": "--help" }, - // { "name": "V8_FLAGS", "value": "--noconcurrent_recompilation --noconcurrent_osr --noconcurrent_sweeping" }, { "name": "LOG_LEVEL", "value": "3" }, + // { "name": "V8_FLAGS", "value": "--noconcurrent_recompilation --noconcurrent_osr --noconcurrent_sweeping" }, { "name": "DFBARGS", "value": "system=x11,module-dir=${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib/directfb-1.7-8,no-cursor,no-debug,mode=1280x720,depth=32,no-sighandler" }, { "name": "SKIA_FONTS", "value": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/fonts" }, { "name": "ZEBRA_POLYFILLS_PATH", "value": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/polyfills" }, - { "name": "ZEBRA_DEBUG", "value": "!IMAGE_DRAW" }, ], + + "program": "${command:extension.zmkGetBuildDir}/zebra_mini", + "args": [ "--standalone", "http://lets.developonbox.ru/customers/comcast/comcast-x1/proto/" ], + + }, + + { + "name": "(gdb) Local", + "type": "cppdbg", + "request": "launch", + "externalConsole": false, "MIMode": "gdb", "setupCommands": [ @@ -74,43 +65,77 @@ "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true - } - ] - }, - { - "name": "gdb - unit test", - "type": "cppdbg", - "request": "launch", + }, + { "text": "-gdb-set sysroot ${command:extension.zmkGetBuildDir}/linux/build_nfs_image" }, + { "text": "-gdb-set solib-search-path ${command:extension.zmkGetBuildDir}/linux/build_nfs_image"} + // { "text": "-gdb-set $sysroot=target:/" }, + // { "text": "-gdb-set $solib-search-path=target:/"} + ], + + "stopAtEntry": false, + // "preLaunchTask": "make", - "program": "${command:extension.zmkGetRootDir}/out.zodiac-pc_linux-unit_tests-dev/units-zebra_mini-webplatform-location", + "cwd": "${command:extension.zmkGetBuildDir}", + "environment": [ + { "name": "LD_LIBRARY_PATH", "value": "${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib" }, + + // { "name": "V8_FLAGS", "value": "--mx-old-space-size=128 --max-semi-space-size=1" }, + // { "name": "V8_FLAGS", "value": "--max-old-space-size=128 --max-semi-space-size=1 --single-threaded --single-threaded-gc" }, + // { "name": "V8_FLAGS", "value": "--help" }, + { "name": "LOG_LEVEL", "value": "3" }, + // { "name": "V8_FLAGS", "value": "--noconcurrent_recompilation --noconcurrent_osr --noconcurrent_sweeping" }, + { "name": "DFBARGS", "value": "system=x11,module-dir=${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib/directfb-1.7-8,no-cursor,no-debug,mode=1280x720,depth=32,no-sighandler" }, + { "name": "SKIA_FONTS", "value": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/fonts" }, + { "name": "ZEBRA_POLYFILLS_PATH", "value": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/polyfills" }, + { "name": "DVBS_NETWORK_CONFIG_FILE", "value": "${command:extension.zmkGetBuildDir}/linux/sysroot/etc/zodiac/configs/network.yaml"} + ], + + "program": "${command:extension.zmkGetBuildDir}/zebra_mini", // "args": [ "--standalone", "http://lets.developonbox.ru/products/ibc2019/zodiac-ref-ui-3/latest/" ], // "args": [ "--standalone", "file://${workspaceFolder}/zebra_index.html" ], // "args": [ "--standalone", "http://lets.developonbox.ru/tests/keypress/" ], // "args": [ "--standalone", "http://lets.developonbox.ru/customers/metrological/2019-10-07/" ], // "args": [ "--standalone", "http://lets.developonbox.ru/customers/metrological/2019-09-25/" ], + // "args": [ "--standalone", "http://lets.developonbox.ru/customers/metrological/load-test/fetch-big.html" ], + // "args": [ "--standalone", "file://${workspaceFolder}/.vscode/run/lets.developonbox.ru/customers/metrological/load-test/fetch-big.html" ], + // "args": [ "--standalone", "file://${workspaceFolder}/.vscode/run/index.html" ], + // "args": [ "--standalone", "http://cdn.metrological.com/static/charter/es5_v11/index.html" ], + // "args": [ "--standalone", "http://localhost:8000/cdn.metrological.com/static/charter/es5_v07/index.html" ], + // "args": [ "--standalone", "http://localhost:8000/mt/widgets.metrological.com/lightning/charter/cd0f9db10ae2b516ba005a98d99411ef.html" ], + // "args": [ "--standalone", "http://lets.developonbox.ru/products/ibc2019/charter-spectrum-ui/latest/" ], + // "args": [ "--standalone", "https://widgets.metrological.com/lightning/charter/cd0f9db10ae2b516ba005a98d99411ef" ], + "args": [ "--standalone", "http://lets.developonbox.ru/customers/comcast/comcast-x1/proto/" ], + }, + + { + "name": "(gdb) Local unit tests", + "type": "cppdbg", + "request": "launch", + // "preLaunchTask": "make", "stopAtEntry": false, - "cwd": "${workspaceFolder}", + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + // { "text": "-enable-pretty-printing", "ignoreFailures": true }, + { "text": "-gdb-set env LD_LIBRARY_PATH ${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib" } + ], + "cwd": "${command:extension.zmkGetBuildDir}", "environment": [ { "name": "LD_LIBRARY_PATH", "value": "${command:extension.zmkGetRootDir}/out.zodiac-pc_linux-unit_tests-dev/linux/sysroot/usr/lib" }, // { "name": "V8_FLAGS", "value": "--max-old-space-size=128 --max-semi-space-size=1" }, // { "name": "V8_FLAGS", "value": "--max-old-space-size=128 --max-semi-space-size=1 --single-threaded --single-threaded-gc" }, // { "name": "V8_FLAGS", "value": "--help" }, - // { "name": "V8_FLAGS", "value": "--noconcurrent_recompilation --noconcurrent_osr --noconcurrent_sweeping" }, + { "name": "V8_FLAGS", "value": "--noconcurrent_recompilation --noconcurrent_osr --noconcurrent_sweeping" }, { "name": "DFBARGS", "value": "system=x11,module-dir=${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib/directfb-1.7-8,no-cursor,no-debug,mode=1280x720,depth=32,no-sighandler" }, - { "name": "SKIA_FONTS", "value": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/fonts" }, - { "name": "ZEBRA_POLYFILLS_PATH", "value": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/polyfills" }, - { "name": "ZEBRA_DEBUG", "value": "!IMAGE_DRAW" } + { "name": "SKIA_FONTS", "value": "${command:extension.zmkGetNfsDir}/fonts" }, + { "name": "ZEBRA_POLYFILLS_PATH", "value": "${command:extension.zmkGetNfsDir}/polyfills" }, ], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - // { - // "description": "Enable pretty-printing for gdb", - // "text": "-enable-pretty-printing", - // "ignoreFailures": true - // } - ] - } + "program": "${command:extension.zmkGetRootDir}/out.zodiac-pc_linux-unit_tests-dev/units-zebra_mini-webplatform-location", + "args": [ + // "--gtest_filter=handoff*" + ], + + }, ] } diff --git a/config-examples/zebra/settings.json b/config-examples/zebra/settings.json new file mode 100644 index 0000000..2494f6d --- /dev/null +++ b/config-examples/zebra/settings.json @@ -0,0 +1,5 @@ +{ + //"zmk.config": "zodiac-pc_linux-unit_tests-dev", + "zmk.config": "zodiac-pc_linux-zebra-dev", + "zmk.target": "components/zebra_mini:nfs", +} diff --git a/config-examples/zebra/tasks.json b/config-examples/zebra/tasks.json new file mode 100644 index 0000000..1c0fdb7 --- /dev/null +++ b/config-examples/zebra/tasks.json @@ -0,0 +1,136 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "make", + "type": "shell", + "command": "../gnb --no-gen ${command:extension.zmkGetTargetConfig} -- ${command:extension.zmkGetNinjaTarget}", + "options": { + "cwd": "${command:extension.zmkGetBuildDir}" + }, + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": { + "base": "$gcc", + "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] + }, + "presentation": { + "clear": true + }, + }, + { + "label": "Compile current file", + "type": "shell", + "command": "../gnb --no-gen ${command:extension.zmkGetTargetConfig} -- ${command:extension.zmkGetCurrentFile}^", + "options": { + "cwd": "${command:extension.zmkGetBuildDir}" + }, + "problemMatcher": { + "base": "$gcc", + "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] + }, + "presentation": { + "clear": true + } + }, + { + "label": "make symbols", + "type": "shell", + "command": "../gnb --no-gen ${command:extension.zmkGetTargetConfig} -- generate_symbols", + "options": { + "cwd": "${command:extension.zmkGetBuildDir}" + }, + // "group": { + // "kind": "build", + // "isDefault": true + // }, + "problemMatcher": { + "base": "$gcc", + "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] + }, + "presentation": { + "clear": true + }, + // "dependsOn": "pre-clean" + }, + { + "label": "refresh ninja", + "type": "shell", + "command": "./gnb ${command:extension.zmkGetTargetConfig} -- empty", + "options": { + "cwd": "${command:extension.zmkGetRootDir}" + }, + "problemMatcher": { + "base": "$gcc", + "fileLocation": [ "relative", "${command:extension.zmkGetRootDir}" ] + }, + "presentation": { + "clear": true + } + }, + { + "label": "build all", + "type": "shell", + "command": "./gnb ${command:extension.zmkGetTargetConfig}", + "options": { + "cwd": "${command:extension.zmkGetRootDir}" + }, + "problemMatcher": { + "base": "$gcc", + "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] + }, + }, + { + "label": "zebra: Valgrind/Callgrind", + "type": "shell", + "options": { "cwd": "${command:extension.zmkGetBuildDir}", + "env": { + "LD_LIBRARY_PATH": "${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib", + "V8_FLAGS": "--max-old-space-size=50", + "DFBARGS": "system=x11,module-dir=${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib/directfb-1.7-8,no-cursor,no-debug,mode=1280x720,depth=32,no-sighandler", + "SKIA_FONTS": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/fonts", + "ZEBRA_POLYFILLS_PATH": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/polyfills", + } + }, + "command": [ "valgrind", "--tool=callgrind", + "${command:extension.zmkGetBuildDir}/zebra_mini", + "--standalone", "http://lets.developonbox.ru/customers/comcast/comcast-x1/proto/" + ], + "problemMatcher": { + "base": "$gcc", + "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] + }, + "presentation": { + "clear": true + } + }, + { + "label": "zebra: Direct run", + "type": "shell", + "options": { "cwd": "${command:extension.zmkGetBuildDir}", + "env": { + "LD_LIBRARY_PATH": "${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib", + "V8_FLAGS": "--max-old-space-size=50", + "DFBARGS": "system=x11,module-dir=${command:extension.zmkGetBuildDir}/linux/sysroot/usr/lib/directfb-1.7-8,no-cursor,no-debug,mode=1280x720,depth=32,no-sighandler", + "SKIA_FONTS": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/fonts", + "ZEBRA_POLYFILLS_PATH": "${command:extension.zmkGetBuildDir}/linux/sysroot/home/zodiac/polyfills", + } + }, + "command": [ + "${command:extension.zmkGetBuildDir}/zebra_mini", + "--standalone", "http://lets.developonbox.ru/customers/comcast/comcast-x1/proto/" + ], + "problemMatcher": { + "base": "$gcc", + "fileLocation": [ "relative", "${command:extension.zmkGetBuildDir}" ] + }, + "presentation": { + "clear": true + } + } + ] +} diff --git a/zebra/c_cpp_properties.json b/zebra/c_cpp_properties.json deleted file mode 100644 index fbd53cd..0000000 --- a/zebra/c_cpp_properties.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "configurations": [ - { - "name": "Linux", - "includePath": [ - "${workspaceFolder}/**" - ], - "defines": [ - "WITHOUT_TRACE_EVENT" - ], - "compilerPath": "/usr/bin/clang", - "cStandard": "c11", - "cppStandard": "c++17", - "intelliSenseMode": "clang-x64", - "compileCommands": "${env:zmk.buildDir}/compile_commands.json" - } - ], - "version": 4 -} diff --git a/zebra/settings.json b/zebra/settings.json deleted file mode 100644 index 43235fb..0000000 --- a/zebra/settings.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - // "zmk.config": "zodiac-pc_linux-unit_tests-dev", - "zmk.config": "zodiac-pc_linux-zebra-dev", - "zmk.target": "components/zebra_mini:nfs", - "zmk.excludeBundles": [ - "zebra_mini", "gst_player" - ], - "files.associations": { - "atomic": "cpp", - "system_error": "cpp", - "optional": "cpp", - "cctype": "cpp", - "clocale": "cpp", - "cmath": "cpp", - "cstdarg": "cpp", - "cstddef": "cpp", - "cstdio": "cpp", - "cstdlib": "cpp", - "cstring": "cpp", - "ctime": "cpp", - "cwchar": "cpp", - "cwctype": "cpp", - "array": "cpp", - "bit": "cpp", - "*.tcc": "cpp", - "bitset": "cpp", - "charconv": "cpp", - "chrono": "cpp", - "cinttypes": "cpp", - "codecvt": "cpp", - "condition_variable": "cpp", - "cstdint": "cpp", - "deque": "cpp", - "forward_list": "cpp", - "list": "cpp", - "map": "cpp", - "set": "cpp", - "unordered_map": "cpp", - "unordered_set": "cpp", - "vector": "cpp", - "exception": "cpp", - "algorithm": "cpp", - "functional": "cpp", - "iterator": "cpp", - "memory": "cpp", - "memory_resource": "cpp", - "numeric": "cpp", - "random": "cpp", - "ratio": "cpp", - "regex": "cpp", - "string": "cpp", - "string_view": "cpp", - "tuple": "cpp", - "type_traits": "cpp", - "utility": "cpp", - "fstream": "cpp", - "future": "cpp", - "initializer_list": "cpp", - "iomanip": "cpp", - "iosfwd": "cpp", - "iostream": "cpp", - "istream": "cpp", - "limits": "cpp", - "mutex": "cpp", - "new": "cpp", - "ostream": "cpp", - "shared_mutex": "cpp", - "sstream": "cpp", - "stdexcept": "cpp", - "streambuf": "cpp", - "thread": "cpp", - "cfenv": "cpp", - "typeinfo": "cpp", - "valarray": "cpp", - "variant": "cpp", - "cassert": "cpp", - "hash_map": "cpp", - "hash_set": "cpp", - "complex": "cpp", - "typeindex": "cpp" - } -} -