Introduction

VSM STUDIO

Overview

VSM Studio is a integrated development environment (IDE) included with Proteus 8 and designed to work seamlessly with the Proteus VSM simulation software. In addition to all the features you would expect from a development environment we have included:

  • Automatic detection and configuration of a large and growing number of compilers such that they produce the output format most compatible with a Proteus VSM simulation. This happens literally at the push of a button so you can start work on a project and then compile from inside VSM Studio without having to learn and change compiler argument lists.
  • Direct communication with the schematic module. Successful compilation of source code automatically applies the firmware to the microcontroller component on the schematic. Debugging commands in VSM Studio (breakpoints, single step, etc.) synchronously advance and pause the schematic simulation.
  • Active popup technology allows you to specify areas of interest on the schematic and have them appear as docket windows in the VSM Studio IDE during simulation. This allows you to both view (e.g LCD Display) and interact (e.g. buttons, switches) with your schematic while debugging inside the IDE.
  • Unique peripheral gallery and high level driver functions for use with Arduino.

About this Documentation

This help file contains a simple walkthrough tutorial and some general usage information on working with the VSM Studio IDE.

More specific help is available for all dialogue forms in VSM Studio via either the question mark button at the top of the dialogue form or via the F1 keyboard shortcut.

More detailed discussion on Proteus VSM and advanced debugging techniques are covered in the main Proteus VSM tutorial while information on creating schematics for both simulation and PCB layout is covered in the ISIS tutorial. We strongly recommend that in addition to this document you spend some time reviewing areas of these documents applicable to your work.


GUIDED TOUR

Overview

VSM Studio should look familiar to most users who have previous experience with writing code in an IDE. It is a top level application module in Proteus 8 and can be opened at any time from the application module toolbar.

This module is used for both firmware development and for firmware debugging. There are therefore two layout profiles, depending on the mode of operation.

Editing Layout

The Editing Layout has three main areas:

.

Project Tree

The project tree contains a sorted list of the files in the current project. This can include source files, header files, library files and include files

View of the Project Tree with an Open Project.

  • Double clicking on a file in the Project Tree will open the file in the Editing Window.
  • Right clicking on a file presents a context menu which, amongst other things, allows you to remove the file from the project.

Context Menu on File

  • Right clicking on a category (e.g. Source Files) presents a different context menu which allows you to add either new or existing files to that category of the project.

Context Menu on File Category.

You can also add and remove files from the project directly from the Source Menu.

Editing Window

The editing window is where all the source files open for viewing and editing. If you have multiple files open at one time each file will become a tab on the editing window.

Multiple Tabs for Opened Files in the Editing Window.

You can switch between tabs by clicking on the tab you wish to view. Closing a file from the Editing Window (via the cross at the right hand side of the tab) removes the file from the Editing Window but not from the Project Tree.

When writing or editing firmware you will find most common editing commands directly on the right click context menu. These commands are also available from the Edit Menu.

Editing Window Context Menu.

Output Window

The Output Menu will display the result of project compilation as well as additional information and prompts.

Output Window Display after Compilation.

It will also display detection and configuration status when you check for installed compilers

See Also:

VSM Studio Tutorial - Writing the Program

Debugging Layout

Source Code Display

Source code is displayed when the simulation is paused, either manually or when a breakpoint has been reached. From here, you can then:

  • Navigate the source file or select a different source file from the combo box at the top

  • Single step debug or set breakpoints either from the icon strip or via keyboard shortcut commands.

  • Change the level of debugging to and from assembler and high level source.

See Also:

VSM Studio Tutorial : Simulation and Debugging

Active Popup Panel

If you define any active popups on the schematic they will (by default) appear docked on the right hand side when the simulation is running.

Active popups are both visual and interactive. You can click on a button or flick a switch in an active popup in exactly the same way as you would on the full schematic.

See Also:

VSM Studio Tutorial : Active Popups

An assumption is made when you define an active popup that your primary interest is debugging the firmware and not the hardware. You will find therefore that the VSM Studio tab will automatically come to the foreground when a simulation is started. If you have no active popups defined on the schematic then the schematic tab will come to the foreground when you start a simulation.

Debugging Windows

Proteus contains a large number of memory dump windows, watch windows, register and stack displays which can all be launched from the Debug Menu in VSM Studio.

When you open a debug window it will appear docked at the bottom of the VSM Studio frame. All debug windows except the watch window are inactive during free running simulation but will display status when the simulation is paused or single step debugged.

Toolbar

The toolbar in VSM Studio provides quick access to a number of frequently used commands, most of which will be easily recognisable to users.

VSM Studio Toolbar.

See the Icon Reference Chart for a description of each icon.

See the section on Debugging for more information on using VSM Studio with Proteus VSM.

Window Positioning and Styling

The various windows in both the editing and the debugging layout can all be sized and positioned using standard techniques:

  • Dragging and dropping from the grey title bar of the window allows you to reposition.
  • Double clicking on the grey title bar or single clicking on the double rectangle icon will allow the window to float.
  • Double clicking on the grey title bar while a window is floating will dock the window in it's previous location. Alternatively you can drag a floating window to a new docked position.
  • The output window can be closed completely either via the cross at the right hand side of it's title bar or by right clicking on the toolbar as described above.
  • The Project Tree and Output Window can both be resized by dragging and dropping the edge of the windows.

Styling and colours of the various windows can be modified via the Editor Configuration command on the System Menu

First select the Fonts and Colours tab and choose which window you wish to configure.

Choose the Window for Configuration.

  • Next select the display item you wish to change and adjust using the styling commands on the right hand side of the dialogue form.
  • Repeat for any other display items.
  • Exit the dialogue form with the OK button to commit your changes.

The Editing Window contains several other styling options which allow you to configure things like code folding, indentation and line highlighting. As with all dialogue forms, specific information on these options can be found by selecting the editor tab and then clicking on the question mark icon at the top right.

Launching Context Sensitive Help for the Editor Configuration.


New Project

NEW PROJECT TUTORIAL

Introduction

The purpose of this tutorial is to show you, from first principles, how to conduct an interactive simulation using Proteus VSM. Both the schematic and the firmware are kept as simple as possible but the techniques covered will scale to projects of any size.

The circuit we will be using for the simulation is a pair of traffic lights connected to a PIC16F84 microcontroller as shown below:

The PIC16F84 is included free of charge with any Proteus purchase so you can follow this tutorial even if you don't have a license for any Proteus VSM products.

The New Project Wizard

