3.4.1 Create New Assembler Project

Figure 3-44. New Assembler Project

After pressing OK, select the microcontroller.

You can try out the Assembler build and code debugging using a simple LED-chaser code given below. It should fit any AVR 8-bit microcontroller by changing the port (here, case E) to your hardware.

start:
nop
ldi R16, 0xff
sts PORTE_DIR, r16

ldi r17, 0x80
output:
sts PORTE_OUT, r17
rol r17

ldi r16, 0x00
delay:
ldi r18, 0x00
delay1:
inc r18
brne delay1
inc r16
brne delay
break
rjmp output

When creating a new project or loading an old project, the project view will display all the project files. Files can be added, created, or removed from the project list using the context menu in the Solution Explorer window.

Figure 3-45. View of an Assembler Project

All the source files are listed at the end of the list. Double click on any file to open it in the editor.

All custom include files will be listed directly under the project name item unless you create a new folder in the project.

Figure 3-46. View of an Assembler Project after Build Completed

Dependencies: All the included files are listed here. Double click on any file to open it in the editor.

Labels: All labels in your assembler program are listed here. Double click on any item to show its location in the source. A marker will point to the correct line.

Output Files: All output files will be displayed below this item.

Figure 3-47. File Context Menu
Table 3-10. File Context Menu

Menu Text

Shortcut

Description

Open Right click O

Open the selected file

Open With...

Right click n

Open the selected file with another editor or tool

Cut

Ctrl X

Cut the file from the current category

Copy Ctrl C

Copy the file from the current category

Remove DEL

Remove the selected file from the project

Rename

F2

Rename the selected file

Set As EntryFile

Set the selected file as entry file

Properties Alt ENTER

Current file properties

Menu text

Shortcut

Description

All the interface views are docked by default. You can switch between docked and undocked views by dragging windows around to a desirable location or by dragging and dropping a window on a quick docking menu of the Visual Studio IDE. The quick docking menu will appear every time you start dragging an interface view or window.