Once you've written your code, it's time to get to the fun part—actually running it on your hardware.
First, you have to let AVRsack know what hardware you want to target. You do this with three popup buttons in the window toolbar:
Board
menu specifies the hardware you want to use (Typically either an Arduino or compatible board, or a "raw" microcontroller).Programmer
menu specifies what protocol you want to use to program the board. Most Arduino-style boards come with a bootloader and use a fixed protocol, so this setting is ignored for regular programming and only is used when burning a new bootloader. When programming raw microcontrollers, on the other hand, this setting is always used.Port
menu lists available serial ports. Ports used in the past, but not currently available, are listed in italics, while available ports are listed in a regular font.If all the necessary target information is selected (and the selected port exists), the Upload
button in the toolbar becomes active. Clicking the button will compile your program (and, if necessary, the selected Arduino core and libraries) and then upload it to your board.
If you need more (or less) information for your upload, you can adjust the verbosity in the Preferences dialog.
In typical Arduino boards, the running program conducts its serial communication on the same port used for uploading the program. To interact with the serial port, click the Connect
button in the toolbar.
However, AVRsack also supports connecting to arbitrary serial ports (and an unlimited number of them) through the Sketch
→Serial Monitor
submenu.
If you would like to see what machine instructions are produced for your program, click the Disasm
toolbar button. The Disassembly window will then show an assembler listing of the machine code, interspersed with your original source code (If you prefer, you can turn off the source code display in the Preferences dialog.