The easiest way to get started with a Proteus 8 project is to use the New Project Wizard on the home page. The home page appears when you first open Proteus or can be launched from the module toolbar at the top of the application.

The first page of the wizard allows you to specify a name and destination directory for the project.

We will need a schematic design so check the box at the top of the next page and select a suitable size (default is fine).

We don't need a PCB layout for this project so if you see this page you can skip past it. If you do not have a license for a PCB product this page will not appear in the wizard.

On the firmware page of the wizard we need to do some configuration. First select the create firmware checkbox and then specify the family and the microcontroller.

For simplicity we are going to write our little program in assembly and will use the MPASM assembler installed with the Proteus software. All we need to do therefore is select the pre-configured MPASM assembler from the compiler drop-down list.

This will narrow down the list of supported compilers to those applicable to the specified controller. Depending on whether the compiler is installed on your computer or not, it's entry in the combo box will have a 'not configured' suffix.

If you want to use a compiler that is not installed then you can click on the compilers button at the right hand side. The resulting dialogue will either let you download directly from Labcenter's website or will take you to the download page on the compiler vendor site. In either case, your procedure would be to install the compiler and then click on the 'check all' button at the bottom of the dialogue form to enable it's Proteus configuration.

See Also :

Compilers and Compiler Detection.

Our last option is to create some skeleton firmware files. This is very useful as it will also set up linker scripts for us so leave this selected.

Configured settings for the tutorial project.

If we were working with Arduino then we could also check the option for 'Create Peripherals'. This enables the use of Labcenter peripheral drivers for Arduino shields and breakout boards, making development with these devices much simpler.

See Also:

Working with Arduino

The last page of the wizard is then a summary of our configuration before we complete and create the project.

Exploring the Project

When you exit the wizard Proteus will create a new project which at first sight will look something like the following.

Quite a lot has happened at this point. Proteus has created two modules, one for the schematic capture design and the second for your firmware development. These modules are docked as tabs and you can switch between them by clicking on the tab at the top of the application (or via the CTRL+TAB shortcut key).

You can also split screen the two tabs by dragging one onto another monitor or a free area of your desktop.

The VSM Studio module has created a firmware project for you, populated it with a skeleton source file and configured the compile options for use with Proteus VSM. Meanwhile, in ISIS (the schematic module) the selected processor has been placed and powered.

We now need to complete our schematic design and write the firmware code to drive the simulation.

Drawing the Circuit

Note that the circuit will be auto-drawn if you are working with Arduino as all you need to is import the shields or breakout boards.

We will start by placing and wiring two sets of traffic lights on the schematic. Since much of the detail of schematic placement is covered in the schematic tutorial we will move through this section fairly quickly.

Click on the schematic capture tab to enter the schematic module and then select component mode and use the 'P' button above the Object Selector to launch the Library Browser.

Type 'traffic lights' in the keywords list and then double click on the item in the results list to pick the part into the design. You should then see it appear in the object selector.

Close the library browser and click the mouse once on the traffic lights part in the object selector. This will highlight your selection and a preview of the device will appear in the Overview Window.

Now, left click on the Editing Window to enter placement mode, move the mouse to the desired location and left click again to place the part on the schematic. Repeat the process to place the second set of traffic lights.

Movement and Orientation

Our wiring will be far simpler if the traffic lights are placed to the right of the processor. To move a component, point the mouse at it, right click (this will highlight the component) and select 'Drag Component' from the resulting context menu.

You can then move the mouse which will 'carry' the component and left click to place in it's desired location. At this stage you want something like the following.

Zooming

In order to wire up the schematic it is useful to be able to zoom in to a specific area. The easiest way to do this is to hold down the SHIFT key and drag a box around the area you want to zoom into. Alternatively, you can use the middle mouse wheel or the F6 and F7 keyboard shortcuts to zoom in and out around the current mouse position. You can revert to a full screen view at any time using the F8 shortcut key. Finally, menu icons at the top of the application provide access to the same functions.

Wiring Up

Zoom in to the PIC microcontroller until all of the pins are visible and then place the mouse pointer over the end of pin 6 (RB0/INT). The mouse cursor will change to a green pen to indicate that you are on the pin tip and can start wire placement.

Left click the mouse to start a wire and then move the mouse to the pin connected to the red light on one of the sets of traffic lights. When you arrive at the pin on the traffic lights the mouse cursor will again change colour and you can left click to commit the wire placement.

Repeat the process to wire up both sets of traffic lights, using the following as a guide.

If you need more control over wire placement you can left click to change direction at any time while placing a wire.

If you make a mistake during wire placement use the ESCAPE key to abort the wire. If you make a wiring error you can delete the wire by right clicking the mouse on the wire and selecting delete from the resulting context menu.

There are a couple of points worth noting about the wiring process:

  • You can wire up in any mode - ISIS is clever enough to determine what you are doing.
  • You can left click the mouse during wire placement to commit existing wiring and change direction at that point.
  • ISIS will automatically pan the screen if you nudge the edge of the Editing window while placing a wire. This means that you can zoom in to the most suitable level for placing the wire and, so long as you know the approximate position of the target component, simple nudge the screen over until it is in view. Alternatively, you can zoom in and out while placing wires using either middle mouse wheel or the F6 and F7 keys.

We now have a simple schematic which we can drive by writing some firmware.

Writing the Program

Click on the VSM Studio tab to switch the application to the firmware IDE. For the purposes of this tutorial we will use the following program which will enable the PIC to control the traffic lights. You can either type directly or copy and paste the following into the source file in VSM Studio.

;====================================================================

; DEFINITIONS

;====================================================================

#include p16f84a.inc ; Include register definition file

;====================================================================

; VARIABLES

;====================================================================

cblock 0x10 ; Temporary storage

state

l1,l2

endc

;====================================================================

; RESET and INTERRUPT VECTORS

;====================================================================

; Reset Vector

RST code 0x0

goto setports

;====================================================================

; CODE SEGMENT

;====================================================================

PGM code

setports

clrw

movwf PORTA

movwf PORTB

bsf STATUS,RP0

clrw

movwf TRISB

bcf STATUS,RP0

initialise

clrw

movwf PORTB

loop

call getmask

movwf PORTB

incf state,W

andlw 0x04

movwf state

call wait

goto loop

; Function to return bitmask for output port for current state.

; Top nibble controls one set of lights and bottom nibble the other.

getmask

movf state, W

addwf PCL,F

retlw 0x41 ; Green and Red.

retlw 0x23 ; Amber and Red/Green.

