title: Cannot open source file avr/io.h (dependency of hal.h) with Visual Studio Code on windows 10
body: <p>I want to implement an embedded project using stm32F0 (arm-based) with VS Code. The project ran properly on other systems.</p>
  <ol>
  <li>I Added C/C++ extension to visual studio</li>
  <li>I installed a compiler for cortex-m0 arm: GNU Arm Embedded toolchain/gcc arm for windows.</li>
  <li>Makefiles installed: binaries file + dependencies file</li>
  <li>openOCD installed (open On Chip Debugger)</li>
  <li>tasks.json (build instructions), c_cpp_properties.json (compiler path and IntelliSense settings) were created. I modified the Include path because my program includes header files that aren't in my workspace, and that is not in the standard library path.</li>
  </ol>
  <p>c_cpp_properties.json file</p>
  <pre><code>{
      &quot;configurations&quot;: [
          {
              &quot;name&quot;: &quot;Win32&quot;,
              &quot;includePath&quot;: [
                  &quot;${workspaceFolder}/**&quot; ,
                  &quot;C:\\Users\\lib\\chibios\\ChibiOS-313416b8fda90d9973a749a0a35970956852c286\\os\\hal\\include&quot;,
                  &quot;C:\\Users\\lib\\chibios\\ChibiOS-313416b8fda90d9973a749a0a35970956852c286\\os\\common\\ports\\ARM\\compilers\\GCC&quot;,
                  &quot;C:\\Users\\lib\\chibios\\ChibiOS-313416b8fda90d9973a749a0a35970956852c286\\os\\nil\\include&quot;
              ],
              &quot;defines&quot;: [
                  &quot;_DEBUG&quot;,
                  &quot;UNICODE&quot;,
                  &quot;_UNICODE&quot;
              ],
              &quot;compilerPath&quot;: &quot;E:\\tools-vs\\gcc-arm-none-eabi-10-2020-q4-major\\bin\\arm-none-eabi-g++&quot;, 
              &quot;cStandard&quot;: &quot;gnu11&quot;,
              &quot;cppStandard&quot;: &quot;gnu++14&quot;,
              &quot;intelliSenseMode&quot;: &quot;gcc-arm&quot;,
              &quot;browse&quot;: {
                  &quot;path&quot;: [
                      &quot;E:\\tools-vs\\gcc-arm-none-eabi-10-2020-q4-major\\lib\\gcc\\arm-none-eabi\\10.2.1\\include&quot;
                  ]
              }
          }
      ],
      &quot;version&quot;: 4
  }
  </code></pre>
  <p>After adding these paths, I still got errors:</p>
  <blockquote>
  <p>#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit</p>
  </blockquote>
  <blockquote>
  <p>cannot open source file &quot;avr/io.h&quot; (dependency of &quot;hal.h&quot;)</p>
  </blockquote>
  <p>As an embedded project has lots of libraries and dependencies, it is not possible to add paths of dependencies one by one. After solving and adding a path for one dependency, there should be another error.</p>
  <p>Another problem is that I cannot even find the dependency avr/io.h by myself in the directory.</p>
  <p>I used Keil before for other projects. When I compiled the code, it called all dependencies by itself. Before compiling, I didn't see dependencies on the tree section or any error for dependencies of header files.</p>
  <ul>
  <li>But, how VS Code can find dependencies before compiling?</li>
  <li>I also was wondering if I should add a path for main.cpp file and other C and CPP files in the configuration file of VS Code to solve these problems?</li>
  <li>For debugging, I don't see any debugger in the list, though I installed openOCD and add the path in the environment variable</li>
  </ul>
  <p>Much appreciated for any command or helpful resource, in advance.</p>