VS Code with the AVR

   :
https://izzudinhafizprojects.wordpress.com/2021/04/05/setting-up-visual-studio-code-vscode-for-avr-programming-not-arduino/
  :
https://www.tonymitchell.ca/posts/use-vscode-with-avr-toolchain/
includePath: No need to specify the AVR include paths as they will be included automatically.

	Makefile:
     makefile   avr atmega.
https://gist.github.com/stlehmann/e1931223dc18f1d575c4
https://github.com/richu101/VScode-AVR-programmer
http://mainloop.ru/avr-atmega/makefile-avr-gcc.html
https://github.com/GriDevE/Makefile-AVR-GCC

https://code.visualstudio.com/docs/cpp/configure-intellisense-crosscompilation
https://code.visualstudio.com/docs/editor/tasks
https://www.allisonthackston.com/articles/vscode-tasks-problemmatcher.html

//------------------------------------------------------------------------------
1. VS Code.      VS Code   data.
2.  C/C++ for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
https://github.com/microsoft/vscode-cpptools/releases/
3. AVR 8-Bit Toolchain (Windows)
https://www.microchip.com/en-us/tools-resources/develop/microchip-studio/gcc-compilers
 avr8-gnu-toolchain-3.7.0.1796-win32.any.x86_64.zip 
4. make.exe 
http://gnuwin32.sourceforge.net/packages/make.htm 	make-3.81.exe
https://github.com/mbuilov/gnumake-windows 			gnumake-4.3-x64
https://github.com/maweil/MakeForWindows/releases	GNU Make 4.4.1 x64
	    Atmel Studio 7
C:\Program Files (x86)\Atmel\Studio\7.0\shellutils\make.exe (4.1)

5.   PATH 
( make  gnuwin32   ?,  MinGW  Cygwin )

    ->  ->    ->   ->
  -> 
 : make
 : C:\Program Files (x86)\GnuWin32\bin\make.exe
 C:\Program Files\GnuWin\bin\make.exe

    ->  ->    ->   ->
  -> Path ->  -> 
C:\Program Files (x86)\GnuWin32\bin\
:
C:\Program Files\GnuWin\bin\
	:
C:\Program Files (x86)\Atmel\AVR Tools\AVR Toolchain\bin
:
C:/Program Files/Atmel/AVR Tools/avr8-gnu-toolchain-win32_x86/bin/
:
d:\_Portable\VSCodium\avr8-gnu-toolchain-win32_x86_64\bin\

     Windows 11/10
https://remontka.pro/environment-variables-windows/

6. GNU CoreUtils ( rm, ls, mv, mkdir  .)
https://gnuwin32.sourceforge.net/packages/coreutils.htm
    ->  ->    ->   ->
  -> Path ->  -> 	( )
C:\Program Files (x86)\GnuWin32\bin\
	:
c:\MinGW\bin\
c:\MinGW\msys\1.0\bin\
	 (https://www.msys2.org/  rm  CoreUtils  ):
c:\msys64\usr\bin\

  cmd:
avr-gcc --version
make --version

#   cmd GNU CoreUtils
ls -la

Some Makefile files (like ls, rm, mv, mkdir, etc.  those we are going to use later) 
might need other GNU tools that are part of the GNU CoreUtils.
//------------------------------------------------------------------------------
  
https://www.tonymitchell.ca/posts/use-vscode-with-avr-toolchain/
https://tinusaur.com/guides/avr-gcc-toolchain/
https://gist.github.com/stlehmann/e1931223dc18f1d575c4
https://github.com/GriDevE/Makefile-AVR-GCC
https://github.com/richu101/VScode-AVR-programmer

https://riptutorial.com/makefile
https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html#Automatic-Variables

1.       .vscode   Makefile
2.   *.c, *.h 
3.   \.vscode\c_cpp_properties.json    . :
"d:\\AVR\\avr8-gnu-toolchain-win32_x86_64\\bin\\avr-gcc.exe"
       -> Command Palette (Ctrl+Shift+P)
: C/C++: Edit Configurations 
4.   Makefile  TARGET, MCU, F_CPU:
TARGET = ATMega8_PWM_LCD
MCU = atmega8a
F_CPU = 1000000
5.   Makefile  .c   main.c  \
SRCS = main.c \
	lcd_lib_uni1.c

    ...\avr8-gnu-toolchain\avr\include\avr\io.h
__AVR_ATmega168P__ -> atmega168p

//------------------------------------------------------------------------------
	 ()  :

 VS Code:
Terminal > Run Build Task > AVR Build
Terminal > Run Build Task > AVR Clean

//------------------------------------------------------------------------------
	:
d:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe
d:\Program Files (x86)\Atmel\Studio\7.0\shellutils\make.exe

     Makeconf.   : MCU_1 = atmega168p
d:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h

//------------------------------------------------------------------------------
https://gist.github.com/stlehmann/e1931223dc18f1d575c4
# Compiler flags to generate dependency files.
GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d

//------------------------------------------------------------------------------
The clangd extension can't find includes vscode.htm
https://www.reddit.com/r/vscode/comments/fj76af/the_clangd_extension_cant_find_includes/

Clangd doesn't use c_cpp_properties.json (though maybe we should), so we really are reliant on compile_commands.json.
//------------------------------------------------------------------------------
Atmel Studio 7
GNU Make 4.1

Built for Windows32