retlw 0x14 ; Red and Green.

retlw 0x32 ; Red/Amber and Green.

; Simple delay routine.

wait

movlw 0xFF

movwf l1

w1 decfsz l1

goto w1

return

wait2 clrf l2

w2 decfsz l2

goto w2

return

;======================================================

END

See Also:

Firmware Development

There is, in fact, a deliberate mistake in this program but we'll come back to that later.

Compilation

If need be, project settings can be accessed from the context menu after right clicking on the project name (or via the Build Menu).

Switching to the compiler tab then provides access to all of the arguments available to the specified Tool Chain. Notice that both the assembler and linker options have been configured for us and - for this simple project - the default settings are sufficient.

See Also:

Project Settings

Since no further configuration is required we can go ahead and build our program. Select the build project option from the build menu or use the F7 keyboard shortcut to start compilation. Output from the assembler will be written to the output window at the bottom of the IDE and you should see a 'Compiled Successfully' message when complete.

Simulation and Debugging

We now have both compiled firmware and a design to test it on. To start a simulation simply press the play button at the bottom left of the application.

This will switch the application to the schematic module and the simulation will start running. Elapsed time and percentage CPU consumed are displayed on the status bar while the schematic will indicate the state of the circuit given the currently executing firmware.

In our example what you will see is that one of the traffic lights is green while the other is red. Unfortunately, they are not changing state due to a bug in our firmware. Time to look at the source code and do some debugging.

Setting Breakpoints

Start by clicking the Pause button on the animation control panel at the bottom of the application. This will pause the simulation and the focus will switch back to the VSM Studio IDE.

In the editing window area of the IDE you should the executing program with a line overlay of the current instruction.

Looking at the program it can be seen that it loops back on itself on a repeating cycle. It would therefore be a good idea to set a breakpoint at the beginning of this loop at the call to the getmask routine.

You can do this by clicking on the line and on the breakpoint icon. Alternatively, double clicking on the source line will set the breakpoint automatically.

Having set the breakpoint, use the play button to run the simulation. It will in short order pause again, this time with the executing source line on our breakpoint.

A list of debugging commands are given on the debug menu and replicated on the debug toolbar but the one we will be using most often is F11 to single step through the program.

If you try this now you should see the execution of the call instruction, leaving us at the entry point of the getmask instruction. Before we step further it's worth opening some more debug windows so that we can verify correct operation. From the debug menu, select the registers window which will appear as a tab at the bottom of VSM Studio. If we execute a single step operation (F11) now we should see that the value of the state variable is applied to the W register.

Stepping forward again, we will see that we 'land' in the expected place for adding an offset of zero onto our lookup table. A further step exits us from the getmask routine with a valid mask representing Green and Red - exactly what we see on the schematic traffic lights.

If we continue to single step (F11) while watching the registers display we can see that we write the correct mask to the port (PORTB equals our mask) and then that we correctly increment the state (value for W is incremented). The next instruction is designed to wrap the state around to zero when it is incremented above 3 and we need to look more closely at the state variable to verify this. The easiest way to do this is to open the watch window and then monitor the address of the state variable. You can open the watch window from the Debug Menu and it will appear as a tab at the bottom of VSM Studio.

Now right click on the watch window and select add item by address. Type the variable name (state) and the address as 0x10 (as we specified in our firmware) and click Add then Done.

Now single step the code beyond the setting of the state variable to check whether it increments correctly. We can see straight away that this is not happening. On closer investigation the problem is caused by ANDing with 4 instead of with 3. The states we want are 0,1,2,3 and any of those values when ANDed with 4 gives 0. The solution is simply to change the problem instruction to AND the state with 3 instead of with 4.

To do this we must first stop our debugging session (click the stop button on the animation control panel).

After changing the problem line of code we need to re-compile (F7) and then run our simulation again. We will soon hit our breakpoint and can repeat our single stepping exercise to validate our change. Alternatively, right click on the editing window in VSM Studio and select the clear all breakpoints command to allow the simulation to run freely. It should be clear from the schematic alone that things are now working !

Active Popups

It is an inconvenience to have to switch between the source code you are stepping through and the design you are testing. Fortunately, you can bring parts of your schematic into your debugging IDE by using Active Popups.

With the simulation stopped switch to the schematic capture module and then select the Active Popup icon. Now drag out boxes around areas of interest on the schematic - in our case this would be both sets of traffic lights.

Now, when you run the simulation the animation takes place inside VSM Studio and - more importantly - when you single step debug you will see the effects of your code execution without having to switch to the schematic.

There is a great deal more power to the VSM simulation and debugging than we have covered here. We strongly recommend you work fully through the main VSM tutorial which works with the Microchip F1 Evaluation board using C language programming and therefore presents far more realistic debugging scenarios.


Import Project

IMPORT TUTORIAL

Introduction

The purpose of this short tutorial is to show you how to bring legacy Proteus VSM projects into Proteus 8. It is not intended as a functional tutorial on the use of Proteus 8 during simulation or testing.

We will use an old (Proteus 7) PIC calculator design as our example but the steps in this tutorial would apply to any legacy Proteus VSM project.

Importing the Schematic

The first thing to do is bring the existing schematic design file (*.dsn) into Proteus 8. To do this goto the home page in Proteus click on the Import Legacy Design button.

Find the schematic you want to import and specify a name and location for the new Proteus 8 project.

After clicking on the import button you should see your VSM project open in the ISIS application tab.

In order to best simulate and debug this design we now need to create an associated VSM Studio project.

Creating the VSM Studio Project

We need to bind the microcontroller on the schematic to our new firmware project. To do this, edit the processor part and then click on the Edit Firmware button on the resulting dialogue form.

Since we have no current project or firmware we will get a blank VSM Studio tab and a new firmware project wizard will appear to help us set up our project.

The processor family and processor variant will be auto-selected based on the micro-controller part on the schematic. We need to change the compiler field based on what we have installed and what was used to compile the program previously. In our case we used the MPLAB C18 compiler so we select that one.

See Also:

Compilers and Compiler Detection

Finally, the checkbox at the bottom of the wizard is used to create a skeleton template source file to help with getting started in writing firmware. This is very useful when starting a new project from scratch but since we are importing existing source code we don't need this and can de-select the option.

After exiting the dialogue form you should now see a project with the processor name in the project tree area of VSM Studio; our next step is to import our source to this project.

Importing the Source Files

Right click on the project name and select the 'Add Files' command from the resulting context menu (or launch from the Source menu).

