duino-vscode-settings


Nameduino-vscode-settings JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/dhylands/duino_vscode_settings
SummaryA tool for creating VSCode c_cpp_properties.json files.
upload_time2024-11-17 02:56:09
maintainerNone
docs_urlNone
authorDave Hylands
requires_pythonNone
licenseMIT
keywords cmd cli arduino
VCS
bugtrack_url
requirements pytest pylint pyyaml yapf twine
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # duino_vscode_settings

Creates a vscode settings file with all of the compiler defines and include paths in it.

This program works by taking the command uses to invoke the compiler (with all of the -D, -I etc
options) and it parses the options and generates a VSCode settings file (more precisely,
a c_cpp_properties.json file).

duino_vscode_settings also supports storing multiple configurations, so you can have a configuation
for running the host compiler (say to run a C++ test suite), and have a configuration for
each type of Arduino Board that you use.

duino_vscode_settings will tries to merge any existing options so as not to overwrite
customizations.

## Installation

```bash
pip3 install duino_vscode_settings
```
or
```bash
python3 -m pip install diono_vscode_settings
```

## GitHub Repository

You can find the source code on [github](https://github.com/dhylands/duino_vscode_settings.git)

## Typical Usage

```bash
make-vscode-settings ./.vscode/c_cpp_properties.json -- g++ -DFOO -IsomePath -IotherPath
```
will generate a `c_cpp_properties.json` which looks something like this:
```json
{
    "configurations": [
        {
            "cStandard": "gnu11",
            "compilerPath": "g++",
            "cppStandard": "g++17",
            "defines": [
                "FOO"
            ],
            "includePath": [
                "somePath",
                "otherPath"
            ],
            "intelliSenseMode": "gcc-arm",
            "mergeConfigurations": true,
            "name": "Arduino"
        }
    ]
}
```

Using a NeoPixelExample compiled for a WaveShare RP2040 Zero, I would normally compile this using
something like:
```bash
arduino-cli compile --fqbn rp2040:rp2040:waveshare_rp2040_zero
```
If you pass in the `--verbose` then arduino-cli will print out the compiler invocations. If you
grab the one for the .ino file then I use that.

```bash
arduino-cli compile --verbose --fqbn rp2040:rp2040:waveshare_rp2040_zero 2>/dev/null | grep g++ | grep .ino.cpp | grep -v -- -lc | tail -1
```
This will produce this output:
```bash
/home/dhylands/.arduino15/packages/rp2040/tools/pqt-gcc/2.3.0-dfd82b2/bin/arm-none-eabi-g++ \
    -I /tmp/arduino/sketches/7F7CB296241CD53CB3A2A1C9D0C29E09/core -c -Werror=return-type \
    -Wno-psabi -DUSBD_PID=0x0003 -DUSBD_VID=0x2e8a -DUSBD_MAX_POWER_MA=500 \
    -DUSB_MANUFACTURER="Waveshare" -DUSB_PRODUCT="RP2040 Zero" -DLWIP_IPV6=0 -DLWIP_IPV4=1 \
    -DLWIP_IGMP=1 -DLWIP_CHECKSUM_CTRL_PER_NETIF=1 -DARDUINO_VARIANT="waveshare_rp2040_zero" \
    -DPICO_FLASH_SIZE_BYTES=2097152 \
    @/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/lib/rp2040/platform_def.txt \
    -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions \
    -iprefix/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/ \
    @/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/lib/rp2040/platform_inc.txt \
    @/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/lib/core_inc.txt \
    -I/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/include -fno-rtti \
    -std=gnu++17 -g -pipe -w -x c++ -E -CC -DF_CPU=133000000L -DARDUINO=10607 \
    -DARDUINO_WAVESHARE_RP2040_ZERO -DBOARD_NAME="WAVESHARE_RP2040_ZERO" -DARDUINO_ARCH_RP2040 \
    -Os -DWIFICC=CYW43_COUNTRY_WORLDWIDE \
    -I/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/cores/rp2040 \
    -I/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/variants/waveshare_rp2040_zero \
    /tmp/arduino/sketches/7F7CB296241CD53CB3A2A1C9D0C29E09/sketch/NeoPixelExample.ino.cpp -o /dev/null
```
If you assigned the above to a variable called `COMPILER_CMD` then I would run
`make-vscode-settings` like this:
```bash
COMPILER_CMD=$(arduino-cli compile --verbose --fqbn rp2040:rp2040:waveshare_rp2040_zero 2>/dev/null | grep g++ | grep .ino.cpp | grep -v -- -lc | tail -1)
make-vscode-settings -c Arduino-zero ./.vscode/c_cpp_properties.json -- ${COMPILER_CMD}
```
and that would generate `./.vscode/c_cpp_properties.json` with contents something like this:
```json
{
    "configurations": [
        {
            "cStandard": "gnu11",
            "compilerPath": "/home/dhylands/.arduino15/packages/rp2040/tools/pqt-gcc/2.3.0-dfd82b2/bin/arm-none-eabi-g++",
            "cppStandard": "gnu++17",
            "defines": [
                "ARDUINO=10607",
                "ARDUINO_ARCH_RP2040",
                "ARDUINO_WAVESHARE_RP2040_ZERO",
                "ARM_MATH_CM0_FAMILY",
                "ARM_MATH_CM0_PLUS",
                "CFG_TUSB_MCU=OPT_MCU_RP2040",
                "CYW43_LWIP=1",
                "F_CPU=133000000L",
                "LWIP_CHECKSUM_CTRL_PER_NETIF=1",
                "LWIP_IGMP=1",
                "LWIP_IPV4=1",
                "LWIP_IPV6=0",
                "PICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1",
                "PICO_FLASH_SIZE_BYTES=2097152",
                "PICO_RP2040=1",
                "TARGET_RP2040",
                "USBD_MAX_POWER_MA=500",
                "USBD_PID=0x0003",
                "USBD_VID=0x2e8a",
                "WIFICC=CYW43_COUNTRY_WORLDWIDE"
            ],
            "includePath": [
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/include/rp2040",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/include/rp2040/pico_base",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2040/hardware_regs/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2040/hardware_structs/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2040/pico_platform/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_btstack/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_cyw43_arch/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_cyw43_driver/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/cyw43-driver/src",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/btstack/src",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/btstack/3rd-party/bluedroid/decoder/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/btstack/3rd-party/bluedroid/encoder/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/btstack/platform/embedded",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Device/RP2040/Include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/cores/rp2040/api/deprecated-avr-comp",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/tinyusb/src",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/boards/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/hardware_claim/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_base/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_base_headers/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_binary_info/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_bit_ops/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_divider/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_stdlib/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_sync/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_time/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_usb_reset_interface/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_util/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_stdlib_headers/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_usb_reset_interface_headers/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/cmsis/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_adc/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_base/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_boot_lock/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_clocks/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_divider/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_dma/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_exception/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_flash/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_gpio/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_i2c/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_interp/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_irq/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_rtc/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_pio/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_pll/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_pwm/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_resets/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_spi/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_sync/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_sync_spin_lock/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_timer/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_uart/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_vreg/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_watchdog/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_xosc/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_aon_timer/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_async_context/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_bootrom/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_double/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_float/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_int64_ops/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_lwip/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_multicore/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_platform/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_platform_compiler/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_platform_sections/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_platform_panic/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_printf/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_runtime/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_runtime_init/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_rand/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_stdio/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_stdio_uart/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_unique_id/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/lwip/src/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/include",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/cores/rp2040",
                "/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/variants/waveshare_rp2040_zero",
                "/home/dhylands/Arduino/libraries/Adafruit_NeoPixel"
            ],
            "intelliSenseMode": "gcc-arm",
            "mergeConfigurations": true,
            "name": "Arduino-zero"
        }
    ],
    "version": 4
}
```
 I typically make a seperate VSCode workspace for each Arduino project, and when I open the
 workspace and then select `Arduino-zero` in the bottom right corner. All of the red-squiggles
 should be gone, and you can Control-Click on a symbol and it takes you to the place where
 it's defined.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dhylands/duino_vscode_settings",
    "name": "duino-vscode-settings",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "cmd cli arduino",
    "author": "Dave Hylands",
    "author_email": "dhylands@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b9/74/2c392d239c3884248a92f1f6a17e2b4302ca57c85e58bd98469ca22f3e9e/duino_vscode_settings-0.0.4.tar.gz",
    "platform": null,
    "description": "# duino_vscode_settings\n\nCreates a vscode settings file with all of the compiler defines and include paths in it.\n\nThis program works by taking the command uses to invoke the compiler (with all of the -D, -I etc\noptions) and it parses the options and generates a VSCode settings file (more precisely,\na c_cpp_properties.json file).\n\nduino_vscode_settings also supports storing multiple configurations, so you can have a configuation\nfor running the host compiler (say to run a C++ test suite), and have a configuration for\neach type of Arduino Board that you use.\n\nduino_vscode_settings will tries to merge any existing options so as not to overwrite\ncustomizations.\n\n## Installation\n\n```bash\npip3 install duino_vscode_settings\n```\nor\n```bash\npython3 -m pip install diono_vscode_settings\n```\n\n## GitHub Repository\n\nYou can find the source code on [github](https://github.com/dhylands/duino_vscode_settings.git)\n\n## Typical Usage\n\n```bash\nmake-vscode-settings ./.vscode/c_cpp_properties.json -- g++ -DFOO -IsomePath -IotherPath\n```\nwill generate a `c_cpp_properties.json` which looks something like this:\n```json\n{\n    \"configurations\": [\n        {\n            \"cStandard\": \"gnu11\",\n            \"compilerPath\": \"g++\",\n            \"cppStandard\": \"g++17\",\n            \"defines\": [\n                \"FOO\"\n            ],\n            \"includePath\": [\n                \"somePath\",\n                \"otherPath\"\n            ],\n            \"intelliSenseMode\": \"gcc-arm\",\n            \"mergeConfigurations\": true,\n            \"name\": \"Arduino\"\n        }\n    ]\n}\n```\n\nUsing a NeoPixelExample compiled for a WaveShare RP2040 Zero, I would normally compile this using\nsomething like:\n```bash\narduino-cli compile --fqbn rp2040:rp2040:waveshare_rp2040_zero\n```\nIf you pass in the `--verbose` then arduino-cli will print out the compiler invocations. If you\ngrab the one for the .ino file then I use that.\n\n```bash\narduino-cli compile --verbose --fqbn rp2040:rp2040:waveshare_rp2040_zero 2>/dev/null | grep g++ | grep .ino.cpp | grep -v -- -lc | tail -1\n```\nThis will produce this output:\n```bash\n/home/dhylands/.arduino15/packages/rp2040/tools/pqt-gcc/2.3.0-dfd82b2/bin/arm-none-eabi-g++ \\\n    -I /tmp/arduino/sketches/7F7CB296241CD53CB3A2A1C9D0C29E09/core -c -Werror=return-type \\\n    -Wno-psabi -DUSBD_PID=0x0003 -DUSBD_VID=0x2e8a -DUSBD_MAX_POWER_MA=500 \\\n    -DUSB_MANUFACTURER=\"Waveshare\" -DUSB_PRODUCT=\"RP2040 Zero\" -DLWIP_IPV6=0 -DLWIP_IPV4=1 \\\n    -DLWIP_IGMP=1 -DLWIP_CHECKSUM_CTRL_PER_NETIF=1 -DARDUINO_VARIANT=\"waveshare_rp2040_zero\" \\\n    -DPICO_FLASH_SIZE_BYTES=2097152 \\\n    @/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/lib/rp2040/platform_def.txt \\\n    -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions \\\n    -iprefix/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/ \\\n    @/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/lib/rp2040/platform_inc.txt \\\n    @/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/lib/core_inc.txt \\\n    -I/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/include -fno-rtti \\\n    -std=gnu++17 -g -pipe -w -x c++ -E -CC -DF_CPU=133000000L -DARDUINO=10607 \\\n    -DARDUINO_WAVESHARE_RP2040_ZERO -DBOARD_NAME=\"WAVESHARE_RP2040_ZERO\" -DARDUINO_ARCH_RP2040 \\\n    -Os -DWIFICC=CYW43_COUNTRY_WORLDWIDE \\\n    -I/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/cores/rp2040 \\\n    -I/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/variants/waveshare_rp2040_zero \\\n    /tmp/arduino/sketches/7F7CB296241CD53CB3A2A1C9D0C29E09/sketch/NeoPixelExample.ino.cpp -o /dev/null\n```\nIf you assigned the above to a variable called `COMPILER_CMD` then I would run\n`make-vscode-settings` like this:\n```bash\nCOMPILER_CMD=$(arduino-cli compile --verbose --fqbn rp2040:rp2040:waveshare_rp2040_zero 2>/dev/null | grep g++ | grep .ino.cpp | grep -v -- -lc | tail -1)\nmake-vscode-settings -c Arduino-zero ./.vscode/c_cpp_properties.json -- ${COMPILER_CMD}\n```\nand that would generate `./.vscode/c_cpp_properties.json` with contents something like this:\n```json\n{\n    \"configurations\": [\n        {\n            \"cStandard\": \"gnu11\",\n            \"compilerPath\": \"/home/dhylands/.arduino15/packages/rp2040/tools/pqt-gcc/2.3.0-dfd82b2/bin/arm-none-eabi-g++\",\n            \"cppStandard\": \"gnu++17\",\n            \"defines\": [\n                \"ARDUINO=10607\",\n                \"ARDUINO_ARCH_RP2040\",\n                \"ARDUINO_WAVESHARE_RP2040_ZERO\",\n                \"ARM_MATH_CM0_FAMILY\",\n                \"ARM_MATH_CM0_PLUS\",\n                \"CFG_TUSB_MCU=OPT_MCU_RP2040\",\n                \"CYW43_LWIP=1\",\n                \"F_CPU=133000000L\",\n                \"LWIP_CHECKSUM_CTRL_PER_NETIF=1\",\n                \"LWIP_IGMP=1\",\n                \"LWIP_IPV4=1\",\n                \"LWIP_IPV6=0\",\n                \"PICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1\",\n                \"PICO_FLASH_SIZE_BYTES=2097152\",\n                \"PICO_RP2040=1\",\n                \"TARGET_RP2040\",\n                \"USBD_MAX_POWER_MA=500\",\n                \"USBD_PID=0x0003\",\n                \"USBD_VID=0x2e8a\",\n                \"WIFICC=CYW43_COUNTRY_WORLDWIDE\"\n            ],\n            \"includePath\": [\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/include/rp2040\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/include/rp2040/pico_base\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2040/hardware_regs/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2040/hardware_structs/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2040/pico_platform/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_btstack/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_cyw43_arch/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_cyw43_driver/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/cyw43-driver/src\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/btstack/src\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/btstack/3rd-party/bluedroid/decoder/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/btstack/3rd-party/bluedroid/encoder/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/btstack/platform/embedded\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Device/RP2040/Include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/cores/rp2040/api/deprecated-avr-comp\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/tinyusb/src\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/boards/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/hardware_claim/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_base/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_base_headers/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_binary_info/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_bit_ops/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_divider/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_stdlib/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_sync/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_time/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_usb_reset_interface/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_util/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_stdlib_headers/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/common/pico_usb_reset_interface_headers/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/cmsis/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_adc/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_base/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_boot_lock/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_clocks/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_divider/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_dma/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_exception/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_flash/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_gpio/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_i2c/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_interp/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_irq/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_rtc/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_pio/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_pll/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_pwm/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_resets/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_spi/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_sync/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_sync_spin_lock/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_timer/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_uart/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_vreg/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_watchdog/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/hardware_xosc/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_aon_timer/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_async_context/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_bootrom/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_double/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_float/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_int64_ops/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_lwip/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_multicore/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_platform/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_platform_compiler/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_platform_sections/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_platform_panic/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_printf/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_runtime/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_runtime_init/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_rand/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_stdio/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_stdio_uart/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/src/rp2_common/pico_unique_id/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/pico-sdk/lib/lwip/src/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/include\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/cores/rp2040\",\n                \"/home/dhylands/.arduino15/packages/rp2040/hardware/rp2040/4.0.3/variants/waveshare_rp2040_zero\",\n                \"/home/dhylands/Arduino/libraries/Adafruit_NeoPixel\"\n            ],\n            \"intelliSenseMode\": \"gcc-arm\",\n            \"mergeConfigurations\": true,\n            \"name\": \"Arduino-zero\"\n        }\n    ],\n    \"version\": 4\n}\n```\n I typically make a seperate VSCode workspace for each Arduino project, and when I open the\n workspace and then select `Arduino-zero` in the bottom right corner. All of the red-squiggles\n should be gone, and you can Control-Click on a symbol and it takes you to the place where\n it's defined.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tool for creating VSCode c_cpp_properties.json files.",
    "version": "0.0.4",
    "project_urls": {
        "Download": "https://github.com/dhylands/duino_vscode_settings/shell/tarball/v0.0.4",
        "Homepage": "https://github.com/dhylands/duino_vscode_settings"
    },
    "split_keywords": [
        "cmd",
        "cli",
        "arduino"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b9742c392d239c3884248a92f1f6a17e2b4302ca57c85e58bd98469ca22f3e9e",
                "md5": "6bb795ec0254a9cbc3be3f8bfd3a1f30",
                "sha256": "14abf2781cafac539288f7ab6fcaf8cac50727478cebbd8db3cf6883798a9098"
            },
            "downloads": -1,
            "filename": "duino_vscode_settings-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "6bb795ec0254a9cbc3be3f8bfd3a1f30",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10669,
            "upload_time": "2024-11-17T02:56:09",
            "upload_time_iso_8601": "2024-11-17T02:56:09.630919Z",
            "url": "https://files.pythonhosted.org/packages/b9/74/2c392d239c3884248a92f1f6a17e2b4302ca57c85e58bd98469ca22f3e9e/duino_vscode_settings-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-17 02:56:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dhylands",
    "github_project": "duino_vscode_settings",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "pylint",
            "specs": []
        },
        {
            "name": "pyyaml",
            "specs": []
        },
        {
            "name": "yapf",
            "specs": []
        },
        {
            "name": "twine",
            "specs": []
        }
    ],
    "lcname": "duino-vscode-settings"
}
        
Elapsed time: 0.89027s