Welcome to avr-utils
.
This extension helps users to write and compile code for their avr microcontrollers straight from the comfort of their favourite Code editor, VScode
- Progress bar when downloading toolchain.
- Better error message diagnostics (Big Improvement!)
- Simplified Commenting of code.
More in Changelog.md
-
-
You can create a new avr project or import an existing project created from Microchip/Atmel studio.
After making a choice, VSCode will ask you to choose a folder.
- If opening a Microchip project, it asks for the project folder of your existing project.
- If creating a new project, it asks for the folder to put the project in, then it asks for a name for the project (then asks for permission to load the project if you already have another project open in the editor).
-
You may want to build the opened/newly creared project, but you encounter a popup saying you have no toolchain.
Don't worry, you just have to download a new toolchain (you don't have to have Microchip Studio), or if you already have
Microchip Studio
on your device, you can choose to take time to locate the folder within the install directory ofMicrochip Studio
which has the name "avr8-**
" and contains the following folders, or at least 90% of them.Generally, I recommend downloading a new toolchain to save you the time.
-
Before running a successful build in
c
, you need to select a microcontroller so that avr-gcc does not give build errors.
![IMAGE](assets/readme/1e-select-and-build.mp4.gif)Once you build the project successfully, you will get a
.elf
file, a.hex
file and an.o
file created for you within the Debug folder in your project.
-
-
-
After selecting a device, you can access it's definitions like for registers like
DDRA
orPORTA
. If the device has a register, you can pressCtrl
orCmd
and click the register variable using your pointer to get taken to the definition, and of course if the register doesn't exist on the selected device, you won't get definitions.Of course, this works on variables and functions too.
-
Header files within the project directory can also contribute to the definitions. In general, any file that you "
#include
" will contribute to the definitions.
-
The extension comes with some settings added to the command palette. Press Ctrl+Shift+P
or Cmd+Shift+P
and type "AVR Utils" to view them.
-
Open Microchip Project
: You can use this to open a project folder for a project created using Microchip Studio (a.k.a Atmel Studio) -
Create Project
: This is used to create a new project. This command also creates for you some very minimal boilerplate code inc
to get you started. -
Build/Compile
: This command only appears when the project has been opened and there is an activec
file.
Take note that this command can also be invoked simply by pressingF5
on your keyboard, or by the Build button at the bottom of the VSCode window.
The extension also now has some settings accessible from Ctrl+,
or Cmd+,
and then search for "AVR Utils":
Show terminal at each build
: This setting is useful to ensure that there are no build errors arising from your code since an extension cannot directly getstdout
from the terminal to parse errors. You can turn this off in case you don't need it.
If you have the extension ms-vscode.cpptools
installed, it will cause red squiggles in your code, plus it will create extra buttons in the ui which may not build your AVR.
Therefore to solve this, I registered a new language called "AVR C
" which handles the same file extension .c
and so if you need to use your IDE for normal C development, you can just switch the language as shown below.
Release notes section.
- Changed README to use gifs
- Changed all video assets to gifs
- Better integration with Assembly language development.
- Code coloring following tmLanguage rules for both
avr-c
andasm/s
. - Published to VSCode Marketplace
Initial release of avr-utils