This opens a standard windows file dialogue form from which you can navigate and select your old source files.

Holding the CTRL key down while clicking on files in this dialogue let's you select more than one file for import.

Repeat as necessary until all your source files have been imported. When you are finished all of our existing work is inside Proteus 8. Double clicking on a source file will open it in the Editing Window if changes are required.

Project Settings

In order to successfully compile the project we need to have the same option set as was used previously. In the majority of cases this is simply the default option set which is automatically configured for you by VSM Studio. However, it is not uncommon to have additional include directories or other project specific options which will need to be manually added to the project settings.

You can launch project settings either by right clicking in the project tree or from the Build menu in VSM Studio.

The Embed Files checkbox on the controller tab is worthy of further discussion.

When this option is selected all source files are stored inside the main Proteus PDSPRJ file. A temporary session directory is used for compilation and simulation. This has the advantage that the Proteus project is portable and self-contained. If you turn this checkbox off then all of the source files will be deposited in the same directory as the main Proteus file. It then becomes your responsibility to organise and maintain relative/absolute paths to various files in the project.

Switching to the compiler tab then allows you set options for the compiler, assembler, linker and lib tools in your chosen toolchain.

In our example, the default configuration is fine so no changes are required.

See Also :

Project Settings and Configurations

Compile and Run

The last thing we need to do is build the source code and run a simulation. You can compile the project at any time using the F7 shortcut key or via the build project command on the Build menu.

During the compile process, messages from the tool chain will be displayed in the Output Window at the bottom of the VSM Studio IDE and a 'compiled successfully' message is displayed if no problems are encountered.

A successful compile in VSM Studio automatically sends the firmware to the microcontroller part on the schematic ready for simulation. In order to run our program on our schematic all we need to do is press the play button on the animation control panel.

Debugging and testing is beyond the scope of this tutorial but is covered in brief in the new project tutorial and in full in the main Proteus VSM tutorial.


COMPILERS

Overview

One of the most important features in VSM Studio is the automatic detection and configuration of supported compilers to ensure that they work correctly with the Proteus VSM simulation software. This means that for the typical project, all the user needs to know is that a supported compiler is installed.

Supported Compilers

The following is the current list of supported compilers - please see the section below for instructions on scanning and downloading. While a relatively small subset of the compilers on the market at present we have focussed on providing support for at least one free toolchain per supported family and then including a few other popular compilers.

We do plan to extend the list of supported compilers over time and welcome suggestions (support@labcenter.com). In order to add support for a compiler it must be able to produce a standard debug format and we must be able to test the product with Proteus to ensure compatibility. Additionally, support for a given compiler will depend on it's popularity and demand from users.

IAR
  • IAR for 8051
  • IAR for ARM
MPLAB
  • MPLAB C18
  • MPLAB C30
  • MPASM
  • MPLAB XC8
  • MPLAB XC16
CCS
  • CCS for PIC
CodeComposer
  • CodeComposer for MSP430
  • CodeComposer for PICCOLO
GCC
  • GCC for ARM
  • WinAVR
  • SDCC for 8051
  • GCC for MSP430
Hi-Tech
  • Hi-Tech for PIC10/12/16
  • Hi-Tech for PIC18
  • Hi-Tech for dsPIC
ASEM-51
  • ASEM-51 for 8051 (assembler only)
AVRASM
  • AVRASM for AVR (assembler only)
  • BASCOM AVR
Keil
  • Keil uVision4 for 8051
  • Keil for ARM

Compiler Detection

When you first open the VSM Studio module on a new Proteus install it will automatically scan your computer to detect existing installations of supported compilers. You can view the results of this scan by selecting the compilers configuration command from the System Menu.

  • Use the 'check-all' button to perform a full re-scan and locate new installations.
  • If you select a compiler in the list you can use the 'check' button to attempt to locate that particular compiler.
  • If you have a compiler installed on another drive you can manually tell VSM Studio where it is by selecting the compiler and then using the 'Manual' button. Alternatively, click on the compiler directory field for the compiler in question and type the location in manually.

Entering the location of a compiler manually.

Exit the dialogue form with the OK button to commit changes.

To Install a New Compiler:

  1. Open the Compiler Configuration dialogue from the System Menu in VSM Studio.

  2. Either click on the Download button (Open Source) or the Website button (Proprietary) to download the compiler.
  3. Install the compiler in the usual way.
  4. Use the 'check all' button on the compiler config dialogue form to locate and automatically configure compiler settings.

The results of any scan will appear in the Output Window. Note that older versions of some compilers are not supported as they either cannot be found to be tested or cannot generate a suitable output format.

Use the F1 key or click the mouse on the question mark on the dialogue form for more detailed information.

Compiler Configuration

Once a compiler has been detected it is automatically configured to produce output compatible with source level debugging in Proteus VSM and also to produce binary for programming a physical chip with. These are called the Debug and Release configurations respectively.

In practise, only the Debug configuration is relevant to working with Proteus and is therefore always the default when a project is opened or created.

Debug configuration for use with Proteus simulation.

For many projects all we need do is build the project (project menu - build project command) once firmware has been written. However, if need be, all compiler/assembler/linker options can be edited or added to from the Project Settings dialogue form.

Select Project Settings from the Build Menu inside VSM Studio (or from the right click context menu on the project file tree).

Ensure that you are editing the correct configuration and switch to the compiler tab of the dialogue.

Editing compiler options for the Debug configuration.

There are a number of tools (depending on which toolchain you are using) which can be selected individually from the top left of this tab and then a number of options which can be added for each tool.

Editing configuration options for tools in a toolchain.

More information on particular options can be found in the reference manual for the specific compiler.

The Defaults button on the dialogue will restore the settings to the preset configuration.

Once selected, you cannot change the toolchain for a given project. If you have mistakenly selected a toolchain you will need to delete the project (right click on the project in the VSM Studio project tree) and then create a new one.

Output Files

When you compile in Debug configuration (the default) the output files are largely dependant on the compiler. For example, in the PIC world the object file is typically a COF file, whereas for AVR and ARM it is normally an ELF/DWARF file pair. You don't actually need to worry about any of this since VSM Studio will automatically configure the compiler to produce the most suitable fileset for simulation with Proteus. Since the VSM Studio is part of Proteus 8 output files are automatically transmitted to the schematic capture for simulation as well. In short, no user action required for simulation with Proteus.

If however, you are then programming a physical device, you will need to make some adjustments. First, you will need to change the configuration from Debug to Release. This will ensure generation of a binary HEX file

Unlike a Debug configuration, the Release configuration will drop the HEX file outside of the Proteus 8 project file (*.pdsprj), allowing you to use it for programming a real board. This file is deposited in the same directory as the Proteus project but separately.


WORKING WITH ARDUINO

Introduction

Arduino is an extremely popular electronics environment consisting of ready-made circuit boards (shields and breakouts) and comprehensive software libraries that make it easy to drive them. Proteus supports Arduino simulation through our support of the required AVR models and our huge libraries of embedded peripheral models mean that we can also simulate most of the shields and breakout boards as well.

Since we have all of the technology we've put quite a bit of time into making working with Arduino in Proteus as simple and intuitive as possible. This means that working in VSM Studio with Arduino can be much different than for other processor targets as described in the topics below.

Summary workflow for Proteus VSM for Arduino with the VSM Studio IDE.

New Project Wizard

In the New Project Wizard the default options will suffice until the firmware page when we want to select the Create Firmware Project option. The target family is Arduino (not AVR) and let's choose the controller as the Arduino Uno. The other important options is to make sure that both the Create Quick Start Files and the Create Peripherals options are selected.

The Create Peripherals checkbox is vital here as it will allow you to choose from all of the prepared shields and breakout boards and will initialize all of the Labcenter peripheral drivers that work with them. If this box is unchecked you can still work with Arduino but will have no access to the Labcenter peripheral drivers in VSM Studio.

Default settings for the rest of the New Project Wizard are then fine.

Once complete, you will end up with a source code project in VSM Studio which includes a sizeable amount of pre-generated code.

Those who work with MFC or similar will find this familiar but the key thing is not to disturb, change or move the generated code. This is used by the Labcenter drivers and will update as you add peripherals so needs to be managed by the Proteus software. You should ignore this section of code and write your code inside the setup() and loop() routines as normal.

On the schematic you will find a pre-placed Arduino Uno.

Design Phase

The first thing to do now is to browse and add your shields and breakout boards. We've simplified this by adding an 'Add Peripheral' command to the Project menu and the right click context menu on the project tree.

This presents you with a peripheral gallery containing a number of Adafruit shields, breakout boards, grove peripherals and motor control shields.

You can add these to your project by selecting them and clicking the Add button or by double clicking. For a simple test we'll add a momentary action push button and an LED from the breakout peripherals category.

These will then appear both in the project tree in VSM Studio and will be placed for you on the schematic.

Connectivity is achieved on the schematic by terminal so in our case the button is connected to IO2 and the LED is connected to IO10.

In our firmware, we can see a number of methods for controlling the LED but there are no extra methods for the button. We can drag and drop these methods onto the source code to help us control the peripherals. Let's say we want to turn the LED on while the button is down. We start our while loop and then simply drag from the button in the project tree and drop onto the source code.

Inside our while routine we want to turn the LED on. This time hold the CTRL button down and drag and drop the on method of the LED. Note that the caret moves as you move the mouse so that you can position wherever you like.

Finally, we need to turn the LED off outside the while loop. Again we can just drag and drop the off method into the correct place in our program.

That's it. Obviously a trivial example but the same principles hold true whether its an LED, a BLDC motor or a TFT display.

Summary:
  • Don't change or move the generated code at the top of the file.
  • If you drag and drop normally the code snippet will insert wherever the mouse caret is at in the file.
  • If you hold the CTRL button down while dragging then the mouse caret will move with the drag and the code snippet will be inserted at the caret position when you release the mouse.

Working without Labcenter Drivers

You may decide that you don't want to use the Labcenter peripheral drivers or that you want to create your own shield / add electronics to the schematic etc. In cases like this you should de-select the create peripherals button in the New Project Wizard

You will end up with a blank sketch (no pre-generated code) and you will have to add any shields etc from the Import Project Clip command on the File menu on the schematic.

When you do this you will not also import the Labcenter drivers for that shield/peripheral and will have to code your program at the level of Arduino C++. This may provide extra flexibility but is less simple.


Firmware_Development

Overview

Writing or editing code in VSMStudio is much the same as in any other IDE. Once you have created or imported your project you can start work in earnest. This section of the documentation details how to perform some common tasks in the IDE.

Adding / Removing / Renaming Files

To add a file to the project

Either

Right click on the project category and select the Add Existing File or Add New File command from the context menu. Note you must right click on the category (e.g. Source Files) and not on a file itself.

Or

Select the Add Existing File or Add New File command directly from the Project Menu.

To remove a file from the project

Either

Right click on the file in the project tree and select the remove file command from the resulting context menu.

Or

Select the remove file command on the Project Menu. This will remove the file currently selected in the Project Tree.

In both cases the file will be removed from the project but will not be deleted from disk.

To rename a file

Right click on the file in the Project Tree and select the rename option from the resulting context menu.

Renaming a file will both rename it in the project and on disk.

Opening and Closing Files for Editing

  • To open a project file in the Editing Window simply double click on the file in the project tree.

  • To close a file in the Editing Window use the small cross at the top right of the tab. This will close the file but will not remove it from the project.

  • To switch between open files in the Editing Window use the CTRL+TAB shortcut key or click on the appropriate tab at the top of the editing window.

Find and Replace

To find text in the project

  1. Launch the Find dialogue form either by right clicking in the Editing Window or from the Edit Menu.

  2. Enter the string you wish to find and, optionally, the text you wish to replace it with.

  3. Specify the scope of the search (current document, all open documents, current project).
  4. Specify any additional search options. The regular expression syntax is based on the Perl regular expression language but should be considered an advanced option.

You can use the F3 shortcut key instead of the Find Next button when searching through a file for a particular instance of the search term.

Editor Colours and Styles

You can change the look and feel of the IDE by selecting the Editor Configuration command from the Config menu. The 'Fonts and Colours' tab of this dialogue form will allow you to change the syntax highlighting options for the various windows in the IDE whilst the 'Editor' tab provides some specific configuration options for the Editing Window.

Use the context sensitive help on the dialogue form tabs for more specific help.

Compiler Settings and Compilation

To compile your project.

  1. Make sure the configuration from the combo box on the toolbar (Debug configuration for use with Proteus).
  2. Click on the build button directly to the left of the configuration combo box on the toolbox or select Build Project from the Project Menu.

  3. Compiler information will be displayed in the Output window and should end with a 'Compiled Successfully' message.

To find and fix compiler errors

  1. Locate the error message in the Output Window.
  2. Click on the message to locate the line in the Editing window.

To find and fix linker errors

It may be that the error is a linker error or requires that you edit the project settings to bring in a library or include file. To do this, first launch the project settings dialogue form and select the compiler tab.

Next, select the tool that you need to specify additional options for (CC is compiler, ASM is assembler, LD is linker etc.) and select the option you need from the right hand side. More information on options will be available in the user manual of the compiler itself, although the most common would be '-L' to add a directory to the library search path.

Add the option and enter the value (directory path for the above example).

Finally, exit the dialogue form and re-compile the project.

Working with Proteus VSM

All projects in VSM Studio should have an ISIS schematic associated with them so that you can seamlessly move from code development to the testing and debugging phase.

  • If a schematic is associated with the project then simply click on the ISIS button on the toolbar at the top of the editor to launch ISIS and program the processor for simulation.
  • If you have not yet associated a schematic with the project you can do so by selecting the Add Design File option from the Project menu. Once added to the project, launch ISIS for simulation as above.
  • If you have not yet designed the schematic to accompany the project launch ISIS, develop the schematic and then add it to the VSM Studio project as above.

More information on testing and debugging can be found here.


TESTING AND DEBUGGING

Overview

Proteus contains a huge number of debugging tools to help you fault find in both your hardware and your firmware. A complete walkthrough of these techniques is covered separately in the Proteus VSM tutorial which we strongly recommend you read. In this topic we will provide some summary instruction on common debugging techniques within the VSM Studio IDE.

When you run a simulation the window layout in VSM Studio changes from the editing layout to the debugging layout. This allows you to launch and view various debug windows, to set breakpoints and single step your code and to view and interact with Active Popups. It also disables the ability to edit your code - if you want to make changes to your firmware you must first stop the simulation.

Breakpoints

When a simulation is free running the source window and most of the debugging windows are disabled. This is because instructions are typically executing at a speed that would making viewing them impossible.

To view your source code you need to pause the simulation. You can do this at any time by pressing the pause button in the animation control panel.

This is actually a breakpoint but under direct user control - you typically have no idea what source code is executing when you hit the pause button. Far more useful is the ability to specify where in the source code you wish to pause.

Setting Breakpoints

Start the simulation with the pause button. This will pause at time zero (simulation 'booted' but no code executed).

In VSM Studio select the relevant source file from the combo box at the top of the source window.

Find the source line you wish to set the breakpoint on and either :

Double click on the source line

Click on the source line and then use the breakpoint icon to set the breakpoint.

Left click on the line, then right click on the line and choose the toggle breakpoint option from the resulting context menu.

Now that the breakpoint is set, press the play button to run the simulation. The simulation will automatically stop just before it executes the line of code on which the breakpoint is set.

Controlling Breakpoints

There are several ways in which you can selectively or globally disable and clear breakpoints.

If you right click on the source window while the simulation is paused you can either disable all breakpoints or clear all breakpoints in the project.

You can start the simulation with the 'run without breakpoints' command from the debug menu.

Individually, breakpoints cycle through three states (Set/Disabled/Cleared) so all of the action described above for setting a breakpoint can be used to disable and/or clear the breakpoint.

Single Stepping Code

Single stepping code works much like any other debugger with three main commands (step into, step over and step out). These commands can be actioned whenever the simulation is paused via either their icons on the source window, the commands on the Debug Menu or their keyboard shortcuts.

If your program is written in a high level language like C you choose to single step either high level instructions or at assembly level. This happens automatically, based on what is visible on the source window. To view disassembly (and therefore step assembler instructions) right click on the source window and select the disassembly option from the resulting context menu.

The same action will return the source - and therefore the step level - to the high level language.

You can only single step code when the simulation is paused, either by pressing the pause button or at a pre-defined breakpoint.

Debug Windows

Proteus includes a large number of debugging windows that can be used to help trace and find bugs. These include memory dumps, stack and register windows, variables window, simulation advisor and watch window.

All of these windows can be opened from the Debug menu and will appear as docked tabs at the bottom of VSM Studio.

While the simulation is running all debug windows, except the watch window are disabled. When the simulation is paused or you are single stepping code, all of the debug windows become active.

Practical examples of using the watch window and other debug windows can be found in the Proteus VSM tutorial.

Active Popups

Active popups allow you to choose areas of the schematic that you want to see or interact with while you are debugging you code. In turn, this avoids a constant switch between schematic tab and VSM Studio tab during debugging, essentially bringing the relevant hardware into the software debugging environment.

A simple example of defining an active popup can be found in the VSM Studio new project tutorial, while more detailed coverage is available in the main Proteus VSM tutorial

Notes:

  • You can only define active popups on the schematic when the simulation is stopped.
  • As with other debugging windows, active popup windows can be closed in VSM Studio using the cross at the top right of their window. After closing, they can be re-opened from the Debug menu.
  • When you have Active Popups defined on the schematic and open in VSM Studio, Proteus will auto-switch to the VSM Studio tab when you start a simulation. It is assumed that your session will primarily take place in the debugging environment.
  • When there are no active popups defined on the schematic or if you have closed their windows in VSM Studio, Proteus will auto-switch to the schematic tab when you start a simulation.
  • In either case, Proteus will auto-switch to the VSM Studio tab when a simulation is paused in order to display the source code.


ICON REFERENCE

The following is a listing of the icons used in the VSMStudio application module along with a short description of usage.

Icon | Description
 | New Project: Launches the New Project Wizard to create a new VSMStudio project.
 | Save Project/File: Saves the current project/file to disk.
 | Save Project As: Saves the current project under a different name.
 | Open Project: Open an existing project from disk.
 | Close Project/File:Close the currently open project/file.
 | Open a file: Open an existing file without adding it to the current project.
 | Add existing file to Project: Add an existing file on disk to the current project
 | Add New file to Project: Add a (blank) new file to the current project.
 | Remove file from Project: Remove the file from the current project.
 | Add New Design File to Project: Associate an existing schematic file with the current project.
 | Project Settings: Launch the Project Settings dialogue.
 | Build / Re-Build Project: Compile and Build the current project.
 | Clean Project: Clean and remove any temporary files from the current project.
 | Undo: Undo the last action executed in the editor.
 | Redo: Redo the last action executed in the editor.
 | Cut: Cut the selected text from the current document.
 | Copy: Copy the selected text to the clipboard.
 | Paste: Paste the contents of the clipboard into the current document.
 | Find: Search for a text string or regular expression.
 | Replace: Replace any matches for the search string with a specified alternate text string.
 | Run Simulation: Run the simulation in the ISIS window.
 | Step Over: Step over a function / section of code
 | Step Into: Step into a function / section of code
 | Step Out: Step out of a function / section of code
 | Run To: Run to a Break point
 | Toggle Break points: Turns Break points on or off
 | Compiler/Editor Settings: Launch the compiler/editor settings dialogue form.
 | Help: Launch the application help file.


Build Configurations

This dialogue form allows you to create a custom configuration for your project or change an existing one.

Each configuration is simply a set of compiler options designed to produce a given type of output file with a specified level of information/optimisation. Configuration settings are stored in the project file.

To create a new configuration, first select one of the existing configurations, use the copy button to create a duplicate and rename as appropriate. Note that configuration names should not contain spaces or special characters.

Changing the target of a configuration then loads a corresponding default set of options for it. Further editing of configuration options would then take place via the project settings dialogue.

To rename configuration double click on it, enter new name and press Enter. Configuration name should not contain spaces and special characters.


Compiler Setup

Overview

This dialogue allows you to automatically scan for selected compilers on your computer. Where found, VSMStudio will remember their location and will automatically configure them to produce an output format most compatible with the Proteus VSM simulation software.

Options

Goto Website / Download.

A button appears beside any non-installed compiler with one of two options. Goto Website is the option for commercial compilers and will opens the website of the selected compiler in your default web browser. The direct download option is available for open source compilers which can be downloaded from inside VSM Studio. In either case, after installing the compiler you can run the 'Check All' command to detect and configure it for use with VSMStudio.

Check All

This option will scan for all of the compilers in the list, test that they are compatible with the Proteus software and configure their command line options for maximum compatibility with Proteus.

You should run this option after installation of the VSMStudio software in order that the software knows which compilers you have on your machine.

Check

This option will test a single selected compiler in the list. Before using, click on the compiler name to specify which compiler you wish to test for and configure.

You should use this option when you have installed a supported compiler and wish to use it in VSMStudio.

Manual

This option lets you specify the directory where a compiler is installed if the automatic detection fails. First, click on the compiler name in the list, then on the manual button and navigate to the directory where the toolchain is installed.

OK

Save changes to compilers' paths and close dialogue.

Cancel

Close dialogue without saving the changes.

Note that it is the directory where the compiler executable is installed that you need, rather than the file itself.

Alternatively, you can click on the right hand column of the list and type in the path of the compiler specified in the left hand column.

Manual Entry of Compiler Directory.

Additional Information

Compiler Configuration

By default, VSMStudio configures the compiler with two build configurations, Debug and Release.

  • When you compile with the Debug configuration (the default) the output file format will contain debugging information such as variable names and high level source code. This will enable single step debugging inside Proteus VSM after compilation.
  • When you compile with the Release configuration, the output file will be a binary HEX file, suitable for programming directly to the target hardware. This will also simulate in Proteus VSM but no single step debugging is available.

You can, if you wish, change the configuration options via the Project Settings dialogue form (Options button beside the configuration selection). We consider this an advanced feature and would not recommend changing these settings.

Adding New Compilers

At the time of writing there is no mechanism for manually adding a compiler not on the list. We are, however, actively working on increasing the support for different compilers and would welcome your feedback - please e-mail us requests to support@labcenter.com

It is important that we have a copy of the compiler (demo or otherwise) such that we can ensure that it's output formats are compatible with the Proteus VSM simulation software.


Copy Project

Overview

This dialogue appears after invoking the Save Project As command and provides some control over what files to save in the new project directory and the sub-directory structure for the project.

We strongly recommend that, unless you have good reason, you leave the default options selected on this dialogue.


Directories Settings

Overview

These options allow you to specify the default locations for various tools and utilities that VSMStudio needs to run, as well as the location for your own VSMStudio projects.

If you want to change the default location for a particular option you can browse via the button above that option or type the path directly into the edit field.

Manual entry of the Projects directory.

Default settings for any option can be restored at any time by clicking on the button above that option.

Options

Compiler Configuration Files

This is the location of the files that VSMStudio uses to locate and configure compilers to work with the Proteus software folder.

Simulator Configuration Files

This is the location of the files that tell VSMStudio which microcontroller variants are available for simulation inside the Proteus VSM software. It is used in the New Project Wizard to limit selection of processor to those available for simulation/debugging.

Syntax Highlight Files

This location contains the fileset used for syntax highlighting of the various assembly languages supported by the processor families available in Proteus.

Tools Files

This is the location of the VSMStudio executable and utility applications.

Development Boards Files

This is the location of the pre-supplied Proteus development boards. Development boards are general purpose evaluation boards for which you can write and test a variety of firmware programs.

The development boards supplied tend to be virtual equivalents of real world hardware boards provided by silicon vendors.

Proteus

This is the location of your Proteus installation. Note that if you need to change this the path entered should be to the root of the Proteus installation and not to the Bin directory.

Projects

This directory is where you will (by default) store any VSMStudio projects that you create.


Editor Settings

Overview

This tab allows you to add or change various style guides included with the VSMStudio IDE.

Options

Line Options

These options allow you to add or remove the line number display at the left hand side of the Editor Window and/or to remove the current line highlighter.

Editor Line Setting Options.

Brace Options

This option turns on or off highlighting of the corresponding brace when text cursor is positioned next to one of them.

Brace Matching Options.

Indentation Options

These options allow you to specify whether to use tabs or spaces for indentation, indentation and tab width when pressing the tab button. Other options allow you to turn on or off automatic indentation when starting a new line by pressing enter button and to controls displaying vertical indentation marks which can improve text layout.

Indentation Options.

Whitespace Options

These options let you control whether whitespaces should be marked visible on the editor, whether you want to wrap whitespaces and what mode you want to use for end of line marking. In the latter case you can both convert to your chosen mode and choose to display end of line markers.

In the majority of cases we would not expect these options to be changed from their default values.

Whitespace Configuration Options.

Code Folding Options

Code folding is a feature whereby the entry and exit braces to functions are matched and you can choose to hide (or fold) the contents of the function, leaving only the function header visible. It can be extremely useful in large files where you are no longer interested in the workings of completed and known good functionality.

This is implemented by clickable plus and minus signs at the left hand of the editor window. The options provided here enable you to turn code folding on and off and also to configure visually the clickable fold icons.

Code Folding Options.


Find and Replace

Find & Replace

Overview

This dialogue allows you to find text in one or more documents (files) and optionally to replace it with different text.

Options

Find Text

Specify the text string that you want to search for.

Replace

If you want to replace the text that is found with different text then check this box and type the replacement string in the edit field below the checkbox.

Scope

This selector defines the scope of the search and has the following options:

  • Current Document - searches only in the document with the focus.

  • All Open Documents - searches in all documents that are currently open in the Editor.

  • Current Project - searches all documents in the current project.

  • All Open Projects - seearches all documents in all projects currently open.

Search Upwards

Use this checkbox to change the search direction through a file from bottom to top. In the current file the search will start at the current line (if one is selected) and work backwards from that, while in other files the search will start at the bottom of the file.

Match Case

This checkbox makes the search case-sensitive such that capital letters are differentiated from lower case letters when deciding whether a match to the search string has been found.

Match Whole Words Only

Checking this option restricts search results to those which are complete words. For example, when selected with a search string of 'chip' you will not get a match from text reading 'Microchip' or 'chips'.

Regular Expression Matching

When selected the search string is treated as a regular expression (QT regular expressions which are Perl based) and will return results based on the evaluation of the regular expression. This should only be selected if you are familiar with the Perl regular expression syntax.


Font Settings

Fonts & Colour Settings

Overview

This tab allows full configuration of the fonts, sizes and colours of text on the editor window, project pane and output window.

Options

Window Selection

Use the settings combo box on the left hand side to select which window styles you want to configure. All options on the dialogue form reflect the selection made here and some options may not be available in certain windows.

The load defaults button on the right hand side will return all the settings for the selected window to their installation default state.

Window Selection Options

Font Style and Size

Having specified the window for configuration (Editor, Project, Output), the font settings apply to all text styles in the currently selected window.

You can select both font-face and font-size with these options - fixed width fonts will be displayed in bold in the drop down menu.

Font Selection Options

Display Items Configuration

The remainder of the dialogue form allows you to specifically configure particular text styles both in terms of colour in text decoration (bold, underline, italic). For example, it is extremely common to have a different colour of text for code comments than for actual code.

A complete styling is provided by default but - if you prefer to work with different styles - you can adjust settings here. All changes can be reverted to the installed defaults via the 'Load Defaults' button at the top right of the dialogue.

Configuration Options for Specific Displayed Items


New Project Wizard

Overview

The New Project Wizard provides an interface for creating or importing projects in VSM Studio. There are three basic options:

  • None - Create a Blank Project.
  • Design File - Start a project from a design file and import the associated source files.
  • Demonstration Project - Initialise a project from an existing demonstration board and then modify to suit your requirements.

None

Use this option when creating a new project. After setting up the project file you then add source files and the design file manually from the Project Menu.

If you choose this option it is important that any files added are first copied into the project directory. Some compilers will struggle to cope with source files that are in different directories to the compile directory.

Design File

This option should be selected where you have a schematic design for the project either wish to import or wish to write firmware for testing against the schematic.

Either type in the path to the design file or use the browse button at the right hand side

Creating a VSM Studio Project when the schematic exists.

Once you have selected the design file you want to use, the right hand side of the dialogue form will be populated with any source files that exist in the same directory as the design file. You can then select or de-select these depending on whether you wish to import them into the project or not.

Choosing Source Files for Import.

Demonstration Project

This option should be selected if you wish to base your current project on a generic demonstration board rather than start from scratch. Unlike the sample designs the demonstration boards are templates and your project will be initialised from the template schematic and source.

Project Configuration

Once you have selected the project type you need to configure the target and the toolchain.

First, select the controller family, the controller variant and the processor clock speed. Note that only variants that can simulated in Proteus are available for selection.

Once you have made these selections the compiler list will be populated with the supported compilers for that target.

Notes:

  • A compiler will be suffixed with (not installed) if it has not been detected by VSMStudio and you should then click on the compilers button at the right hand side.
  • Only supported compilers can be used inside VSMStudio.

Compiler Configuration

After clicking the OK button to create the project you cannot change the toolchain choice or controller family choice without creating a new VSMStudio project.


Project Settings

Overview

This dialogue allows you to edit the project settings for each build configuration. Depending on the microcontroller, it may also include programming options.

Configuration Combo Box

This configuration shown in this combo box is the one which you can view and edit through the various fields on the dialogue form. The configuration suffixed with 'Active' is the configuration currently specified in VSMStudio to be used for compilation.

Selecting a configuration to edit in the Project Settings Dialogue form.

The Active Configuration in VSMStudio.

At the top right of the dialogue form there is a read only display of the toolchain used for compiling the project. You cannot change the toolchain once a project has been created as the configurations would be completely different.

Controller Tab

The controller tab allows you to specify a particular variant of the selected target family and also to specify the clock frequency for the processor.

  • Family - Read only display of the micro-controller's family.
  • Controller - The micro-controller.
  • Clock Frequency - The clock frequency the simulation will run at, may also be used for timer functions in the code.

The Embed Files checkbox on the controller tab is worthy of further discussion.

When this option is selected all source files are stored inside the main Proteus PDSPRJ file. A temporary session directory is used for compilation and simulation. This has the advantage that the Proteus project is portable and self-contained. If you turn this checkbox off then all of the source files will be deposited in the same directory as the main Proteus file. It then becomes your responsibility to organise and maintain relative/absolute paths to various files in the project.

The micro-controller selected in the configuration must match the one used on the ISIS schematic for simulation (debug configuration)

You cannot change the target family once a project has been created.

To Program the Physical Hardware

For some processor families, notably Arduino AVR, Proteus includes an interface to a physical programmer. This can be configured from the controller tab as follows:

1) Change the Programmer to AVRDUDE.

2) Change the Interface to the physical board you are using (e.g. Arduino Uno).

3) Optionally change the clock frequency to 16MHz. Note that you do not need to do this. The programmer will automatically recompile your firmware with the correct clock frequency before programming the hardware.

Options Tab

Setting of compiler, linker, assembler and any other tools the belong to the tool chain in use for the project. The default options can be restored by using the "Defaults" button. An option value can be edited by either double-clicking on the option or selecting a value from its drop-down menu as appropriate. The basic procedure for adding an option is:

  1. Select the tool (CC=compiler, LD=linker, ASM=assembler, etc.) from the combo box at the left hand side.

  2. Select the option you wish to add from the combo box at the right hand side.

  3. Click the add button to add the option.

  4. Double click in the Value column and set the value you want.

  5. Use the Move up and Move down to re-prioritise the option list if the option you add has dependencies.