PSoC Creator User Guide
PSoC Creator User Guide
PSoC Creator User Guide
Cypress Semiconductor
198 Champion Court
San Jose, CA 95134-1709
Phone (USA): 800.858.1810
Phone (Intl): 408.943.2600
http://www.cypress.com
Copyrights
Cypress Semiconductor Corporation, 2014-2015. The information contained herein is subject to change without notice.
Cypress Semiconductor Corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in a
Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor
intended to be used for medical, life support, life-saving, critical control or safety applications, unless pursuant to an express
written agreement with Cypress. Furthermore, Cypress does not authorize its products for use as critical components in lifesupport systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The
inclusion of Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use
and in doing so indemnifies Cypress against all charges.
PSoC is a registered trademark, and PSoC Designer and Programmable System-on-Chip are trademarks of Cypress
Semiconductor Corp. All other trademarks or registered trademarks referenced herein are property of the respective
corporations.
Any Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by
and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty
provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create
derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom
software and or firmware in support of licensee product to be used only in conjunction with a Cypress integrated circuit as
specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source
Code except as specified above is prohibited without the express written permission of Cypress.
Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials
described herein. Cypress does not assume any liability arising out of the application or use of any product or circuit described
herein. Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or
failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress product in a life-support
systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all
charges.
Use may be limited by and subject to the applicable Cypress software license agreement.
Contents
Contents
Contents
10
11
12
PSoC Creator helps you configure and program analog- and digital-peripheral functionality into a Cypress PSoC
device. Using PSoC Creator, you can select and place components, write C and/or Assembly source, and debug
and program the project/part. When used with associated hardware, this dynamic hardware-software combination
allows you to test the project in a hardware environment while viewing and debugging device activity in a software
environment.
Note This document refers to PSoC 4 devices throughout (in addition to other devices). References to PSoC 4
should be interpreted to mean PSoC 4 and PSoC 4 BLE (Bluetooth Low Energy) devices.
This PSoC Creator help contains the following sections:
Getting Started
Tasks and interface descriptions for the graphical design entry tools.
Information and tasks for exporting a PSoC Creator design to a 3rd Party
IDE
Reference Material
Revision History
Date
Description of Change
**
7/17/14
New document.
*A
7/25/14
*B
12/12/14
*C
5/14/15
*D
9/10/15
*E
12/30/15
Getting Started
This section contains tutorials to help get you started using PSoC Creator. There are two sets of tutorials:
How To - Miscellaneous tutorials to help increase your efficiency using PSoC Creator.
Design Tutorials
This section contains the following design tutorials to help you get started creating designs with PSoC Creator.
Code examples for these tutorials are contained in the Find Code Example dialog, available from the Start page.
These tutorials are intended to provide quick introductions to begin using PSoC Creator. For more information, refer
to the following
You may also obtain various kits to use with PSoC Creator and associated devices. When installed, these kits
provide additional documentation and tutorials, available on the PSoC Creator Start Page.
Beginner:
Starter Projects
Intermediate:
Basic Design
Getting Started
Debugging a Design
Advanced:
See Also:
How To
Beginner
My First Design "Hello World Blinky"
This tutorial provides an introduction to PSoC Creator and the process of developing a design. The design process
includes:
Add/Configure Components
Write C Code
This is the first of a few design tutorials included in this PSoC Creator Help file. This design will show you how to
blink an LED. Then you will add another component to display "Hello World" on an LCD.
Note If you prefer not to create a new empty project, you can open a completed code example for this tutorial,
named "HelloWorld_Blinky," using the Find Code Example dialog. A link to the dialog is located on the PSoC
Creator Start page. There are also several Starter Designs you can create from the New Project dialog.
Create a New Project:
The first step of creating a design is to create the basic design project.
1. From the File menu, select New > Project or click
2. For Target device, select the default PSoC 3 device, or select the specific device you want to use. For this
project, we are using the default PSoC 3 device CY8C3866AXI-040. If you select a different device, then you
will need to adjust your pin settings accordingly.
3. In Name, type the name of your project, for example: "MyHelloWorld."
4. In Location, type the path where you want the project to be saved, or click [...] and navigate to the appropriate
directory.
Getting Started
5. Click Finish.
By default, PSoC Creator creates a new workspace containing the new project. Files and folders are added to the
Workspace Explorer shown in the Source tab.
The Schematic Editor displays the top-level schematic file (TopDesign.cysch) as a document window, and the
Component Catalog opens to display a list of components to use in your design.
Note If you created this project in the same workspace as another project, make this the active project by selecting
Set as Active Project from the Project menu.
Getting Started
Add/Configure Components:
After the new project has been created, add components to the schematic canvas and configure them as
appropriate.
1. In the Component Catalog, expand the "Digital > Functions" folder and drag a PWM component onto your
design.
The Notice List window indicates that there are connection errors.
10
Getting Started
2. Double-click the PWM component to open the Configure dialog, change the Implementation setting to "Fixed
Function," and click OK
Notice the component instance's appearance changes: kill input added, one pwm output available, and the
label is updated.
3. In the Component Catalog, expand the "Digital > Logic" folder, drag a Logic Low component onto your design,
and connect it to the kill terminal on the PWM. Connect another Logic Low to the reset terminal.
4. In the Component Catalog, expand the "System" folder, drag a Clock component onto your design, and connect
it to the clock terminal on the PWM.
11
Getting Started
5. Double-click the Clock to open the Configure dialog, change the Desired Frequency value to 0.25 kHz, and
click OK.
6. In the Component Catalog, expand the "Ports and Pins" folder, drag a Digital Output Pin component onto your
design, and connect it to the pwm terminal on the PWM.
12
Getting Started
Assign Pin:
PSoC Creator will automatically assign the pin to a physical port/pin on the device. To specify a specific pin, use the
Pin Editor.
1. In the Workspace Explorer, double-click the HelloWorld.cydwr file to open the Design-Wide Resources Pin
Editor.
2. Pull down the menu in the Port or Pin column and assign Pin_1 to the following pin, depending on the kit you
have:
For the PSoC 3 FirstTouch Starter Kit (CY8CKIT-003), use P4[1] (or pin 70).
For the PSoC Development Kit (CY8CKIT-001), use P0[0] (or pin 71).
Write C Code:
1. In the Workspace Explorer, double-click the main.c file to open it.
2. Add the following function to main():
PWM_1_Start();
13
Getting Started
4. If the Select Debug Target dialog displays, select your device, then click Connect and OK.
PSoC Creator will build your design, generate code, and program the device. When programming is complete, the
selected LED on the board will blink; press the Reset button if needed.
Expand the Design:
If you are using the PSoC Development Kit (CY8CKIT-001), you can expand the design to display "Hello World" on
the LCD.
1. On the Component Catalog, expand the "Display" folder and drag a Character LCD onto your schematic.
2. Open the Pin Editor, and assign LCD_Char_1:LCDPort to P2[6:0].
3. Open the main.c file, and edit it to add the following to main():
LCD_Char_1_Start();
LCD_Char_1_PrintString("Hello World");
4. Click Program
PSoC Creator will build your design, generate code, and program the device. When programming is complete, the
LCD will display the words "Hello World."
From this point, you can modify the design to do different things as desired.
See Also:
Starter Designs
Workspace Explorer
Schematic Editor
Component Catalog
Pin Editor
14
Getting Started
Starter Projects
PSoC Creator provides several Starter Projects. These projects highlight features that are unique to PSoC devices.
They allow you to create a design with various components and code already provided, instead of creating a new
empty design.
To Use Starter Projects:
1. From the File menu, select New > Project or click
2. Select the appropriate Target hardware or Target device option and click Next >.
3. On the "Select project template" page, select the Code example option and click Next >.
15
Getting Started
4. On the "Select a code example" page, select a project from the list. This page is very similar to the Find Code
Example dialog. If needed, use the Filter by field to narrow the number of examples listed. Click Next >.
Create new workspace: Use this option to create a new workspace, and specify a name and location
to save the workspace.
Add to current workspace: If creating a new project in a workspace that is already open, select this
option to add the new project to the existing workspace.
6. Click Finish.
The selected project is created and files are displayed in the Workspace Explorer. The project is ready to build and
16
Getting Started
program the device. For more information, refer to the documentation included with the design. If the
documentation is not available, select the Include Starter Design documentation... option in the Options Dialog,
and re-create the project.
See Also:
Workspace Explorer
Options Dialog
Intermediate
Basic Design
This tutorial provides more details about configuring components and working with Design-Wide Resources (DWR).
It is intended to be a design focusing on a set of basic components to show various ways of configuring them. This
tutorial does not cover every step in the design process in great detail. Instead, it describes concepts relevant to
parts of the design. You can then use the same principles in any design. For introductory instructions for creating a
design, refer to the "Hello World Blinky" tutorial.
Note If you prefer not to create a new project, you can open the completed code example for this tutorial, named
"BasicDesign," using the Find Code Example dialog. A link to the dialog is located on the PSoC Creator Start page.
Create a New Project:
As shown in the "Hello World" tutorial, the first step for a design is to create a new project. As needed, follow the
instructions in that tutorial. You can also refer to Creating a New Project.
17
Getting Started
Notice that the Timer is already connected to a Clock component and a Logic Low component. This is because
the Timer is an example of a Schematic Macro.
2. Remove the Clock and the Logic Low components because this example will use different components.
3. Double-click the Timer component to open the Configure dialog.
By default, the Timer is configured as 8-bit, Fixed Function, and Software Only enable. For more information
about the Timer component, refer to its datasheet.
Change the following parameters:
Implementation to UDB
18
Getting Started
4. Click OK.
Notice that the "enable" terminal displays on the Timer.
5. From the Component Catalog, add the following components to your design:
Control Register (from the Digital > Registers folder) -- Used to enable the Timer under software
control, as well as provide a reset signal for the Timer.
Digital Output Pin (from the Ports and Pins folder) -- Used to provide a divided clock for another
component in the design. The divided clock is 3.1 KHz.
Clock (from the System folder) -- Used to provide the input clock. In this case at 800 KHz.
Interrupt (from the System folder) -- Used to act as a heartbeat for the design. The heartbeat can be
used for timing of software functions.
Parameter(s)
Control_Reg_1
NumOutputs: 2
Clock_1
19
Getting Started
7. Arrange the components on your design, and use the Wire tool
(from the Design Elements Palette, to
connect them, similar to the following. See Working with Wires for more information.
20
Getting Started
By default, the Delta Sigma ADC is configured as 16-bit, with an input range of +/- 1.024 V. For more
information about the Delta Sigma ADC component, refer to its datasheet.
3. Change parameters as follows:
Under the Config1 tab, change the Resolution parameter to "12" and Input Range parameter to
"Vssa to Vdda".
4. Click OK.
Notice that the label below the component reads 12 Bit Resolution.
5. From the Component Catalog, add the following components to your design:
Analog Pin (from the Ports and Pins folder) -- Used to connect the input signal to the ADC.
Interrupt (from the System folder) -- Used to trigger reading the result of a conversion from the ADC.
6. Arrange the components on your design, and use the Wire tool
connect them, similar to the following:
21
Getting Started
Notes
First, notice that the wire from the Analog Pin to the ADC is red by default, and the wire from the ADC
to the Interrupt is green by default. PSoC Creator uses these colors to indicate analog and digital
signals. These colors can be changed using the Options dialog.
Second, note that a wire is not needed to connect the components. You can connect them directly by
their terminals . This tutorial uses wires to show the different signal colors.
22
Getting Started
*******************************************************************************/
CY_ISR(InterruptHandler)
{
Timer_1_ReadStatusRegister(); /* Read the Status Register */
}
/*******************************************************************************
* Function Name: main
********************************************************************************
* Summary:
* Main function performs following functions:
* 1: Start the clock
* 2: Start the Timer
* 3: Start the interrupts
* 4: Start ADC DelSig and its interrupts
* 5: Testing for sample available from ADC
* 6: Storing the sample into the array
* 7: Comparing the samples
*
* Parameters:
* None.
*
* Return:
* None.
*
*******************************************************************************/
void main()
{
int8 i;
CyGlobalIntEnable;
/* Start the Interrupt */
isr_1_Start();
isr_1_Disable();
isr_1_SetVector(InterruptHandler);
isr_1_Enable();
/* Enable the Timer; reset disabled */
Control_Reg_1_Write(0x01);
/* Start the LCD */
LCD_Start();
/* Start the Timer */
Timer_1_Start();
/* Start the ADC */
ADC_DelSig_1_Start();
/* Start the ADC conversion */
ADC_DelSig_1_StartConvert();
LCD_Position(0, 0);
LCD_PrintString("ADC OUTPUT:");
for(;;)
{
/* Check whether ADC conversion complete or not */
if (ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_WAIT_FOR_RESULT))
{
/* Get the result */
ADC_Current_Sample = ADC_DelSig_1_GetResult16();
ADC_Sample_Available = 1;
/* Print the ADC result on LCD */
23
Getting Started
LCD_Position(0, 11);
LCD_PrintInt16(ADC_Current_Sample);
}
/* Testing for sample available from the ADC */
if (ADC_Sample_Available)
{
ADC_Sample_Available = 0;
/* storing the sample into the array, based on the index */
ADC_Samples[ADC_Sample_Index++] = ADC_Current_Sample;
/* comparison */
if (ADC_Sample_Index == ADC_NUMBER_SAMPLES)
{
ADC_Sample_Average = 0;
for (i = 0; i < ADC_NUMBER_SAMPLES; i++) ADC_Sample_Average +=
ADC_Samples[i];
ADC_Sample_Average /= ADC_NUMBER_SAMPLES;
ADC_Sample_Index = 0;
}
}
}
}
/* [] END OF FILE */
Next Steps:
This tutorial contains the basic process of configuring components in a design. To continue this design you will need
to obtain hardware to program the device, as well as to use the debugger features. In the mean time, you can refer
to the following related topics:
Debugging a Design
24
Getting Started
Pins
Pin Mapping
Software Access
25
Getting Started
Pins:
Pins are components that allow you to set up sophisticated interfaces to physical pins from your design. You can
select them from the Component Catalog under the Ports and Pins folder and drag them onto your design.
There are four pre-configured Pins components in the catalog: Analog, Digital Bidirectional, Digital Input, and Digital
Output. You can use any of these components to configure them as a single pin or as a bus. The Configure dialog
provides various parameters to manage functionality.
Using various settings, you can also configure the component to use SIO pins, Vref, and/or interrupts. See the Pins
components datasheet for details on the specific features of each configuration. The datasheet is available from the
Component Catalog or by clicking the Datasheet button in the Configure dialog.
The electrical attributes of pins, such as drive mode and slew rate, can be set individually in the Configure dialog.
All pins allow for the creation of aliases which are shown in the Pin Editor and used in the generated APIs. They are
26
Getting Started
useful as reminders of pin function and enable per-pin access from software.
Pin Mapping:
The Pins component allows for mapping constraints to be specified that allow PSoC Creator to automatically place
and route the signals constrained within the component. The pins can either be specified as contiguous and nonspanning or non-contiguous and spanning. When contiguous and non-spanning, pins may only be mapped onto
adjacent pins in a single physical port. In this case they cannot span multiple physical ports and so are limited to a
maximum of 8 pins. The Pin Editor forces contiguous pins to be placed on adjacent pins. For non-contiguous and
spanning, you can place each pin individually.
For each Pins component, you can either let the tool select device pin(s) for you or choose a specific location in the
Pin Editor. You can drag-and-drop pins listed in the Signal table to place them onto the device. Alternately, you can
use the pull-down menu for each pin.
Software Access:
You can manage pins through generated APIs. Refer to the datasheet for more information on the APIs.
See Also:
Design-Wide Resources
Pin Editor
Component Catalog
27
Getting Started
You will use this editor in almost all your designs to optimize the clock setup for your application.
There are three types of clocks: system, local and design-wide. The following topics describe various ways to work
with these clocks.
To learn more about how to set up clocks, see Clock Editor. Refer also to the Clock component datasheet, which
you can open from the Component Catalog.
Refer to the Basic Design to see how to configure a Clock component in an example application.
To Open the Clock Editor:
Double-click the .cydwr file in the Source tab of Workspace Explorer.
The file opens as a tabbed document in the work area, and it allows you to access the various design-wide
resources in your project. Click the Clocks tab to access the Clock Editor.
28
Getting Started
29
Getting Started
Double-click on the clock to open the Configure Clock dialog, which allows you to specify local clock characteristics.
30
Getting Started
New local clocks are listed in the Clock Editor underneath the system clocks. It is a good design practice to check
the actual derived clock frequency. Although, if the desired frequency could not be found within your tolerances, the
tool will issue a warning in the Notice List window.
See Configure Local Clock for more information. Refer also to the Clock component datasheet.
Create New Design-Wide Clock Sources:
You can use design-wide clocks anywhere in your design and as often as you like. These clock sources are derived
from the system clocks (or other design-wide clocks).
You typically create your own clock sources to get a clock with specific frequency and tolerances that you want to
use multiple times in your design. Note that the APIs generated for design-wide clocks are prefixed by "Cy."
To create a design-wide clock, click Add Clock on the Clock Editor. The Add/Edit Clock dialog is almost identical to
the configuration dialog for local clocks.
31
Getting Started
As with local clocks, design-wide clocks are listed in the Clock Editor underneath system clocks. It is a good design
practice to check the actual derived clock frequency. Although, if the desired frequency could not be found within
your tolerances, the tool will issue a warning in the Notices List window.
See Add/Edit Design-Wide Clock for more information.
Managing Clocks with Software:
All New clocks can be controlled from software from APIs generated during the build process. These APIs are
documented in the Clock component datasheet. The most important APIs are the _Start() and _Stop() functions.
Clocks are enabled by default. The Start in Reset option will cause _Start() to automatically be called on the clock
pre-main.
Refer to the Technical Reference Manual for PSoC devices to understand how to control the system clocks.
See Also:
Design-Wide Resources
Clock Editor
Interrupts in Schematics
For general information about interrupts, see Interrupt Editor. Refer also to the Interrupt component datasheet,
which you can open from the Component Catalog.
32
Getting Started
Interrupts in Schematics:
Interrupts are components used to populate the vector table and set up the software handlers. You can select
interrupts from Component Catalog under the System folder and drag them onto your schematic.
They are typically attached to outputs of interrupt-generating components such as the SIO pin, Timer and Counter,
DMA, ADC, and so on. The interrupt trigger mode is set by the generating component. In some components, such
as the PWM, it is not changeable. In others, like the SIO pin, it is a selectable option from the Pins Configure dialog.
When an interrupt is connected to digital logic in the schematic, such as a clock or logic gate, the trigger mode is
always on a rising edge.
To Open the Interrupt Editor:
Double-click the .cydwr file in the Source tab of Workspace Explorer.
The file opens as a tabbed document in the work area, and it allows you to access the various design-wide
33
Getting Started
resources in your project. Click the Interrupts tab to access the Interrupt Editor.
Note If there are no interrupts used in the design, the Interrupt Editor will display with a message to that effect.
To Adjust the Interrupt Priority:
PSoC Creator manages interrupts from the Design-Wide Resources Interrupt Editor.
It allows the selection of priority for each interrupt via a pull-down menu.
1. Open the Design-Wide Resources file, and click the Interrupts tab.
2. For the specific interrupt, use the pull down menu in the Priority column and select the desired value.
3. Click Save
Note The CY_ISR() macro is used to define the function name and arguments. This macro handles the compilerspecific C language extensions for interrupt functions and ensures that the code remains portable to different PSoC
architectures.
34
Getting Started
Debugging a Design
This tutorial will use the design created with the Basic Design tutorial and go through several debugging concepts,
such as setting a breakpoint, adding a watch, and stepping. This design will show the values of an array at different
points while executing the code. It will also show the total and average of the specified variable.
Open Example Design:
If you created a design with the Basic Design tutorial, you can use that one. Refer to Opening an Existing Project
for instructions to open the design, as needed.
You can also open the completed code example for this tutorial, named "BasicDesign," using the Find Code
Example dialog. A link to the dialog is located on the PSoC Creator Start page.
Set Breakpoints and Step:
In this section, you will set a couple breakpoints and run the debugger to verify that the code is being executed as
desired. You will also use the Step function to show where in the stack you are currently viewing. For more
information about breakpoints, see Breakpoints Window. For more information about stepping, see Debugger
Toolbar Commands.
1. In the Workspace Explorer, double-click the main.c file to open it.
2. Scroll to the for loop section and click in the margin of line 105 to insert a breakpoint at the line of code.
A breakpoint indicator appears in the margin next to the desired line of code.
3. Click Debug
Depending on the Debugger Option settings, the Debugger will run to Main.
35
Getting Started
4. Open the Call Stack window from the Debug > Windows menu. Notice the current line indicator is in main().
5. Click Continue
The Debugger will run to the breakpoint you set. Notice the current line indicator over the breakpoint icon, as
well as in the Call Stack window.
36
Getting Started
The debugger opens the ADC_DelSig_1_INT.c file and stops at line 73. Again notice the current line indicator in
the Call Stack window.
Now that you have confirmed the debugger stopped at the desired breakpoint, you can disable the breakpoint by
right-clicking on the icon in the margin and selecting Disable.
Set Hit Count and Variable Watchpoint:
In this section, you will set a hit count breakpoint as well as a variable watchpoint to monitor the values of an array.
1. Open the main.c file and scroll to line 50.
2. Click in the margin to set a breakpoint and then right-click on the breakpoint icon and select Hit Count...
37
Getting Started
Depending on the Debugger Option settings, the Debugger will run to Main.
5. Right-click on the ADC_Samples array in line 51 and select Add Watch.
The Watch 1 window opens showing the ADC_Samples array. Expand the list to see all the array values.
6. Click Continue
The debugger stops on line 50 and the Watch Window shows the ADC_Samples array with two values
assigned.
Note Breakpoints are hit twice when interrupts are enabled. This happens because the breakpoint gets hit, but
before the line of code is actually executed an interrupt takes over and gets processed. When the interrupt has
completed, the processor returns to the original line of code. This causes the breakpoint to be hit again.
7. Disable the breakpoint in line 50.
8. Add another watch to the ADC_Sample_Average in line 54 of the main.c file.
9. Right-click in line 56, and select Run to Cursor.
10. In the Watch Window, notice that all the values in the ADC_Samples array now have a value and that the
ADC_Sample_Average is the total of those values.
38
Getting Started
12. In the Watch Window, notice that the ADC_Sample_Average is now the average.
For more information about the PSoC Creator Debugger, refer to various topics under the Using the Debugger
section of this Help.
Advanced
Library Component Project
By default, PSoC Creator provides a library of components that are available for you to use in your designs. There
may be cases where you wish to create your own libraries. This tutorial covers the basic process for creating a
library by showing you how to create a 4-bit shifter. This is only an example intended to show you how to create
basic components. For more detailed instructions about creating components, refer to the Component Author
Guide.
Note If you prefer not to create a new project, you can open the completed code example for this tutorial, named
"LibraryComponent," using the Find Code Example dialog. A link to the dialog is located on the PSoC Creator Start
page. Once open, select the Components tab in the Workspace Explorer to view the component files.
Create a New Project:
The first step is to create the basic library project:
1. If there is currently an open project or workspace, select Close Workspace
2. From the File menu, select New > Project or click
and click Next >.
39
Getting Started
PSoC Creator creates your project and adds files and folders to the Workspace Explorer with the Source tab
displayed by default. For more information, see Workspace Explorer.
40
Getting Started
Right-click on the project in the Workspace Explorer and select Add Component Item...
41
Getting Started
5. Using the Terminal name and Type fields in the table, create two input terminals named Data_In and Clock,
respectively, and four digital output terminals named D0 through D3.
42
Getting Started
Your project shows the component and symbol added to your project. The new component displays in the
Workspace Explorer tree, with a symbol file (.cysym) shown as the only component item.
The Symbol Editor also opens the .cysym file and displays the created symbol.
Notice that the symbol has a text box above it with shifter_N. This is an instance text label that allows you to
name a component when it is instantiated in a design. For more information, see Working with Text. You can
change the default instance name using the symbol document property Doc.DefaultInstanceName in the
Properties dialog.
Specify Placement in Component Catalog
When complete, components will display in the Component Catalog. If you wish, you can control how they are
displayed.
1. Right-click on the symbol canvas and select Properties to open the Properties dialog.
43
Getting Started
3. Click the ellipsis [...] button to open the Catalog Placement dialog.
, and enter:
Example/LogicCircuits/
See Defining Catalog Placement for more information about this dialog.
44
Getting Started
45
Getting Started
Your project shows the schematic added to your project. The component displays in the Workspace Explorer
tree, with a schematic file (.cysch) shown in addition to the symbol file.
The Schematic Editor opens the .cysch file and displays an empty canvas, along with the Component Catalog.
For more information see Schematic Editor.
Complete the Shifter Schematic
Now that you have an empty canvas, you need to draw the schematic to implement your symbol.
1. In the Component Catalog, expand the Digital > Logic tree.
46
Getting Started
2. From the Design Elements Palette, select the Digital Input terminal
terminal.
The Terminal Name dialog opens. See also Working with Schematic Terminals.
6. Connect the terminals to the logic gates similar to the following image:
47
Getting Started
When you have completed the process, the component will be listed the Component Catalog under the tab
named Example.
3. For Target device, select the default PSoC 3 device, or select the specific device you want to use. For this
project, we are using the default PSoC 3 device CY8C3866AXI-040. If you select a different device, then you
will need to adjust your pin settings accordingly.
4. In Name, type the name of your project, for example: "Shifter."
5. In Location, type the path where you want the project to be saved, or click [...] and navigate to the appropriate
directory.
6. Click Finish.
48
Getting Started
PSoC Creator creates your project and adds files and folders to the Workspace Explorer shown in the Source tab.
The Schematic Editor displays the top-level schematic file as a document window, and the Component Catalog
opens to display a list of components to use in your design.
49
Getting Started
50
Getting Started
3. Notice that the library project is listed under User Dependencies > Project and click OK to close the
Dependencies dialog.
The Component Catalog now has a new tab named Example containing the shifter component.
51
Getting Started
Notice also that the components are named "shifter_1" and "shifter_2."
2. In the Component Catalog, click the Cypress tab, expand the "Ports and Pins" folder and drag a Digital Input
Pin onto your schematic canvas; also add eight Digital Output Pins.
3. Double-click the Digital Input Pin to open the Configure dialog, and change the Name to Data_In.
52
Getting Started
Notice that all the errors have cleared in the Notice List window.
Tip You can copy and paste similar wires to different locations; therefore, if you equally space items in your
design, you can replicate them more easily.
53
Getting Started
54
Getting Started
How To
This section contains various "how to" topics to help you learn how to get the most from PSoC Creator. This
section is broken down into various categories, as follows:
Zooming
Copying a Project
Scrolling
Selecting a Device
Creating Folders
Copying a Project
Writing Code
Configuring Components
Using Wildcards
Drawing Buses
Using Go To
Updating Components
Importing a Component
Debugger Tasks:
55
Getting Started
Framework:
Creating a Symbol
Exporting a Component
56
PSoC Creator provides a PSoC hardware/software co-design environment, with software development tools, a
graphical design editor, a device selector, and various features for project management. There are many concepts
referenced within this PSoC Creator help with which you may not be familiar. This section helps you have a deeper
understanding of PSoC Creator. It contains the following sub-sections:
Concepts
General Tasks
Framework
Concepts
To help you better understand PSoC Creator, you should become familiar with the following terms and concepts:
Workspace/Project
Project Types
Component/Instance
Workspace/Project
The PSoC Creator integrated development environment (IDE) provides two containers to help you manage items in
your designs: workspaces and projects.
Workspace A workspace is the top-level container within PSoC Creator; it contains one or more projects
that you can open, close, and save together. You can only have one workspace for any given PSoC Creator
workspace file (.cywrk).
Project A project contains multiple items that represent your design, such as schematics, design-wide
resources, source code, and hex files. The types of items contained within a project vary according to the
project type. A project is always part of a workspace. You can create projects in an existing workspace or
you can create a new workspace as part of creating a new project.
PSoC Creator provides workspace folders to organize related projects into groups and then perform actions on
those groups of projects. You can view and manage your workspace, projects, and their associated items using the
Workspace Explorer. A workspace and projects allow you to use the IDE in the following ways:
57
Use Workspace Explorer to handle the details of file management while you focus on items that make up
your design.
Add items that are useful to multiple projects in the workspace or to the workspace without referencing the
item in each project.
Work on miscellaneous files that are independent from the workspace or projects.
When you create a multi-project workspace, the first design project created becomes the active project, by default.
The active project appears in bold font in Workspace Explorer and is the project that runs when you click Start on
the Debug menu. You can build either a single project within the workspace or multiple projects in the workspace.
You can also specify which workspace projects you wish to exclude from builds. For more information, see Building
a PSoC Creator Project.
See Also:
Project Types
Workspace Explorer
Project Types
A PSoC Creator project contains multiple items, such as schematics, components, design-wide resources, source
code, and hex files. PSoC Creator provides two types of projects: design and library.
Design Project A design project is used to create and modify designs. With a design project, select and
configure the components for your device in a schematic. Next, set up design-wide resources, such as
clocks and interrupts. Then, write the C code for your application. Finally, you build (and debug) the project
to generate the hex file and program the device. When you first create a design project, PSoC Creator
creates the project/workspace files and directory structure, as well as the top-level schematic, main.c shell
file, and a design-wide resources file (.cydwr).
Library Project A library project is a collection of one or more components and the associated source
code. With a library project, you can develop components that will be elaborated in a design, as well as
reused in many designs. Library Projects can also be used to create static libraries that can be linked in to
a design. Each library can serve either purpose (or both at the same time). Component development
includes creating the graphic symbol, defining parameters, and specifying validation requirements. When
you first create a library project, PSoC Creator creates the project/workspace files and directory structure.
Library project(s) are included in PSoC Creator as Dependencies to determine which components are
available for your designs in the Component Catalog.
Project names have a .cyprj extension, such as ProjectName.cyprj. In addition, project files must always be located
in a directory named either ProjectName.cydsn (design) or ProjectName.cylib (library).
See Also:
Component
Component Catalog
Dependencies
58
Component/Instance
A component is a collection of files, such as a symbol, schematics, APIs, and documentation that defines
functionality within the PSoC Device. Examples of components include a timer, counter, and a mux. An instance is a
component that has been selected from the Component Catalog and used in a design. You can have multiple
copies or instances of a component in a design, as long as the selected device can support it. You can also
create and reuse your own components/instances.
Files that make up a component/instance include the following:
Symbol A symbol contains the basic definition of a component. It contains the top-level picture shown in
the Component Catalog, as well as the parameter definitions. There can be only one symbol in a
component.
Schematic A schematic defines how a component has been implemented visually. A schematic can be
generic for any PSoC device, or it can be architecture, family and/or device specific.
API Application Programming Interface. APIs define how to interact with a component using C code. They
can be generic for any PSoC device, or they can be architecture, family and/or device specific.
Verilog Verilog can be used to define the functionality of a component implemented in Verilog. There will
only be one Verilog file in any given level of a component. Verilog files found at different levels of the
component, such as at an architecture, family and device level, may not refer to each other.
Control File The control file contains directives to the code generation module. For more information, see
Control File and Directives.
CyPrimitive A CyPrimitive is a basic component item, such as a logic gate, interrupt, or DMA.
Note A symbol need not be primitive -- it could be a primitive for some device, but implemented out of logic
and software for another device.
See Also:
Component Catalog
Control File
Directives
General Tasks
The following are some of the general tasks you will perform with PSoC Creator:
59
Archiving a Workspace/Project
Saving a Project As
Copying a Project
Creating Folders
choose whether to create a new workspace or add to an existing workspace; see Workspace/Project
60
Target hardware: If you know the specific part number, select this option and choose the appropriate
hardware from the pull-down menu.
Target device: Select this option to choose a default device or last used device, or to launch the Device
Selector. Select the appropriate option from the pull-down menu.
61
Code example: Choose this option to select a starter project from a list of available examples. See Stater
Projects.
Pre-populated schematic: If available, select this option to create a design with components already
placed on the design schematic.
Empty schematic: Choose this option to create a blank schematic canvas (not available for PRoC BLE
designs).
62
Create Project
Create new workspace: Use this option to create a new workspace, and specify a location to save the
workspace.
Add to current workspace: If creating a new project in a workspace that is already open, select this option
to add the new project to the existing workspace.
Workspace name For a new workspace, type a name for the workspace.
Location Specify a location for the project/workspace.
Project name Type a name for the project.
Click Finish.
If you create a design project, PSoC Creator will create files and open the Schematic Editor by default.
If you create a library project or empty workspace, PSoC Creator will create the library or empty workspace
infrastructure in the Workspace Explorer.
See Also:
Project Types
Workspace/Project
Device Selector
Schematic Editor
Workspace Explorer
63
Use this dialog to browse and select the workspace file (.cywrk) or project file (.cyprj) to open. You can open an
existing project that you created or one of the many examples provided with PSoC Creator.
To Open a Project:
1. Navigate to the appropriate directory where the project to open is located.
2. Select the desired project and click Open.
The project opens in PSoC Creator, and it is shown in the Workspace Explorer.
Note You can also open recent projects without this dialog using Recent Projects on the Start page or on the File
menu.
See Also:
Workspace/Project
Workspace Explorer
64
The dialog provides templates of the different types of items you can add. Source files will be compiled as part of a
build; non-source files will be ignored.
Note You cannot use this dialog to create new items for components. Instead you must use the Add Component
Item dialog.
To Add an Item:
1. In the Templates area, select the icon for the type of item to add to your workspace/project. Currently the
available templates include:
8051 Keil Assembly File Used to create an assembly file that will be compiled when you select the
Keil tool-chain.
Design Wide Resource File Used to create a file for editing design level resources, such as
interrupts, clocks, etc.
65
GNU ARM Assembly File Used to create an assembly file that will be compiled when you select the
GNU ARM tool-chain.
Keil Reentrancy File Used to mark APIs as reentrant. See Reentrant Code in PSoC 3.
RealView ARM Assemly File Used to create an assembly file that will be compiled when you select
the RealView ARM tool-chain.
XML File Used to create an empty XML file for whatever you want it for.
There are two buttons on the top right side of the dialog to change the size of the icons. Below the Templates
area is a text box that displays a brief description for each component item.
2. Specify a file name for the item in the Name field.
3. Click OK.
The item is added at the location you selected in the Workspace Explorer, and an empty file of the type you added
opens in the Text Editor as a tabbed document.
See Also:
Workspace/Project
Workspace Explorer
Text Editor
66
Use this dialog to browse and select item to add to the current project, and then click Open.
Notes
Some file types, such as *.cyre, are copied from their existing location to the current project's cydsn folder; other file
types, such as header files are not. Be aware of which files are not copied for portability issues.
If you add an existing assembly file, you may need to select the correct file type from the drop-down menu in the
Properties dialog.
See Also:
Workspace/Project
67
Workspace Explorer
Writing Code
PSoC Creator provides a Code Editor to write C code for your designs. You can use this tool or any other preferred
code editor you prefer. If you use the PSoC Creator Code Editor, files you create, edit, and save as part of your
design will be integrated into the Save and Build processes automatically. Files you edit externally can still be
included in the Build process, but if you make changes external to PSoC Creator, make sure you save those
changes using your preferred tool.
Macro Callbacks
Macro Callbacks is a term defined in PSoC Creator to call user code from macros specified in a component's
generated code. These macros can be used by defining them in the user-defined header file named
cyapicallbacks.h. This file will be included in all generated source files that offer callbacks.
A callback requires you to complete the following:
To complete the example, the cyapicallbacks.h file would include this code:
#define SimpleComp_1_START_CALLBACK
void SimpleComp_1_Start_Callback( void );
In any other user file, you could include cyapicallbacks.h and write the SimpleComp_1_Start_Callback() function.
Merge Regions
Merge Regions provide another method to insert user code, through the use of specially marked sections in
generated code, such as:
/* `#START isr_Interrupt` */
/* `#END` */
Anything you place in this region will be preserved in subsequent updates of the file. If a subsequent version of the
file does not contain the same named region, the entire region from the previous file will be copied to the end of the
file and placed in comments.
68
See Also:
Code Editor
Archiving a Workspace/Project
The Workspace/Project Archiver dialog allows you to archive an entire workspace or a project from the current
workspace. You can also use it to bundle an entire workspace, including dependent projects. The archive can either
be zipped or not. Only the files registered with the workspace/project and any file that PSoC Creator generates can
be archived.
Right-click on a project or workspace in the Source tab of the Workspace Explorer and select Archive
Workspace/Project...
Note If there are any modified files in the workspace, you will be prompted to save them before the dialog will open.
To Archive a Project/Workspace:
1. Select the Source workspace or project to archive.
2. Specify the Destination where to create the archive. Either type the path, or click [...] and browse to the
appropriate directory.
69
3. Select the Compress Archive check box to create a zip file that contains the archive; de-select to choose not
to zip the archive.
4. Select one of the following levels as desired:
Minimal This level includes project source files and generated source files. Only non-external files
are archived. Non-external files are those files located under the archiving sources parent directory on
disk.
Complete This level includes project source files, generated source files, all derived files (build
output files), and user data files. Only non-external files are archived. Non-external files are those files
that are located under the archiving sources parent directory on disk.
Bundle This level includes project source files, generated source files, all derived files (build output
files), user data files, and dependant projects. External files are included in this level. Also,
project/workspace files have their dependencies/links updated to reference the archived copies of the
projects/files. This is to achieve the goal of being able to open a bundle from anywhere and it will
always behave the exact same (that is, have all its references with it).
If you choose the bundle option, a workspace will always be archived. If a workspace is selected as a
source, it will be archived. If, however a project is selected, a new workspace will be created that
contains only the project to archive and it will be archived. This is done because there are project
dependencies that are stored on the workspace which need to be included.
Name Enter a name to rename the archived workspace. If zipped, it will also be used as the zipped
file name.
Include standard Cypress libraries Select this check box to include a copy of all Cypress libraries
(CyPrimitives and CyComponentLibrary) in the archive. This will add dependencies to the archived
copies, and they will be used prior to the standard Cypress libraries installed on the machine.
5. Click Archive. The dialog shows the progress and reports success or failure.
If successful, an Open archive in Windows Explorer check box displays to open the archive location
upon clicking OK.
If not, an error message will be displayed explaining the cause of the failure.
See Also:
Workspace/Project
Saving a Project As
Copying a Project
70
Saving a Project As
PSoC Creator allows you to save a project with another name in the same location or with any name in a different
location. This is useful when you want to have a back-up project and you do not wish to use the Archiving tool.
See Also:
Archiving a Project
Copying a Project
Pins
71
Schematic sheets
The project datasheet acts as a snapshot summary of your completed design. It is useful as a hand-off document
from the engineering team, who configure the hardware portion of a PSoC design, to the firmware team who are
programming it. This is helpful if the firmware team is using an IDE other than PSoC Creator, without direct access
to PSoC design configuration data.
See Also:
Workspace Explorer
Copying a Project
PSoC Creator allows you to copy a project within a workspace, as well as from workspace to another.
To Copy a Project:
Right-click on the project in the Workspace Explorer and select Copy.
To Paste a Project:
Right-click on a project or workspace in the Workspace Explorer and select Paste.
The copied project is added to the workspace with "_Copy_01" appended to the project name.
See Also:
Archiving a Project
Saving a Project As
72
See Also:
Options Dialog
Build Settings
Creating a new file is not the same as adding a file to a project or adding a component item. This process merely
creates an empty file of the type you specify. To add a new file to your project, see Adding a New
Workspace/Project Item. To add a component item to your project see Adding a Component Item.
73
See Also:
Text Editor
Workspace/Project
Use this dialog to browse and select files you wish to open, such as source code and text files. Opening a file using
this dialog merely opens the file in PSoC Creator. That file is not part of any project you may have open. To add a
file to an existing project, see Adding a New Workspace/Project Item.
74
To Open a File:
1. Navigate to the appropriate directory where the file to open is located.
2. Select the desired file and click Open.
The file opens in the Text Editor as a tabbed document.
See Also:
Text Editor
Workspace/Project
Creating Folders
In PSoC Creator, there are two different types of folders: physical and virtual. Physical folders are created on disk
by PSoC Creator as part of creating projects, components, and devices/families/architectures. Virtual folders do not
exist on disk. You can create virtual folders in your workspaces and projects to organize things as you need them,
but you will not see those folders using Windows Explorer.
Filters:
Each folder has a set of associated filters. When a new file is added to a project containing one or more folders,
that file will be added to the first folder with a filter matching the extension of the new file. This only occurs when
you add the file to the project directly.
See Also:
Workspace Explorer
75
Creating a Symbol
Framework Description
Window Types
Framework Description
The PSoC Creator framework provides numerous features to help organize your designs and complete projects
faster.
When you first open PSoC Creator, the framework displays with a Workspace Explorer, document work area, and
Output window. The framework also contains a menu and a status bar, as well as various toolbars that will change
depending on the type of file you are working with.
76
Workspace Explorer:
The Workspace Explorer is a docked tool window, which displays your project files in a similar manner to Windows
Explorer. If you double-click a file in the Workspace Explorer, that file will display in the work area. For more
information, see Workspace Explorer.
Start Page
The Start page is a general tabbed document window that is not part of any project. It provides links to create new
projects, open existing projects, as well as links to information and news about PSoC devices. It displays in the
same work area where other document windows will be opened as you work with your design.
You can configure whether or not to show the Start page on startup; see Environment Options.
Output Window:
The Output window is another docked tool window that shows various system messages. For more information,
see Output Window.
See Also:
Window Types
Document Windows
Tool Windows
77
Window Types
PSoC Creator has two types of windows: tool windows and document windows. These two window types behave in
slightly different ways.
Tool windows:
Tool windows are listed on the View menu and are defined by the current application and its add-ins. They include
the Workspace Explorer, Output Window, and Component Catalog. You can configure tool windows to:
Float over
Tool Windows
Document Windows
Tool Windows
Tool windows are listed on the View menu and they include some of the following:
Workspace Explorer
Output Window
78
Component Catalog
These windows provide different types of functionality within PSoC Creator; however, they all can be arranged
within the framework using the same techniques.
Tool Window Toolbar:
Window Mode This pull down menu allows you to toggle the window to different modes, including:
Floating Sets the tool window as a floating window not attached to the PSoC Creator framework.
Dockable Sets the tool window as dockable to the PSoC Creator framework.
Auto-Hide Sets the tool window to slide to the edge of the framework when not in use.
Auto-Hide Pushpin This command toggles the auto-hide feature on and off.
See Also:
Document Windows
Document windows are dynamically created when you open or create files or other items. They display in the
document work area as tabbed documents, with the active document on top and the other documents behind.
79
The following sections describe various aspects of displaying and working with document windows.
Document Work Area Toolbar:
The toolbar at the top right of the document work area contains the following commands:
Select Document This pull down menu displays a list of open document windows in the work area
according to the tab order. You can use this menu to select another open document to display.
Scroll Left/Right The left/right scroll arrows are available if there are more open documents to display to
the left or right of the visible work area.
Close All But This Closes all open tabbed documents except the selected
file.
Copy Full Path Copies the full path of the file to the clipboard for pasting into
a text file.
Open Containing Folder Opens the folder in which the file is located.
New Horizontal Tab Group Creates a new horizontal tab group and moves
the selected file to that group.
New Vertical Tab Group Creates a new vertical tab group and moves the
80
Move to Next Tab Group Moves the selected file to the next tab group.
Move to Previous Tab Group Moves the selected file to the previous tab
group.
Close All But This Closes all open tabbed documents except the selected
file.
Auto-Hide Only active for a dockable window; allows the window to collapse
to the edge of the framework.
New Horizontal Tab Group Creates a new horizontal tab group and moves
the selected file to that group.
New Vertical Tab Group Creates a new vertical tab group and moves the
selected file to that group.
Move to Next Tab Group Moves the selected file to the next tab group.
Move to Previous Tab Group Moves the selected file to the previous tab
group.
Press [Ctrl] + [Tab] to activate open documents in the order that they were most recently touched.
Press [Ctrl] + [Shift] + [Tab] to activate open documents in the reverse order.
Tab Groups:
Tab Groups allow you to manage limited workspace while working with two or more open documents. You can
organize multiple document windows into either vertical or horizontal Tab Groups and easily shuffle documents from
one Tab Group to another.
81
Split Windows:
Some types of files, such as source code, allow you to view or edit two locations of the same file at once.
To divide your document into two independently scrolling sections, select the Split icon located above the
scroll bar and drag to the desired location.
To remove the split, drag from the split back above the scroll bar.
See Also:
Tool Windows
Workspace Explorer
Output Window
Resource Meter
File Menu
Edit Menu
View Menu
Project Menu
Build Menu
Debugger Menus
82
Tools Menu
Help Menu
Standard Toolbar
Keyboard Shortcuts
Workspace Explorer
The Workspace Explorer is PSoC Creators method for displaying the contents of a workspace.
The contents are displayed in a tree format, similar to Windows Explorer. There are also different tabs along the
side of the tool window that allow you to view different types of files by category.
Toolbar Commands:
The Workspace Explorer has two commands:
Collapse to Project Collapses the selected project tree to the top-level project.
Note When you right-click on most items in the Workspace Explorer tree, you can access context-menu commands
relevant to the item selected.
To Open a File:
Double-click any file in the Workspace Explorer to open it in the document work area as a tabbed document.
Source Tab:
The Source tab displays by default if no other tab was selected. PSoC Creator only shows files you added or that
were generated from the Code Generation step of a PSoC Creator build. The view is updated whenever a build
completes or PSoC Creator is given focus.
83
When in the Source tab, you will only be able to add new folders and files to projects, or create new projects. You
will not be able to manipulate components. If you wish to add new items to components, or new components
entirely, you must use the Components tab.
Generated Source
In a design project, the Generated Source directory contains the source from the Code Generation step. Under the
Generated Source directory is a sub-directory for each architecture that has been built in the past. Each
architecture directory is further subdivided with virtual folders for each component instance that provided an API. In
addition to the instance directories, the architecture directory contains other generated files, such as a project.h,
boot file, etc., with each project being a node in the tree. Each project in the workspace also displays all of its
contents. See Generated Files.
Components Tab:
The Components tab filters the contents of the workspace, showing only the components belonging to each project
in the workspace, as well as the file and folder contents of all components. You may add new components and
items to components, and you may add new projects while in this tab. You may add files and folders outside of the
components, but only using the Source tab for those operations. For more information about components, refer to
the Component Author Guide.
Datasheets Tab:
The Datasheets tab displays and provides quick access to device and component datasheets currently used in
your design. As you add and remove components, or change devices, the list of available documents will update
accordingly.
If you double-click a file, it will open in your default PDF reader tool.
Results Tab:
The Results tab displays a dynamic listing of interesting files from the most recent build of each platform. A
platform will select a subset of build files to display, and there may be differences between what is displayed from
one platform to another.
If a platform or configuration has not been built, or if the folders created by that build have been deleted, the folder
for that platform will not be displayed. In addition, if platform and configuration directories are found, but an
expected file is missing, that file will appear grayed out, indicating it was not found on disk when expected.
The minimum set of files to be displayed for a Design build is as follows:
Programming file
Additional files that may be included are list files and map files.
For a Library build, the resulting library file will be displayed.
Files in the Results tab can be double-clicked to open an appropriate editor for the file, such as the Text Editor for a
report file. Other actions that may be available include programming a device or debugging, as appropriate. The
projects displayed in the Results tab cannot be modified in any way. The tab is simply a display of the results of
84
builds.
See Also:
Workspace/Project
Framework Description
Generated Files
Output Window
The Output window displays status messages for various features in PSoC Creator, including the builder and
debugger. This window is usually located at the bottom of the PSoC Creator framework. It is often in the same
window group as the Notice List Window.
Note When building a bootloader project, the flash size represents the number of bytes to store in flash (the same
way it works for normal projects). When building a bootloadable project, the bootloader size represents the size of
the flash rows consumed by the bootloader (the bootloader is padded to a multiple of the row size).
To Display the Output Window:
The Output window usually displays by default when you launch PSoC Creator. If the window was closed, you can
open it again by selecting Output Window from the View menu.
Toolbar:
Depending on which tool you are using, the Output window will have various toolbar commands for you to use. The
following are the most common commands:
Show output from
Displays one or more output panes to view. Several panes of information might be available, depending upon which
tools have used the Output window to deliver messages.
Clear all
Clears all text from the Output pane.
85
See Also:
Framework Description
The number or errors, warnings, and notes also displays on the PSoC Creator Status Bar.
Errors indicate there is at least one problem that must be addressed before you can build your
application. Typical errors could include: compiler build errors, dynamic connectivity errors in schematics,
and Design Rule Checker (DRC) errors. Errors from the build process remain in the list until the next build.
Warnings report unusual conditions that might indicate a problem, although you can usually build the
application regardless.
Notes
Icon Displays the icons for the error, warning, or note. A specific row may also contain a tree control
containing individual parts of the overall message.
Error Location Displays the specific line number or other location of the message, when applicable.
Project Displays the name of the project that contains the notice. White rows are for the Active project;
grey rows are for inactive projects.
86
In a schematic, a translucent red highlight shows the source(s) of the error. You can turn highlighting on or
off using the right-click menu on a notice.
In a code file, the specific line of code with the error or warning will be highlighted.
87
See Also:
Framework Description
Output Window
Notice Details
88
Resource Meter
The Resource Meter is a graphical display of the resources used in the currently active project of your workspace. It
updates after every build. This keeps you notified of possible resource overuse and helps identify which resource is
the cause of the problem.
Description
Each resource contains a color-coded bar graph that shows the number or percentage of resources used. The
following table shows the colors used and indicate their meaning:
Color
Description
Green
Red
White
If the build fails or only a partial build is performed (that is, Generate Application), any resources that did not have
their usage recalculated will be displayed as washed out, as it is potentially stale.
Note Any previous usage calculations will still be displayed; they just might not be accurate due to the fact that they
weren't recalculated.
To Open the Resource Meter:
The Resource Meter is available after you open a project or create a new project. By default, this tool window is set
to auto-hide on the right side of the PSoC Creator framework. To display it, click the Resource Meter tab:
If the window is closed, you can open it again by selecting Resource Meter from the View menu.
89
File Menu
The File menu contains the following commands:
Menu Item
Description
See Also
Project
File
Project/Works
pace
Code Example
Add >
New Project
Existing
Project
New >
Open >
Icon
File
Close
Shortcut
[Ctrl] + [O]
Close Workspace
Save
Save All
[Ctrl]+
[shift] + [S]
Page Setup
Archiving a Workspace/Project
Print Preview
Recent Files
Recent Projects
Exit
Saving a Project As
Create Workspace
Bundle
Window Types
Print Preview
90
Edit Menu
The Edit menu contains the following commands:
Menu Item
Icon
Shortcut
Description
See Also
Undo
[Ctrl] + [Z]
Redo
[Ctrl] + [Y]
Cut
[Ctrl] + [X]
Copy
[Ctrl] + [C]
Paste
[Ctrl] + [V]
Delete
[Delete]
Select All
[Ctrl] + [A]
Find
[Ctrl] + [F]
Find Replace
Replace
[Crtl] + [H]
Find Replace
Find in Files
Replace in Files
[Ctrl] + [Shift] +
[H]
Opens a dialog to find and replace text in multiple files. Replace in Files
[Ctrl] + [G]
Go To
Advanced >
UnTabify Selected
Text
Make Uppercase
[Ctrl] + [Shift] +
[U]
Make Lowercase
[Ctrl] + [U]
Incremental Search
[Ctrl] + [I]
Comment Selection
Increase Line
Indent
Decrease Line
Indent
Toggle Bookmark
Go To Line
Text Editor
Tabify Selected
Text
Uncomment
Selection
Find in Files
91
Menu Item
Icon
Shortcut
Description
See Also
[K]
Outlining >
Text Editor
[Ctrl] + [M], [M]
Stop Automatic
Outlining
Start Automatic
Outlining
Insert Snippet...
Surround with...
Toggle Outlining
Expansion
Snippets >
View Menu
The View menu contains the following commands:
Menu Item
Description
See Also
Output Window
Output Window
Workspace Explorer
Workspace Explorer
Code Explorer
Component Catalog
Component Catalog
Resource Meter
Resource Meter
Framework Description
Find Results
Zoom In/Out/To
Icon Shortcut
92
Project Menu
The Project menu contains the following commands:
Menu Item
Icon Description
See Also
New Item
New Item
Existing Item
Import Component
Import Component
Update Components
Unload/Reload Project
New Folder
Dependencies
Dependencies
Build Order
Dependencies
Device Selector
Device Selector
Archive Workspace/Project
Archiving a
Workspace/Project
Export to IDE
<Project> Resources
Design-Wide Resources
Build Settings
Build Settings
Properties
Properties
93
Build Menu
The Build menu contains the following commands:
Menu Item
Icon Shortcut
[F6]
Description
See Also
Building a PSoC
Creator Project
Cancel Build
[Ctrl] + [Break]
Compile File
[Ctrl] + [F6]
Generate Application
Generated Files
Generating a Project
Datasheet
See Also:
94
Icon Shortcut
Windows >
Description
Provides access to the various debugger windows. See Debugger
Windows.
Breakpoints
Output
[Ctrl] + [F5]
Program
Opens the Select Debug Target dialog to manually select the debug
target to use.
Debug
[F5]
Debug without
Programming
[Alt] + [F5]
Address Breakpoint
Function Breakpoint
Variable Watchpoint
Memory Watchpoint
[Ctrl] + [Shift] +
[F9]
95
Icon
Shortcut
Windows >
Description
Provides access to the various debugger windows. See Debugger
Windows.
Breakpoints
Output
Watch >
Locals
Opens the Locals window to view and modify all of the local variables
in the current debug frame.
Components
Call Stack
Opens the Call Stack window to track the order that different functions
are called by the target program.
Opens one of four Memory windows to display the values stored in the
memory of the processor.
Memory >
Disassembly
Registers
Opens the Registers window to display the core CPU registers and
their values
[Ctrl] + [F5]
Program
Opens the Select Debug Target dialog to manually select the debug
target to use.
Resume Execution
[F5]
Continues the debugger. Starts the debug target running again after a
Halt or a breakpoint. Use this function to have the program continue
running to the next breakpoint.
Halt Execution
Stop Debugging
[Shift] + [F5]
96
Command
Icon
Shortcut
Description
Reset
Step Into
[F11]
Step Over
[F10]
Executes a single line of code. The debugger will break at the following
line of code. If the current line of code is a function call, the function will
be executed without stopping. The debugger will then stop on the next
line after the function call. Use this to verify that a line of code is doing
what is expected. This function temporarily allows the processor to run
until it finishes processing the instructions that make up the current line
of code.
Step Out
[Shift] + [F11]
Toggle Breakpoint
[F9]
Address
Breakpoint
File Line
Breakpoint
Function
Breakpoint
Variable
Watchpoint
Memory
Watchpoint
Delete All
Breakpoints
Enable All
Breakpoints
Refresh
Enable/Disable
Global Interrupt
See Also:
97
Tools Menu
The Tools menu contains the following commands:
Menu Item
Description
See Also
Opens the Installation Wizard to install MiniProg3 drivers Installing MiniProg3 Drivers
for the Vision IDE.
DMA Wizard
DMA Wizard
Component Tuners
Bootloader Host...
Options...
Options Dialog
Help Menu
The Help menu contains the following commands:
Menu Item
Description
Topics
Document Manager
Opens the Document Manager to access various Cypress documents. If Cypress Document
Manager is not installed, this opens a link on the Cypress web site to learn more about it and
download it.
System Reference
System Reference Guide - Opens the most current version of the System Reference
Guide, regardless of any version cy_boot you are using in your design.
Open Web Page - Opens a web page to access older versions and translated copies of the
System Reference Guide.
Update Manager
Launches the Cypress Update Manager to check for and install program updates.
Cypress Dev Community Open the Cypress Development Community web page.
98
Menu Item
Documentation >
Description
Quick Start Guide - Opens the PSoC Creator Quick Start document.
Known Problems and Solutions - Opens a Cypress web page to access the Known
Problems and Solutions document.
Migration Guide - Opens a Cypress web page to access various migration guide
documents.
Device Datasheets - Opens a Cypress web page to access PSoC device datasheets.
PSoC Technical Reference Manuals - Opens a Cypress web page to access PSoC TRM
documents.
Japanese
Documentation >
Chinese
Documentation >
Register >
Support >
PSoC Creator
Keil
Create a Support Case - Opens the Cypress support web page to create a new support
case.
View Your Support Cases - Opens the Cypress support web page to your home page.
Order Samples
Opens the Cypress Store web page to order samples, kits, cables, etc.
Contact Us
About
Opens the About PSoC Creator dialog, which provides build and plug-in information.
Standard Toolbar
New Project/Workspace
New File
Open Project/Workspace
Open File
99
Save
Save All
Print Preview
Cut
Copy
Paste
Delete
Undo
Redo
Keyboard Shortcuts
The following table lists many of the various keyboard shortcuts available in PSoC Creator.
Note These are the default keyboard shortcuts. You may change them using the Customize dialog.
Location
Command
Shortcut
File Menu
Open
[Ctrl] + [O]
[Ctrl] + [F4]
Save
[Ctrl] + [S]
Save All
[Ctrl] + [P]
Undo
[Ctrl] + [Z]
Redo
[Ctrl] + [Y]
Cut
[Ctrl] + [X]
Copy
[Ctrl] + [C]
Paste
[Ctrl] + [V]
Delete
[Del]
Select All
[Ctrl] + [A]
Find
[Ctrl] + [F]
Replace
[Ctrl] + [H]
Find in Files
Replace in Files
Go To
[Ctrl] + [G]
Edit Menu
100
Location
View Menu
Debug Menu
Command
Shortcut
Make Uppercase
Make Lowercase
[Ctrl] + [U]
Incremental Search
[Ctrl] + [I]
Comment Selection
Uncomment Selection
Toggle Bookmark
Zoom in
[Ctrl] + [+]
Zoom out
[Ctrl] + []
Breakpoints
Output
Watch 1
Watch 2
Watch 3
Watch 4
Locals
Components
Call Stack
Memory 1
Memory 2
Memory 3
Memory 4
Disassembly
Registers
Program
[Ctrl] + [F5]
[F5]
[Alt] + [F5]
Halt Execution
101
Location
Command
Shortcut
Stop Debugging
[Shift] + [F5]
Reset
Step Into
[F11]
Step Over
[F10]
Step Out
[Shift] + [F11]
Toggle Breakpoint
[F9]
Address Breakpoint
Function Breakpoint
Variable Watchpoint
Memory Watchpoint
[Ctrl] + [Shift] + F9
[F6]
[Shift] + [F6]
Cancel Build
[Ctrl] + [Break]
Compile File
[Ctrl] + [F6]
Help Menu
Help Topics
[F1]
Design Elements
Palette
[Esc]
Rectangle Tool
[r]
Ellipse Tool
[e]
Line Tool
[l]
Text Tool
[t]
Arc Tool
[c]
Image Tool
[m]
Wire Tool
[w]
Sheet Connector
[s]
Digital Input
[i]
Digital Output
[o]
Digital Inout
[b]
Analog Terminal
[a]
External Terminal
[x]
Build Menu
102
Location
Command
Shortcut
Sheet / Page
Disable/enable rubber-banding
Zoom to selection
Pan
Scroll up / down
Zoom in / out
[Ctrl] + [w]
Navigation
Go back to previous cursor location in Code Editor. [Ctrl] + [-] (Use [Shift] for reverse direction.)
Code Editor
Autocomplete
[Ctrl] + [Space]
Find References
Go To Declaration
[F12]
Go To Definition
[Ctrl] + [F12]
* If items are selected, using the arrow keys moves items 1 grid unit in the specified direction. If sheet/page is
selected, using the arrow keys scrolls instead.
** Components, wires, and other design-specific objects will always snap to grip. Other shapes not part of the
actual design can be moved freely.
See Also:
File Menu
Edit Menu
Build Menu
103
Customize Dialog
Dialogs
Component Update
The Component Update Tool dialog allows you to update versions of components in your designs.
Note If you have custom components in your design based on older Cypress component versions, be aware that
these components cannot be easily updated as part of the component update process. If you update these
components, it is likely this will break your design.
Under Available Versions, bold items indicate components that will be updated. By default, PSoC Creator selects
the most current version of a component to be updated.
After a component update operation has been completed, the tool generates a ComponentUpdateLog.txt file, which
provides details of the update. This file is stored as in the corresponding project folder.
To Open the Dialog:
1. Open a PSoC Creator design project with one or more components.
2. Select Update Components from the Project menu.
Notes
If newer versions of components are available in a design, an icon will be added to the status bar as
follows:
You can also right-click on the project in the Source tab of the Workspace Explorer and select Update
Components.
104
Obsolete An obsolete component version should updated to a newer version. PSoC Creator will display
a warning or error about this component version in the Notice List Window.
Prototype A pilot component version is typically a working example only. It is not characterized and not
regression tested. PSoC Creator will most often display a note about this component version in the Notice
List Window. In some cases, it will display a warning.
Incompatible An incompatible component version means that the selected component and version is not
compatible with the selected device for your design. PSoC Creator will display a warning or error about this
component version in the Notice List Window.
To View Datasheets:
Click the component link in the Name column at the top of each set of component instances to display the latest
version of the component's datasheet.
To Update Components:
The components to be updated are selected automatically and shown in bold under the Available Versions
column.
1. As desired, pull down the menu under Available Versions for each component and select the version you wish
to use. You might use this to downgrade a component to a previous version, for example.
2. Click Next.
105
4. The Create workspace archive before updating check box will create an archive of your project. Leave
selected or deselect to skip the archiving step.
5. Click Finish to update the component(s) or click Cancel to cancel.
See Also:
Component/Instance
Workspace Explorer
Environment Options
106
Customize
The Customize dialog is used to display various toolbars, as well as customize which commands appear on
toolbars. You can also create keyboard shortcuts for any command.
Toolbars
Commands
Keyboard
New Displays the New Toolbar dialog box, which allows you to create and name a custom toolbar.
Rename Displays the Rename Toolbar dialog box, which allows you to change the name of a custom
toolbar only.
Reset Removes any changes to the predefined toolbar selected in the Toolbars list and resets it to its
original state. Available only if you select a built-in toolbar.
Note You can only delete and rename toolbars that you created.
Commands Tab
The Commands tab allows you to add and remove commands on toolbars and menus.
Categories Specifies the set of commands that are displayed in the Commands list box. The categories
of commands are based on menu titles provided by the tools and designers that the environment is
107
currently supporting. This list of titles is dynamic so that the order of categories and the menu titles change,
depending on the tools and the designer, as well as any customizations made to them. Therefore, it is
possible for two menus from different designers to have the same name, so the same title can appear twice
but offer different command sets.
Commands Displays the commands and command images based on the category you selected. You can
drag a command onto the toolbar you want to customize.
Modify Selection Displays a list of commands you can use to customize the display of the button on the
toolbar. For example, you can change the image or accelerator keys, as well as specify whether to display
text instead of an image for the command. This button is available after you select a command button on a
toolbar you want to customize.
Keyboard Tab
The Keyboard tab is used to specify shortcut key combinations for commands.
Show Commands containing Use this section to filter the commands displayed in the scroll list.
Shortcut(s) for Selected Command Shows any shortcut currently assigned to the command. If
applicable, you can Remove the shortcut.
Use new shortcut in Pull-down menu to assign the shortcut to a specific subsystem or global.
Press shortcut key(s) With the cursor in this field, press the key(s) to be used for the shortcut and click
Assign.
Shortcut currently used by This field shows if the shortcut is currently in use and by what function.
See Also:
Framework Description
Standard Toolbar
108
Dependencies
The Dependencies dialog is used to show and select one or more user-level project dependency. The order of the
dependencies determines the order that PSoC Creator will use to search for components and code.
109
Subdependencies
If you have multiple projects in your workspace, there are cases where one or more projects use components
defined in another project in the same workspace. In this case, if you select the Components check box next to the
project where the component is defined, the Subdependencies dialog will display.
Project dependencies are a list. For example, suppose a workspace has "Project A" that depends solely on "Project
B" that depends solely on "Project C."
Project A will not use components or code from Project C, unless Project A has its own direct dependency
on Project C.
If modifying dependencies for Project A, selecting Subdependencies for Project B would show Project C.
If adding a new dependency for Project A, the Subdependencies dialog makes it easy to add any other
dependencies that may be necessary.
If you do not add Project B Subdependencies for Project A may cause DRC errors or link errors in Project
A.
110
Device Selector
Use the Device Selector dialog to choose which device to use in your design.
The dialog provides a list of available devices, as well as various characteristics for each device. Using the dialog,
you can:
Notices tab Displays any notices generated while running the auto device selection.
Log tab Displays the log file for the auto device selection process.
Notes
The title bar of the dialog displays the name of the project that the device is being set for and the name of
the currently selected device.
The Device Selector layout is saved on a per project basis. When you re-open the Device Selector for a
particular project it will retain all the information from the previous session.
111
The Device Selector allows for targeting a project to a specific Silicon Revision. This will cause changes in
the generated code such that it can only be programmed on a target device that has a matching Silicon
Revision.
Note You can also open the Device Selector from the New Project dialog Device pull down menu when creating a
new design project. The major difference is that when opening the Device Selector for a new design, none of AutoSelect features are applicable and you will only see devices for the project type you have selected.
To Select a Device:
To select a device, do one of the following:
To quickly select the default device for a specific architecture, right-click anywhere in the device selector table area
and select Select Default Device. Then pick your desired architecture.
To Sort a Device Category:
You can sort by any column in ascending or descending order by clicking on the header for that column. Clicking
again will toggle the sort direction. When a column has a sort applied to it, an arrow will be displayed under the text
in the column header.
By default, the part number column in the device selector has the sort applied to it. To re-sort on the part number,
right-click anywhere in the device selector table area, select Sort by Part Number, and pick your desired sort
direction. This menu also provides a way to automatically scroll to whatever device is currently selected.
To View Device Datasheet:
Click View Datasheet.
This opens a web page to the selected device's datasheet.
112
To Show/Hide Columns:
Click Hide/Show Columns.
This is used to hide/show in the device table. This opens Display Columns dialog that lists all the available columns.
You can then check/uncheck columns to alter what is displayed in the device table.
Note These changes are made live as you change the state of the check boxes. Columns that have filters applied
cannot be hidden. They are disabled in the dialog and are followed by the text - Filtered so you know why they
cannot be hidden.
Status information displays above the device table, showing how many columns are hidden. If no columns are
hidden, no status information is provided.
To Filter the Device Table:
Each column in the Device Selector has a drop-down button used for filtering on the column. When pressed, a
drop-down window displays a list of check boxes, one for each of the different values possible in that column. You
can uncheck as many of the values as desired, removing devices with those values from the set of displayed
devices. These changes are not applied to the device table until you click off the window or press the [Enter] key
(pressing [Esc] will close the window without applying any of the changes). By default all values are checked
meaning that no filtering has been done.
When filtering has been applied on a column, the column header (and the accent color on the button) changes to
make it very obvious which columns have filters applied. The button also displays the value that has been left on.
If more than one value has been left on, only the first value will be displayed on the button. The value will be
followed by indicating that more values are being displayed. In this case hovering the mouse over the button
will produce a tool tip that displays all the values that are currently on.
There is a status bar just below the device table that shows how many devices are currently being displayed (i.e.
how many devices passed all the filters) versus how many devices exist. There is also a link here that clears all the
filters from the table making all the devices visible again.
To Reset to Defaults:
Click Reset to Defaults.
113
This resets all the settings back to their defaults (removes filters, re-orders columns, resets which columns are
displayed, etc.).
To Auto-Select a Device:
Auto device selection helps you decide which device to choose. When you click the Start Auto Select button,
PSoC Creator checks each of the visible devices in the Device Selector table to see if the current design would
work on that device. As each device is checked, the value for the Design Fits on Device column is either
Unknown, Yes, or No. You can sort and filter on these results. During the auto device selection process the Notices
and Log tabs are updated as needed. These tabs are only used with auto device selection process.
See Also:
Workspace Explorer
Enumeration Types
The Enumeration Types dialog allows you to create and edit enumerations (or user-defined types) for your
components. This dialog is used in conjunction with defining parameters for a component. The process of creating
components can be complex. This topic is provided as a help if you press [F1] for this dialog. For more in depth
discussion regarding creating components, refer to the Component Author Guide.
A component can contain multiple types but each type name must be unique and each key in the types must be
unique across all other types in that component. The types defined for each component in a given project are
aggregated on the project (the project type cache) and the project type caches from all projects on a design's
search path are aggregated into a design type cache.
Internal to the symbol, the type and the type keys are accessible by their "short name."
Outside of the symbol, the type and keys are identified using the "long name," which is the component
name followed by the actual type or key name (using "__" to separate the two).
When evaluating a type or key for an expression, the evaluation system first looks in the enclosing symbol for the
identifier. If it is not found there, the system queries the design type cache. If the design type cache does not
114
2. Replace EnumType_1 with the name you wish to use and press [Enter].
3. Under Enum Set, click in the first row under Name and type a name for the 1st name/value pair of the
enumerated type; type a value under Value or accept the default.
4. Optionally, enter a string in Display Name that will display in the component's Configure dialog pull down menu
for that parameter.
5. Enter as many enum sets as needed and click OK to close the Enumeration Types dialog.
To Delete an Enumeration Type:
Highlight the type to delete, and click Delete
See Also:
Symbol Editor
115
Device Selector
Options Dialog
116
Feedback
The Feedback page allows you to rate components frequently used in designs, and send Cypress feedback about
them.
Each component listed on the page contains a link to the component's web page on www.cypress.com, if one
exists. There is a rating scale from 10 to 0 to rate the component. There is also an Additional Feedback area where
you can enter any additional comments you may have. Just click the text that reads "Click here to provide additional
feedback for ..."
117
Contact Us
118
Most examples have a description document that provides setup and configuration information. This document is
displayed under the Documentation tab when you select a project from the list. Also available is example code
located under the Sample Code tab.
After opening a code example, you can open these files from the Workspace Explorer by double-clicking them.
To Open the Find Code Example Dialog:
All Examples
To open the dialog with all examples available, select Find Code Example... on the Start page, or select Code
Example... under the File menu.
Component-Specific Examples
To open the dialog with a list of projects associated with a corresponding component, right-click on a component in
the Component Catalog or on the design canvas, and select Find Code Example...
To Select a Project:
1. As needed, choose filters under Device Family or Filter by to narrow the list of available projects.
Select the Device Family for the project. For example, All, PSoC 3, PSoC 4000, PSoC 4200 BLE,
PSoC 5LP, etc.
If desired, also select a keyword from the Filter by pull-down menu or type the project name or other
words. This could be the name of a component or different keywords used by code example
developers to distinguish projects.
119
2. Select a project or workspace from the list matching the given filtering criteria.
Note It is possible that multiple projects will be contained in an example workspace. If any of the projects in a
workspace matches the filtering criteria, the workspace and all of its projects will be shown.
3. View the documentation and/or code for the project by clicking the appropriate tab, if desired.
4. Click either Create Project or Create Workspace, as appropriate. The New Project wizard opens to complete
the project/workspace creation process.
See Also:
Workspace/Project
Component/Instance
Generate Verilog
The Generate Verilog dialog allows you to choose the architecture, family, and/or device for the Verilog file being
generated for your component symbol. This dialog is used as part of creating a component. For more in depth
discussion regarding creating components, refer to the Component Author Guide.
Leave the default setting Generic Device selected to allow the Verilog file to apply to all devices. Deselect
the check box to enable the Architecture, Family, and Device pull down menus.
120
Choose a device Family to create the Verilog file in a subfolder for a family of devices.
Choose a specific Device part number to create the Verilog file in a subfolder for a specific device.
See Also:
Import Component
The Import Component dialog is used to import a component from another project. It is also used to import one or
more components from a component archive file.
Note Imported components retain all of the symbol and component properties of the original component. This
includes Component Catalog Placement. If there are duplicate components from different Dependencies in your
project, the Component Catalog will display the component from the dependency with the highest precedence.
The dialog has the following options:
Import from project/library Used to choose the project/library that contains the component to import.
Source Component When importing from a project/library, this option is used to specify which
component from the project/library to import.
Import from archive Used to select the component archive that contains the component(s) to import. For
more information, see Exporting a Component. All components in the archive file will be imported.
Target Project Used to select the specific project for which the component will be imported.
If you selected Import from project/library, select the project that contains the component to import. If
necessary, click the browse button [...] and navigate to the folder containing the component to import. In
121
If you selected Import from archive, select the appropriate component archive (.cycomp file). If
necessary, click the browse button [...] and navigate to the folder containing the component archive.
2. In Target Project, select the project where the component will be placed.
3. Click OK.
PSoC Creator adds the imported component(s) to the selected project.
See Also:
Dependencies
Component Catalog
Exporting a Component
Workspace Explorer
Merge Dialog
The Merge dialog displays when you try to enable a Disabled Schematic page and there are one or more
component and/or wire instances that have the same name.
122
Modified Files
The Modified Files dialog allows you to selectively save files when closing a project or workspace.
This dialog displays automatically if you attempt to close a file or workspace/project that needs to be saved.
To Use this Dialog:
Click Cancel to close the dialog and leave the files open.
123
Notice Details
The Notice Details dialog displays expanded information for messages in the Notice List window. The Notice
Details dialog will display the entire message, as well as additional information if available.
Obsolete Device
The Obsolete Device dialog displays when you open a project with a device that is no longer in the Cypress device
catalog. This dialog suggests the next best alternative for your device, and provides a link to the suggested device
datasheet for more information.
124
Click choose another replacement to open the Device Selector and choose a different device.
Note The project will also be unloaded if you close the Device Selector without selecting a device.
If you reload the unloaded project, PSoC Creator will select the default device for your project. You can use
the Device Selector to change it, if needed.
See Also:
Device Selector
Options Dialog
The Options dialog allows you to specify various settings for PSoC Creator, such as where projects are stored or
the color of wires.
Text Editor
125
Design Entry
Language Support
Program/Debug
Environment
Always show the Error List window if a build has errors yes (default) or no.
Always display the workspace in the Workspace Explorer yes (default) or no.
Display the Output window when a build starts yes (default) or no.
Auto-Backup Designs yes (default) or no. If this option is selected, when you open designs created with
previous versions of PSoC Creator, the older designs will be backed up to an archive (located in
[Workspace Folder]/Backup). This backup copy will contain the version of the tool that was last used to
save it (that is, the older version it can be opened with) in the file name.
Don't show Keil registration ... yes or no (default). If selected, the Keil Compiler Registration dialog will
not display every time you start PSoC Creator.
Include Starter Design documentation in new projects yes (default) or no. If selected, documentation
for the design will be included with new projects created from Starter Designs.
Do not display Family Migration dialog yes or no (default). If selected, the Family Migration Information
will not be shown when migrating to or from a PSoC 4/PRoC BLE device project.
'Component not supported for the toolchain' message is an error yes or no (default). If selected the
message about a component not supported for the given toolchain will display as an error in the Notice List
Window.
126
8051 Toolchains:
This section is used to set the default 8051 toolchain.
This option also allows you to specify paths to the binaries for each specific toolchain.
127
ARM Toolchains:
This section is used to set the default ARM toolchain.
This option also allows you to specify paths to the binaries for each specific toolchain.
ARM GCC Generic There is no default install location. It can be in whatever folder you extract the files.
Example files that should be in the selected folder: arm-none-eabi-as.exe, arm-none-eabi-gcc.exe, armnone-eabi-ar.exe, arm-none-eabi-addr2line.exe
Note Some toolchains require environment variables to find its bin, include, and library paths. These variables are
set by the toolchain installer. You may have to restart PSoC Creator in order to use the new environment variables.
Default Dependencies:
This option allows you to specify default libraries that appear as user dependencies on the Dependencies dialog for
all newly created projects. Default dependencies apply to all new projects on a per user basis, so they will be the
included for all your new projects.
Note Projects created with PSoC Creator 1.0 and initially opened in the current version of PSoC Creator will be
updated to include all default dependencies defined at that time. Existing projects for the current version of PSoC
Creator will not be updated to include any default dependencies added in the future.
This area contains four buttons: Add, Remove, Move Up and Move Down. For each dependency there are two
check boxes: Components and Code to specify whether or not there is a dependency on the search path, code,
both, or neither.
See Also:
Keil Compiler
128
Dependencies
Toolchain Documentation
General
Semantic Parsing
General:
This section provides options to change various editor behaviors.
Lines/Columns
Show Line Numbers This check box allows you to control whether or not to display the line numbers.
Highlight Current Line This check box allows you to enable and disable the current line indicator, which
shades the current line.
Enable Column Guide This check box allows you to enable the column length guide. If enabled, you can
specify the column length in characters.
129
If you enable the Soft Tabs feature and then press the [Tab] key, the text editor uses the specified number
of spaces instead of a tab key stroke.
Note Turning the Soft Tabs feature on or off does not affect previously inserted tabs.
Semantic Parsing:
This section provides options to change settings for auto-complete and inline diagnostics:
Enable inline diagnostics If the Enable semantic parsing check box is selected, this check box is
enabled to turn on and off the inline diagnostic feature.
Enable autocomplete If the Enable semantic parsing check box above is selected, this check box is
enabled to turn on and off the Autocomplete feature.
Show completion results automatically If the Enable autocomplete check box is selected, this
check box is enabled to show the completion results. If checked, items will be shown; otherwise, they
will won't.
130
Sort alphabetically If the Enable autocomplete check box is selected, this check box is enabled to
turn on and off the sorting mechanism for autocomplete. If checked, items will be arranged
alphabetically; otherwise, they will be arranged in order of anticipated value.
Filter unmatched items This option causes non-matching strings to be removed from the popup. It
causes the set of choices to be reduced as you types. By default, this option is not enabled.
If the Filter unmatched items check box is enabled, the Match text anywhere in completion check
box becomes available to all the search to return matches in the middle of strings; not just from the
beginning. For example, the string PWM will return matches for PWM_1 and MyPWM. By default,
this option is not enabled.
Macro Filtering This option is used to specify that Macros (#define) can be omitted from the popup
list with the following options:
Show none
Note These options apply a filter to what macros are included in the auto-complete window for the All
and Macros only displays. You can still toggle between All, Macros only, and Non-macros by pressing
[Ctrl] + [Space].
Tab behavior This option is used to allow how the [Tab] key is used while the popup is displayed, as
follows:
Perform UNIX-style Tab-completion (The [Tab] key adds as many characters as possible to the
word being typed such that the result is still a match for the set of matches prior to the
completion.)
Minimum characters required for popup This option is used to specify how many characters to
type before the autocomplete popup displays. The valid range is 1-10. The default value is 1.
Note When the popup is already open this option is ignored.
131
Show settings for Pull-down to select options for different types of files to use in the editor.
Use defaults This will restore the settings for the currently selected file type back to their original values
provided by PSoC Creator.
Font Pull-down to select a font type for the selected Display items.
Size Pull-down to select a font size for the selected Display items.
Display items List to select the various items in the editor that can be changed.
Font style Pull-down to select different styles for the font: bold, italic, strikeout, and underline.
Item foreground/background Pull-downs to select colors for the selected Display items and
background.
Display informational messages Selecting this check box will display informational messages related to
Find & Replace in PSoC Creator.
Automatically populate Find What ... Selecting this check box populates the Find What field with the
highlighted word(s) in the Text Editor.
See Also:
Options Dialog
Code Editor
132
Find Replace
Page settings for the display of the canvas, including grid type and color.
Text settings for labels including whether to display expressions and the color or owner lines.
Wire settings for wires including colors, widths, and fonts. There is also a setting for rubber-banding.
When this option is turned on, wires will automatically be redrawn when you move objects. If rubberbanding is turned off, wires will not be redrawn and connections will be broken. Press the [Space Bar] while
moving objects to temporarily disable or enable rubber-banding, respectively.
Sheet Templates:
This section allows you to specify locations where PSoC Creator will look for sheet template files to be used with
design entry tools. See Sheet Template Editor for information about creating sheet templates.
Use the Add button to add more paths to locations for sheet templates; use the Remove button to remove paths.
133
Component Catalog:
This section contains component options:
Show Hidden Components Selecting this check box displays all the hidden components in the
Component Catalog, including primitives. Primitives are basic components that are used as building blocks
in the typical components found in the catalog.
Enable Param Edit Views Selecting this check box allows you to view the Expression View in each
component's Configure dialog by right-clicking on the different tabs in that dialog.
Warning Switching to the Expression View is an advanced feature. It requires a thorough knowledge of the
valid parameter settings for the component. Using this view makes it possible to create combinations of
parameters that are not valid. Therefore, you may need to cancel any changes and restart the process if
you cannot find valid parameters.
Remember Dialog Sizes Selecting this check box makes it so that components Configure dialogs will
save/restore their size on a per component basis. Unchecking this box will cause the dialogs to open as
their default size instead.
Note If the saved size is larger than the current screen, the size will be adjusted to fit the screen.
Reset Sizes Clicking this button will cause all the currently saved dialog sizes to be reset to the default
size for their components. This operation cannot be undone.
Component Security:
Allows you to add and remove paths to allowed third party customizers that can be used within PSoC Creator.
PSoC Creator will generate errors for third party customizers not included in this section. When you try to open an
external project, PSoC Creator displays the following:
Project XXX contains components that include special code that runs on your machine. Do you trust the
source of the project and wish to use the projects components.
If you select Yes, then the path of the project is added to the relevant setting. After this, whenever you open this
particular project, no messages will be shown and the project will load and build normally.
If you select No, then the project will load with an error:
Component YYY is not available. Component Security is disabled for the project XXX. If you trust the
author of the project and wish to allow this component to run code on your computer during the design
process, select Tools > Options > Design Entry > Component Security and add the project folder to the
approved list.
After this, whenever you open this project it will show this error until you add the path.
See Also:
Options Dialog
Component Catalog
Configure dialog
134
General Options:
The following options are available under the General (default) section:
Datasheet Language
Specify whether to Use Locale or to Force Language. If a datasheet language pack is installed, the Force
Language option will enable a pull-down menu with different languages to select.
When opening a datasheet, if the specific language and version is not available, the Select Datasheet dialog will
display to select an appropriate datasheet.
See Also:
Options Dialog
Select Datasheet
135
Program/Debug Options
The Program/Debug section of the Options dialog contains various options for configuring the device, debugger,
MiniProg3, and kits.
General:
Under the General category, you can configure the following:
Evaluate Text box to specify the number of children retrieved at a time in the variable view.
Default Radix Pull down menu to specify the default Radix display in various windows.
On Run/Reset, run to Radio option to select the "run to" point: Reset Vector, Main, or First Breakpoint.
When inserting software breakpoints, warn Radio option when to warn on inserting software
breakpoints.
Ask before deleting all breakpoints Check box to indicate if PSoC Creator will ask you before deleting
breakpoints.
Require source files to exactly match the original version Check box to indicate if source files should
match the original version. This option will allow you to edit code while debugging.
Note Changes will not take affect until after you recompile.
Disable Clear-On-Read Allows the debugger to read the CLR registers without actually causing the data
to be cleared.
Automatically reset device after programming After programming, automatically does a reset to cause
new program to execute.
136
Allow debugging even if build failed If the build failed, but the output from a previous build still exists,
provide a dialog box to allow starting the debugger with the old build.
Note When debugging an old build, the code being debugged may not match the source code in the editor.
Choose the window or control in the Show settings for pull-down menu. Click Use Defaults to reset the
settings to the default.
Choose the Font type. (Bold font items indicate they are fixed-width fonts.)
Under Display items, choose an item to change and either select a color from the Item foreground or
Item background pull-down menus, or click the associated Custom... button to create a custom color.
Choose the Font Style to change the text format to bold, italic, strikeout, and/or underline, if applicable.
Device Recognition:
Device Recognition is used to configure PSoC Creator to recognize 3rd party devices. This is done so that the
Select Debug Target dialog can list correct information about devices that are attached to a computer.
Note that while this configuration allows PSoC Creator to recognize 3rd party devices, these devices cannot be
selected for debugging. One use of Device Configuration is to configure the size of the Instruction Register and
Data Register for 3rd party devices attached in a JTAG chain.
Note that Device Configuration can be accessed in two ways: from the Options dialog and from the Select Debug
Target dialog by right-clicking on a node.
Port Configuration:
This section is used to configure the appropriate port.
MiniProg3:
Active Protocol Selects the protocol used to communicate with the target device.
Clock Speed Selects the frequency at which the MiniProg3 attempts to communicate with the target
device. The selected speed should be no more then 1/3 of the Bus Clock speed of the target device.
Additionally, while slower speeds are possible for debugging, the speed should be at least 1 MHz to
program the device. 6 MHz is the highest recommended clock speed for PSoC devices.
Power Specifies the amount of voltage that the MiniProg3 will provide to the target device or whether
power is from an external source.
Acquire Mode Selects the mechanism used to reset the device so that debugging is possible.
Connector Selects which connector on the MiniProg3 to use for sending data.
Active Protocol Displays the protocol used to communicate with the target device.
Power Specifies the amount of voltage that the MiniProg3 will provide to the target device or whether
power is from an external source.
137
Acquire Mode Selects the mechanism used to reset the device so that debugging is possible.
TrueTouch Bridge:
Active Protocol Displays the protocol used to communicate with the target device.
Power Specifies the whether the voltage is from an internal or external source.
Acquire Mode Selects the mechanism used to reset the device so that debugging is possible.
DVKProg1:
Power Specifies the whether the voltage is from an internal or external source.
Acquire Mode Selects the mechanism used to reset the device so that debugging is possible.
See Also:
Options Dialog
Device Configuration
Debugger Windows
Environment Options
The Environment section of the Options dialog contains several settings to specify how things display in PSoC
Creator.
138
This warning dialog allows you to change the option setting, as well as to download Cypress Document Manager
from www.cypress.com. If you do nothing and click OK, the document will open in the default viewer.
Select Editor Tab on Right-Click
If this check box is selected, the mouse right-click action on a document window tab selects that document for
display in addition to displaying a menu. If this check box is not selected, the right-click action only displays a menu.
Number of Recent Files
This text box allows you to specify the number of files shown in the Recent Files item under the File menu.
External File Extensions
Use this field to enter file extensions which will open with other applications instead of PSoC Creator. Separate the
extensions using commas.
See Also:
Options Dialog
File Menu
View Menu
139
Component Update
Window Types
Print Preview
The Print Preview dialog allows you to preview a document before printing it.
The types of PSoC Creator documents you can preview include: schematics, symbols, source code files, and some
design-wide resources files.
To Open the Print Preview Dialog:
Click the File menu and select Print Preview.
To Use the Print Preview Dialog:
Use the Zoom pull-down menu to view the preview at difference sizes.
For files with multiple pages, use the various page view options. Use the Page box to jump to a specific
one page view.
140
Properties
The Properties dialog provides information about selected items in other windows, such as the Workspace Explorer,
Schematic Editor, Symbol Editor, and so on.
In many cases, you can change different values - or properties - of the selected items. In addition to project-level
properties, each file in a project has properties. These properties allow you to set various options at a file level.
Depending on how you opened this dialog, it may contain different categories of properties, such as:
Reloading Files
If you work on PSoC Creator files outside the application, PSoC Creator -- when it regains focus -- will check if any
files that are open have been changed on disk. If any files have changed, PSoC Creator will display two possible
prompts, asking which of the files should be reloaded. If both types of documents exist, both prompts will be
displayed.
To stop PSoC Creator from attempting to reload files that have been modified outside of the application you can
uncheck the Detect when files are changed outside this environment option in Environment Options.
141
Any modified files that are reloaded will cause all unsaved changes to be lost.
Check All This option checks all the files specifying that they should all be reloaded.
Uncheck All This option unchecks all the files specifying that none of the files should be reloaded.
From this dialog, the option to automatically reload unmodified files without prompting first can be set. If set to true
this dialog will no long be displayed.
Note The option can be also changed from the Environment Option: Auto load changes, if saved.
142
See Also:
Modified Files
Environment Options
Select Datasheet
The Select Datasheet dialog is used to select an appropriate datasheet to open. This dialog displays when you try
to open a datasheet, but the specific language and version of that datasheet is not available.
143
For an existing project, right click on your design canvas and select Change Template.
Templates:
This area lists the available sheet templates to select for your design. Click on a template to select it.
Preview:
This area shows a preview of the selected template.
See Also:
Schematic Editor
144
This dialog only displays when you create a new sheet template. See Sheet Template Editor for more information.
Paper:
Choose a paper size from the pull down menu, or specify custom Width and Height measurements in inches.
Orientation:
Specify Portrait or Landscape.
Margins:
Specify the Top, Bottom, Left, and Right margins in inches.
See Also:
145
Signal Name
The Signal Name dialog is used to name a signal.
For a wire with no label, double-click the wire, or right-click and select Edit Name and Width.
146
Indices:
Use this section to select one of the following index options. This section becomes available when you unselect the
Use Computed Name and Width check box.
None Select this option for no indices on the base name (e.g., my_wire). If you unselect the Specify Full
Name check box, then the None option is disabled.
Bit Select this option to set a bit index on the signal (e.g., [0]).
Bus Select this option to set bus indices on the signal (e.g., [1:0]).
Drawing Buses
Terminal Name
The Terminal Name dialog is used to name a terminal.
Base name only (Terminal_1) A terminal must have a base name that begins with a letter.
Base name with bus indices (Terminal_1[1:0]) You may specify left and right indices, if desired.
147
Specify Name:
The Specify Name field is used to enter a base name for the signal.
Indices:
Use this section to select one of the following index options:
None Select this option for no indices on the base name (e.g., Terminal_1).
Bits Range Select this option to set bus indices on the signal (e.g., [1:0]).
Signal Name
Currently, tuners only support communication via I2C. This can be done using the EZ I2C component or the standard
I2C component.
148
The speed at which the data can be clocked into the target device.
The size of sub-addresses used for indicating what block of data to read.
Port Information
This section displays information about the currently selected port.
See Also:
149
2. Move the window from its current location to anywhere on your screen.
See Also:
Tool Windows
Framework Description
150
2. Drag the window from its current location toward another location within the framework.
Notice as you drag the window that docking guides appear at different locations.
3. When the window you are dragging reaches the position where you want to dock it, place the mouse over the
corresponding portion of the guide.
An outline of the window appears in the designated area.
4. To dock the window in the position indicated, release the mouse.
Tool windows can be docked to the framework edge or other existing edges, as well as within other windows as
tabs. The following table shows the different docking guides and their meanings:
Dock to the left edge.
Dock to the right edge.
Dock to the top edge.
Dock to the bottom edge.
Dock to the left, right, top, or bottom edge or dock within the window as a tab.
See Also:
Tool Windows
Framework Description
151
To change a window to a tabbed document (for example the Workspace Explorer), right-click on the window header
and select Tabbed Document.
Note If a window cannot be changed to a tabbed document (such as the Component Catalog), the menu item will
be disabled (grayed out).
After the menu item is selected, the window will be shown as a tabbed document along with other open documents.
See Also:
Window Types
152
Tool Windows
Document Windows
3. Move the window to the desired location and release the mouse.
See Also:
Framework Description
Tool Windows
Select Auto-Hide from the Tool Window toolbar or right-click context menu.
153
The window automatically slides to the edge of the framework. Its name is visible on a tab at the edge of the
framework.
See Also:
Framework Description
Tool Windows
154
The PSoC Creator design entry tools allow you to create a design using abstract symbols and focus on the system
rather than the low-level device details.
This section is divided into the following main categories:
Other Tools
Format Shape
Common Toolbars
155
Schematic Editor
The Schematic Editor allows to you to create and edit schematics for your designs and implementations for your
symbols.
Common Design Entry toolbars commands common to the design entry tools
This section contains various topics related to working with the Schematic Editor:
Rubber-Banding
Drawing Buses
156
On Canvas:
System Reference Provides access to the most current System Reference Guide
on disk, as well as a link to a web page for other versions and translations of the
document, if available.
On Selected Object(s):
Cut, Copy, Paste, Delete Same as commands from the Standard Toolbar.
Shape Same as shape commands from the Common Design Entry Toolbars.
Select Allows you to select a specific object when two or more objects are drawn
on top of each other.
Align When two or more objects are selected, this command allows you to align
selected shapes: left, right center, top, middle, and bottom.
Find Code Example Opens the Find Code Example dialog for the selected
component.
157
Open Component Web Page If available, opens a web page for the component,
where you can access datasheets in different languages.
Launch Tuner If the selected component has a tuner application, this command
launches the tuner.
See Also:
Standard Toolbar
158
When you add a schematic at the project level, you create a new component with a schematic as a
component item:
When you add a schematic at the component level, you are adding a new schematic item to the existing
component:
Note You may only have one top-level (generic device) schematic per component. You may also only have one
schematic for each architecture, family, and device level of your component.
159
See Also:
Schematic Editor
Workspace Explorer
Component Catalog
The Component Catalog is a Schematic Editor tool window that contains a set of components you can use in a
design. The components are organized into categories. Each category contains a tree with the components.
Note The location and order of the components in this catalog are determined by various properties for each
component. They do not necessarily reflect the actual library in which they are stored. Also, not every component is
available for every device.
The following sections are below the components:
160
Toolbar:
The Component Catalog contains a set of tools to work with the catalog, as follows:
Search Finds components that match the text entered in the search field.
Show All Versions Shows all versions of components with component numbers. If there is only one
version, no numbers are shown.
Show Latest Versions Shows only the most recent versions of components with numbers. If there is
only one version, no numbers are shown.
Find Code Example Select this option to open the Find Code Example dialog to
open a code example specifically for the selected component.
Open Component Web Page If available, this option opens a web page for the
component, where you can access datasheets in different languages.
Properties Select this option to see the basic properties of the component. The
properties include the library path of the component.
161
to clear the search results and restore the Component Catalog to view all components.
See Also:
Schematic Editor
Tool Windows
Component/Instance
162
Note This help topic is generic. Many components have customized parameter configuration user interfaces. Refer
to a component's datasheet for specific information.
Built-In Parameters:
Every component contains a tab with the following built-in parameters:
CY_MAJOR_VERSION This parameter displays the major version number of the component.
163
CY_MINOR_VERSION This parameter displays the minor version number of the component.
CY_REMOVE This parameter is used to disable the component and remove the instance from the
generated netlist during a build. The default value is false.
CY_SUPPRESS_API_GEN This parameter is be used to prevent PSoC Creator from generating APIs for
the specific instance. The default value is false.
CY_VERSION This parameter displays version and build information for PSoC Creator.
For more information about built-in parameters, refer to the Component Author Guide.
See Also:
Component Catalog
Schematic Editor
Drawing a Wire
Connecting to a Terminal
Selecting a Wire/Net
To Draw a Wire:
1. Click the Draw Wire tool.
2. Click on the design canvas and drag the mouse to the desired location.
3. Click the left mouse once to continue the wire in a different direction.
4. Double-click to end the wire.
Note The Schematic Editor draws a digital (green) wire when it is connected to digital components or not connected
to any components. To draw an analog (red) wire, you must connect it to analog components.
To Connect to a Terminal:
1. To begin drawing a wire, first create an input and output component on your schematic.
2. Click the Draw Wire tool.
3. Move your pointer toward the contact point of one of the terminals.
164
Notice as you near the contact point that your pointer changes to a black X:
4. Click and release the mouse button, and move the pointer to begin drawing the wire.
Notice that the pointer changes to a + .
As you near the next terminal contact point, your pointer again changes to a black X:
5. Click the left mouse button at the second terminal contact point to establish the connection.
The wire becomes selected with a dashed box surrounding it:
165
5. Move the pointer down to be even with the terminal, click and release the mouse button, and move the pointer
right toward the terminal.
Notice that wire obtains an additional point.
You can create as many points as you need by repeatedly clicking the mouse at different points on your
schematic.
6. Click the left mouse button at the second terminal contact point to establish the connection.
The wire becomes selected with a dashed box surrounding it.
4. Click and release the mouse button, and move the pointer to begin drawing the wire.
166
5. Click the left mouse button at the third terminal contact point to establish the connection.
The wire becomes selected with a dashed box surrounding it.
To Select a Wire/Net:
To select a segment of a wire net from one connection point to another, right-click on a wire and select
Select Wire Segment.
To select an entire wire net, right-click on a wire and select Find Wire Trace.
See Also:
Schematic Editor
Signal Name
167
Rubber-Banding
The rubber-banding feature automatically redraws your wires as you move objects on your design schematic. The
feature is enabled by default.
To Use Rubber-Banding:
Select one or more objects on your schematic and move them to another location on your screen. Notice as you
move the objects, the wires stretch with the movement. You can move items by dragging the mouse or using
[Arrow] keys.
If you stop the movement with the mouse for a moment, PSoC Creator will show a preview of how the wires will be
redrawn. Using [Arrow] will not show a preview.
168
If you release the mouse button, the component will move back to the previous location. A dialog will also display as
follows:
Try selecting fewer objects or temporarily disabling rubber-banding. You can also select a larger region of objects
and try to move them as a unit.
169
See Also:
Keyboard Shortcuts
Drawing Buses
To draw a bus, you simply connect a wire to a multiple bit connection. The wire inherits the bus width automatically.
You may also specify the width of a wire name, using the Signal Name dialog. This allows you to create a bus
without connecting it to anything. It also allows you to rip signals from the bus to connect to smaller width signals.
The following diagram shows an example of two Pins components -- one configured with individual 1-bit terminals
connected to wires and the other configured as a 4-bit bus:
170
Refer to Configure Component Parameters, Component Catalog, and Working with Shapes as necessary.
2. Use the Draw Wire tool
component terminal.
and make a multi-point connection from the 4-bit port to the farthest single-bit
As soon as the connection is made, an error will display about inconsistent widths (among other connection
errors).
171
The Signal Name dialog opens to name the wire. See Signal Name for more information.
5. De-select Use computed name and width and de-select Specify Full Name.
6. Select the Bit option and select Index [3].
7. Click OK to close the dialog.
Notice the label displays and the wire connecting to the terminal becomes thin.
8. Connect the bus to each of the other single-bit terminals. Label them [0], [1], and [2], respectively, using the
same process as described above.
Tip You can copy and paste the completed wire, and then double-click the label to edit the signal name.
Note You can connect various width signals using the same process and not all bits from an input pin need to be
used. However, every bit of an output bus must be driven.
See Also:
172
Wire Label The wire label is the displayed name of a wire. Displaying the wire label is optional, and it is
only displayed for wires with User Names.
User Name The User Name is the label you specify for a wire, using the Signal Name dialog. Not every
wire must have a User Name.
Effective Name This is the name computed by the connectivity subsystem. The name is derived from the
sources in the schematic, for example, connected input schematic terminals. Every (valid) wire has an
Effective Name and is never empty.
If you provide a name, PSoC Creator will display the label with the User Name.
If the wire does not have a User Name, PSoC Creator will not display the label.
When you edit the name, the User Name will be set. The Effective Name cannot be set.
The wire properties in the Properties dialog show the Effective Name and User Name.
Note If you copy and paste a wire with a User Name, PSoC Creator will not rename the wire, even though PSoC
Creator will rename other pasted elements, such as components and terminals. There may be some cases where
copying and pasting a wire with a User Name connected to terminals and components will cause DRC errors, and
you will have to rename the wire appropriately, or remove the label.
173
2. On the dialog, de-select Use computed name and width and select Specify Full Name.
3. Type the desired User Name in the field and click OK.
The specified User Name will be shown attached to the wire.
Note If a wire has an existing User Name, you can double-click the label to open the Signal dialog.
See Also:
Schematic Editor
Properties
174
Signal Name
To Add a Page:
Right-click on the schematic page tab at the bottom of the schematic, and select Add Schematic Page.
To Rename a Page:
1. Right-click on the schematic page tab at the bottom of the schematic, and select Rename Page.
The Rename Page dialog displays.
175
To Delete a Page:
Right-click on the schematic page tab at the bottom of the schematic, and select Delete Page.
The selected page tab is removed.
Note You cannot delete the page tab if there is only one.
2. Double-click each wire and give each wire the same name (e.g., "foo").
Notice that the Notice List window shows a sheet connector error.
Once all wires are connected, the Notice List window will clear.
176
See Also:
To Disable a Page:
Right-click on the schematic page tab at the bottom of the schematic, and select Disable Page.
The schematic page will be disabled and the word "Disabled" will appear on the schematic and the tab.
177
See Also:
Schematic Editor
Merge Dialog
Use schematic terminals when you are implementing a component with a schematic to represent the external
connectivity of the component within the chip. For more information about creating components, refer to the
Component Author Guide.
Note Schematic terminals are hidden from the Design Elements Palette when you are editing a top-level
schematic; they are only available for component implementation schematics. For more information, see Creating a
New Schematic.
178
To Rename a Terminal:
1. Double-click the label to open the Terminal Name dialog.
2. Type the appropriate Terminal Name.
3. Click OK.
Note If you copy and paste a terminal onto a schematic, PSoC Creator will rename the pasted component by
appending "_n" to the name, where n is next available number.
To Delete a Terminal:
Select the terminal and press [Delete] or click
See Also:
Schematic Editor
Terminal Name
179
Code Editor
The Code Editor, or text editor, allows you to view and edit source files in PSoC Creator. You can open multiple files
in tabbed document windows, and copy and paste among files.
Code Pane The area where code or text is displayed for editing. It provides Autocomplete statement
completion for the language in which you are developing. You can navigate back and forth to previous
cursor locations, using [Ctrl]+[-] and [Ctrl]+[Shift]+[-], respectively.
Indicator Margin A gray column on the left side of the Code Editor where indicators such as breakpoints,
bookmarks, shortcuts, and Inline Code Diagnostics are displayed. Clicking this area sets a breakpoint on
the corresponding line of code. For more information see the Debugger section.
Selection Margin A column between the Indicator Margin and the Code Pane where you can click to
select lines of code. This area shows line number. Also, changes to code are tracked here when you select
Track Changes in the Options dialog, under Text Editor > General.
Autocomplete
See Also:
Document Windows
180
Workspace Explorer
Autocomplete
Find Replace
Go To Line
Toggle Bookmark Adds/removes a bookmark in the margin for the current line.
Decrease Line Indent Outdents selected text to the previous tab stop.
181
In Edit Mode:
Insert Breakpoint Adds a new file/line breakpoint to the line that the
cursor is currently on. See Breakpoints Window.
Find All Active References Allows you to search for all references to
a symbol. See Find All References.
Paste Pastes the text currently in the clipboard into the file
182
In Debug Mode:
The context menu contains all the same commands as in edit mode, plus the following commands:
Add Watch Adds the variable, or selected text to the watch window; see
Watch Window
Set Next Instruction Jumps the program to the current line of code
See Also:
Text Editor
Variable Watchpoints
Watch Window
Autocomplete
If enabled, the autocomplete feature provides a context-aware drop-down list of all potentially relevant keywords,
types, variables, macros, and functions as you type.
Note This feature is enabled by default. You can disable it under the Text Editor Options.
183
This feature helps you to write code faster. It also provides enormous value as a documentation source. You no
longer need to constantly go back to the datasheet or source file to find the function you need. Simply start typing to
see what is available.
Note Completions are limited until the project has been built.
In addition to providing the list of what is available, the Code Editor displays a tool tip of the selected item to provide
the full signature. In the case of functions, this shows the return value, the name of the function, and the types and
names of all argument variables.
3. Open the Code Editor and begin typing; notice the drop-down list opens when it finds items that match. You can
also initiate the feature using [Ctrl] + [Space].
4. Scroll through the list to find what you want, or just keep typing until the desired item is highlighted. You can
press [Ctrl] + [Space] to toggle between show macros only, show non-macros only, or show all.
5. Once the desired item is selected in the list, press [Tab] or [Enter] to autocomplete the word. [Esc] will cancel
the autocomplete process.
The selected item is inserted and case adjusted to match the actual signature that you completed.
See Also:
Code Editor
184
Toolbar:
The Code Explorer toolbar contains the following formatting options to change how the outline is presented:
Expand All / Collapse All Separate buttons to expand or collapse all nodes in the entire tree.
Show in Groups Toggle button to group various symbols together or view them separately.
Sort Order Button and pull-down to change the ordering by name or position in the file.
Context Menu:
When you right-click on a node item in the tree, the following commands are available. See also Code Editor
Context Menu Commands.
Icons:
Each item show in the tree includes an icon. The following lists what the icons mean:
Include Directive
Macro
Struct
Typedef
Union
Enum
Enum constant
Function
Argument Variable
185
Variable
See Also:
Code Editor
See Also:
Code Editor
Find Results
Note This feature is enabled by default. You can disable it under the Text Editor Options.
186
The diagnostics displayed in the editor may not correspond to the errors/warnings generated when performing a
build. This is because the editor uses a generic build framework that does not have identical rule checkers as the
active toolchain. Because of this, none of the diagnostics are displayed in the Notice List. The errors/warnings
displayed in the Notice List are strictly limited to what is generated for the current design configuration.
Note If an error about a missing include is shown, other errors in the document may not be displayed. This occurs
because missing include files are considered fatal and limit what additional processing is performed. If a critical
include cannot be found, it could very well cause almost every line in the file to be identified as an error, which
would obscure the actual problem (missing include file).
See Also:
Code Editor
Reference Tooltips
Reference Tooltips
If enabled, the Code Editor provides reference tooltips to make the code easier to read and understand, such as
what a block of code is doing or what various arguments to a function do.
Note This feature is enabled by default. You can disable it under the Text Editor Options.
See Also:
Code Editor
187
Disabled Code
The Code Editor identifies disabled code in a grayed-out color. This helps alleviate the issue of code being difficult
to read due to congestion.
PSoC devices and components used in designs are highly configurable, plus there are several different devices
and toolchains supported by PSoC Creator. This requires the use of a significant number of #ifdef statements
throughout the firmware code, which makes reading and debugging the code difficult.
The disabled code feature significantly improves the readability and understandability of the code. It also helps
improve the debugging experience. You can clearly see that large blocks of code are disabled and understand
immediately why the debugger stepped over them.
This functionality is provided automatically with no necessary user interaction.
188
Find Replace
Find Replace
The Find Replace dialog is used to locate text within a file and optionally replace it.
This dialog varies slightly depending on how you opened it. There are separate help topics for Find in Files and
Replace in Files.
To Open the Find Replace Dialog:
Use any of the following methods:
On the Edit menu, select Find and Replace, and then select the appropriate find/replace command.
Click the displayed find/replace button icon or select one of the find/replace options from the pull-down
menu.
189
Expression Builder
Use the triangular button next to the Find what and Replace with fields when the Use check box is selected under
Find options.
Click this button to display a list of wildcards or regular expressions, depending upon the Use option selected.
Choosing any item from this list adds it to the Find what or Replace with string.
Look in
Use this pull-down menu to select Current Document or All Open Documents.
Find options
You can expand or collapse the Find Options section. The following options can be selected or cleared:
Match case When selected, the Find Results windows will only display instances of the Find what string
that are matched both by content and by case. For example, a search for "MyObject" with Match case
selected will return "MyObject" but not "myobject" or "MYOBJECT."
Match whole word When selected, the Find Results windows will only display instances of the Find what
string that are matched in complete words. For example, a search for "MyObject" will return "MyObject" but
not "CMyObject" or "MyObjectC."
Search up When selected, files are searched from the insertion point to the top of the file.
Search hidden text When selected, the search will also include concealed and collapsed text, such as
the metadata of a design-time control; a hidden region of an outlined document; or a collapsed class or
method.
Use Indicates how to interpret special characters entered in the Find what or Replace with fields. The
options include:
Wildcards Special characters such as asterisks (*) and question marks (?) represent one or more
characters. See Wildcards.
190
Regular Expressions Special notations define patterns of text to match. See Regular Expressions.
Buttons
Click the appropriate button, as follows:
Find Next Click this button to find the next instance of the Find what string within the search scope
chosen in Look in.
Bookmark All Click this button to display bookmarks at the left edge of the text editor to indicate each
line where an instance of the Find what string occurs.
Replace Click this button to replace the current instance of the Find what string with the Replace with
string, and find the next instance within the Look in scope.
Replace All Click this button to replace all instances of the Find what string with the Replace with
string, in all files within the Look in scope.
See Also:
Text Editor
Find in Files
Replace in Files
Regular Expressions
Wildcards
Find in Files
The Find in Files dialog allows you to search the code of a specified set of files for a string or expression. The
matches found and actions taken are listed in the Find Results window selected under Result options.
191
Press [Ctrl]+[Shift]+[F].
On the Edit menu, select Find and Replace, and then select Find in Files.
Match case When selected, the Find Results windows will only display instances of the Find what string
that are matched both by content and by case. For example, a search for "MyObject" with Match case
selected will return "MyObject" but not "myobject" or "MYOBJECT."
Match whole word When selected, the Find Results windows will only display instances of the Find what
string that are matched in complete words. For example, a search for "MyObject" will return "MyObject" but
not "CMyObject" or "MyObjectC."
Use Indicates how to interpret special characters entered in the Find what or Replace with fields. The
options include:
Wildcards Special characters such as asterisks (*) and question marks (?) represent one or more
characters. See Wildcards.
Regular Expressions Special notations define patterns of text to match. See Regular Expressions.
192
Look at these file types This list indicates the types of files to search through in the Look in directories.
If this field is left blank, all of the files in the Look in directories will be searched.
Select any item in the list to enter a preconfigured search string that will find files of those particular
types.
To find a type of file not available from the drop-down list, enter an asterisk (*) wildcard for the file
name, followed by a period (.) and the desired file extension. To find more than one file type, enter
multiple file extensions separated by a semicolon (;).
Result options
You can expand or collapse the Result options section. The following options can be selected or cleared:
Find Results 1 window Select this option to display the results of the current search in the Find Results
1 window. This window opens automatically to display your search results. To open this window manually,
select Find Results from the View menu and choose Find Results 1.
Find Results 2 window Select this option to display the results of the current search in the Find Results
2 window. This window opens automatically to display your search results. To open this window manually,
select Find Results from the View menu and choose Find Results 2.
Display file names Select this check box to display a list of files containing search matches rather than
displaying the search matches themselves.
Buttons
Click the appropriate button, as follows:
Find All Click this button to find all instances of the Find what string within the search scope chosen in
Look in. The results are displayed in the Results window chosen under Result options.
See Also:
Replace in Files
Find Replace
Find Results
Regular Expressions
Wildcards
193
Replace in Files
The Replace in Files dialog allows you to search the code of a specified set of files for a string or expression and
change some or all of the matches found. The matches found and actions taken are listed in the Find Results
window selected under Result Options.
Press [Ctrl]+[Shift]+[H].
On the Edit menu, point to Find and Replace, and then click Replace in Files.
194
Expression Builder
Use the triangular button next to the Find what and field when the Use check box is selected under Find options.
Click this button to display a list of wildcards or regular expressions, depending upon the Use option selected.
Choosing any item from this list adds it into the Find what string.
Look in
Use this pull-down menu to select Current Document or All Open Documents.
Click the [...] button to select a directory in which to search. You can also check the Include subfolders check box
to search sub folders of the specified search directory.
Find options
You can expand or collapse the Find Options section. The following options can be selected or cleared:
Match case When selected, the Find Results windows will only display instances of the Find what string
that are matched both by content and by case. For example, a search for "MyObject" with Match case
selected will return "MyObject" but not "myobject" or "MYOBJECT."
Match whole word When selected, the Find Results windows will only display instances of the Find what
string that are matched in complete words. For example, a search for "MyObject" will return "MyObject" but
not "CMyObject" or "MyObjectC."
Use Indicates how to interpret special characters entered in the Find what or Replace with fields. The
options include:
Wildcards Special characters such as asterisks (*) and question marks (?) represent one or more
characters. See Wildcards.
Regular Expressions Special notations define patterns of text to match. See Regular Expressions.
Look at these file types This list indicates the types of files to search through in the Look in directories.
If this field is left blank, all of the files in the Look in directories will be searched.
Select any item in the list to enter a preconfigured search string that will find files of those particular
types.
To find a type of file not available from the drop-down list, enter an asterisk (*) wildcard for the file
name, followed by a period (.) and the desired file extension. To find more than one file type, enter
multiple file extensions separated by a semicolon (;).
Result options
You can expand or collapse the Result options section. The following options can be selected or cleared:
Find Results 1 window Select this option to display the results of the current search in the Find Results
1 window. This window opens automatically to display your search results. To open this window manually,
select Find Results from the View menu and choose Find Results 1.
Find Results 2 window Select this option to display the results of the current search in the Find Results
2 window. This window opens automatically to display your search results. To open this window manually,
select Find Results from the View menu and choose Find Results 2.
Keep modified file open after Select this check box to leave open the files that were modified during the
Replace in Files operation..
195
Buttons
Click the appropriate button, as follows:
Find Next Click this button to find the next instance of the Find what string within the search scope
chosen in Look in.
Replace Click this button to replace the current instance of the Find what string with the Replace with
string, and find the next instance within the Look in scope.
Replace All Click this button to replace all instances of the Find what string with the Replace with string,
in all files within the Look in scope.
Skip File Becomes available when the Look in list includes multiple files. Click this button if you do not
want to search or modify the current file. The search will continue in the next file on the Look in list.
See Also:
Find in Files
Find Replace
Find Results
Regular Expressions
Wildcards
Regular Expressions
Regular expressions are a concise and flexible notation for finding and replacing patterns of text. A specific set of
regular expressions can be used in the Find what field of the Find Replace window.
To enable the use of regular expressions in the Find what field during find and replace operations, select Use >
Regular Expressions under Find Options.
196
The triangular button next to the Find what field displays a list of the most commonly used regular expressions.
When you choose any item from the Expression Builder, it is inserted into the Find what string.
Note There are syntax differences between the regular expressions that can be used in Find what strings and
those that are valid in .NET Framework programming. For example, in Find Replace, the braces notation {} is used
for tagged expressions. So the expression zo{1} matches all occurrences of zo followed by the tag 1, as in Alonzo1
and Gonzo1. But within the .NET Framework, the notation {} is used for quantifiers. So the expression zo{1}
matches all occurrences of z followed by exactly one o, as in "zone" but not in "zoo."
Regular Expressions for Find and Replace:
The following are the regular expressions available in the Reference List.
Expression
Syntax
Description
Any character
Zero or more
Matches zero or more occurrences of the preceding expression, making all possible
matches.
One or more
Beginning of line
End of line
Beginning of word
<
End of word
>
Line break
\n
Matches any one of the characters within the []. To specify a range of characters, list the
197
Expression
Syntax
Description
set
Or
Matches either the expression before or the one after the OR symbol (|). Mostly used
within a group. For example, (sponge|mud) bath matches "sponge bath" and "mud bath."
Escape
Matches the character that follows the backslash (\) as a literal. This allows you to find the
characters used in regular expression notation, such as { and ^. For example, \^ Searches
for the ^ character.
C/C++ Identifier
:i
Quoted string
:q
Space or Tab
:b
Integer
:z
Syntax
Description
Repeat n times
^n
Matches n occurrences of the preceding expression. For example, [0-9]^4 matches any 4digit sequence.
Grouping
()
Groups a subexpression.
\n
In a Find or Replace expression, indicates the text matched by the nth tagged expression,
where n is a number from 1 to 9.
In a Replace expression, \0 inserts the entire matched text.
Right-justified field
\(w,n)
Left-justified field
\(-w,n)
Prevent match
~(X)
Prevents a match when X appears at this point in the expression. For example, real~(ity)
matches the "real" in "realty" and "really," but not the "real" in "reality."
Alphanumeric character
:a
Alphabetic character
:c
198
Expression
Syntax
Description
Decimal digit
:d
Hexadecimal digit
:h
Rational number
:n
Alphabetic string
:w
Escape
\e
Unicode U+001B.
Bell
\g
Unicode U+0007.
Backspace
\h
Unicode U+0008.
Tab
\t
Unicode character
\x####
or
\u####
Matches a character given by Unicode value where #### is hexadecimal digits. You can
specify a character outside the Basic Multilingual Plane (that is, a surrogate) with the ISO
10646 code point or with two Unicode code points giving the values of the surrogate pair.
Syntax
Description
Uppercase letter
:Lu
Matches any one capital letter. For example, :Luhe matches "The" but not "the".
Lowercase letter
:Ll
Matches any one lower case letter. For example, :Llhe matches "the" but not "The".
:Lt
Matches characters that combine an uppercase letter with a lowercase letter, such as Nj
and Dz.
Modifier letter
:Lm
Matches letters or punctuation, such as commas, cross accents, and double prime, used
to indicate modifications to the preceding letter.
Other letter
:Lo
Decimal digit
:Nd
Letter digit
:Nl
Matches letter digits such as roman numerals and ideographic number zero.
Other digit
:No
Open punctuation
:Ps
Close punctuation
:Pe
:Pi
:Pf
199
Expression
Syntax
Description
Dash punctuation
:Pd
Connector punctuation
:Pc
Other punctuation
:Po
Space separator
:Zs
Matches blanks.
Line separator
:Zl
Paragraph separator
:Zp
Non-spacing mark
:Mn
Combining mark
:Mc
Enclosing mark
:Me
Math symbol
:Sm
Currency symbol
:Sc
Modifier symbol
:Sk
Matches modifier symbols such as circumflex accent, grave accent, and macron.
Other symbol
:So
Matches other symbols, such as the copyright sign, pilcrow sign, and the degree sign.
Other control
:Cc
Other format
:Cf
Surrogate
:Cs
Other private-use
:Co
:Cn
Additional Properties
In addition to the standard Unicode character properties, the following additional properties may be specified as
part of a character set.
Expression
Syntax
Description
Alpha
:Al
Matches any one character. For example, :Alhe matches words such as "The", "then", and
"reached".
Numeric
:Nu
Punctuation
:Pu
White space
:Wh
Matches all types of white space, including publishing and ideographic spaces.
200
Expression
Syntax
Description
Bidi
:Bi
Hangul
:Ha
Hiragana
:Hi
Katakana
:Ka
Ideographic/Han/Kanji
:Id
See Also:
Wildcards
Find Replace
Find in Files
Replace in Files
Wildcards
The following expressions can replace characters or digits in the Find what field of the Find and Replace window.
To enable the use of regular expressions in the Find what field during find and replace operations, select Use >
Wildcards under Find Options.
The triangular button next to the Find what field displays a list of the available wildcards. When you choose any
item from the Reference List, it is inserted into the Find what string.
201
Syntax Description
Any single
character
Matches any single digit. For example, 7# matches numbers that include 7 followed by another
number, such as 71, but not 17.
Characters not
in set
[! ]
Escape
Matches the character that follows the backslash (\) as a literal. This allows you to find the
characters used in wildcard notation, such as * and #.
One or more
characters
Matches any one or more characters. For example, new* matches any text that includes "new",
such as newfile.txt.
Set of
characters
[]
See Also:
Regular Expressions
Find Replace
Find in Files
Replace in Files
Find Results
The Find Results window displays matches found when using the Find in Files and Replace in Files dialogs.
There are two Find Results windows. The Result options allow you to choose the Find Results window where any
matches found will be listed. The selected Find Results window opens automatically whenever matches are found.
To Display Find Results Window Manually:
Select Find Results from the View menu and choose Find Results 1 or Find Results 2.
202
To Select to a Match:
Double-click any line in the results list. The source file is displayed in the Text Editor with the insertion point placed
where the matched text begins. A symbol appears in the indicator margin of the Editor to mark the line that includes
the match, and the status bar displays its full text.
See Also:
Text Editor
Find in Files
Replace in Files.
Search Result
The Search Result dialog displays informational messages for search results as part of Find.
This dialog will only display when you select the option under Text Editor Options.
You can disable this dialog by de-selecting the Always show this message check box.
The messages you may see with this dialog include:
# occurrence(s) replaced.
See Also:
Text Editor
Find Replace
203
Go To Line
The Go To Line dialog is used to go to a specific line of code.
To Go to a Specific Line:
Type the line number and click OK.
The cursor goes to the specified line number.
See Also:
Text Editor
204
Design-Wide Resources
The PSoC Creator Design-Wide Resources (DWR) system provides a single location to manage all the resources
in your design. Such resources include pins, clocks, interrupts, DMA, etc. Each new design project provides a
default design-wide resources file (.cydwr) file with the same name as the project.
Note PSoC Creator collects DWR information dynamically. Depending on the complexity of the design, it may take
a few seconds to update the DWR information.
Only design projects can have a .cydwr file, and there can be only one file per design project. All modifications to
the DWR information are stored in this file. This design-level information is stored in a way that makes it portable
between devices.
Note During the process of selecting a different device, if any errors will exist if the selection were to continue, you
will be prompted before the device selection has actually changed. At this point, you can cancel the device change
or continue and the appropriate errors will be generated.
205
Add Existing Item Adds an existing .cydwr file to the design project. The file will be copied from the
selected location into the design projects folder. It will also be renamed to match the project name.
Add New Item Adds a new .cydwr file to the design project. If one already exists, a message will display
to ask if you want to overwrite the file.
See Also:
Pin Editor
Clock Editor
Interrupt Editor
DMA Editor
System Editor
Directives Editor
EEPROM Editor
206
Pin Editor
The Pin Editor consists of an interactive image of the selected device, as well as a table of available signals in your
design. This editor allows you to manually assign and/or lock pins in your device before PSoC Creator executes the
place and route operation of the build process. If you don't assign pins, or if you manually unassign them, PSoC
Creator will automatically assign them during the next build. Assigned and locked pins will stay in the same location
for each subsequent build. Unlocked pins could potentially be moved on subsequent builds, depending on resource
usage.
Note PSoC Creator collects DWR information dynamically. Depending on the complexity of the design, it may take
a few seconds to update the DWR information.
Device Image:
The selected device image shows the various pins and ports. Each pin contains its corresponding pin number. Each
pins functionality (i.e., Vcc, n/c, etc.) or port name displays next to or inside the pin. Hovering the mouse over a
particular pin will show all of the capabilities of that pin.
207
The coloring of the pins, as well as the port/pin numbers and labels are the same for both views. The process for
assigning and locking pins is also the same for both views. However, for the perimeter view, any assigned signal
name displays adjacent to the pin, but it doesn't for the ball grid array view.
Pin Coloring and Style
The style of the pin can help identify certain characteristics of the pin, as described in the following tables.
Static Image
Pin Style
Description
Text Color Black with white text indicates this is a no-connect pin.
Text Color Dark green with white text indicates this is a power pin.
Text Color
Orange with white text indicates this is a reserved pin. The reason the pin is reserved (that is, used for debugging,
used for external crystal, etc.) will be displayed next to the pin in orange.
Text Color White with black text and a light gray border indicates an unassigned port pin.
Text Color Light blue with black text and a black border indicates an assigned, unlocked, port pin.
Text Color Dark blue with black text and a black border indicates an assigned, locked, port pin.
Red with black or white text means this is an invalid pin assignment. Black text means that the current assignment
Text Color
is invalid, but it may be possible to assign other pins to this port; white text means the pin is either no-connect or
(or Text
power. This state could occur when switching the selected device after making some pin assignments. An error
Color)
will be added to the Notice List for each invalid assignment.
Pins that have signals assigned to them are drawn with a black border.
208
Dragging a Pin
Pin Style
Description
Text Color
White with black text indicates that pin guidance information has not yet been calculated. This pin may or
may not be a valid assignment once it has been calculated.
Text Color
Text Color
Yellow with black text indicates this is a valid assignment, but there is a consequence if you select it (for
example, resource usage).
Gray with black or white text means this is a not a legal pin assignment due to silicon or design constraint.
Pins that have signals assigned to them are drawn with a black border.
Signal Table:
The signal table contains all the signals in a table format with the following columns:
Column
Description
(Status)
If assigned, this contains an indicator for the assignment's validity, as shown in the table under Dragging a
Pin. If an illegal assignment has been made (and locked), there will be an error icon for that signal.
Name
The name of the signal as defined for the pin. If the pin has an alias, it is shown in parentheses.
Port
The device's pin shown in port form. This field can also be used to make a pin assignment by selecting the
desired port[pin] from the drop-down list. An asterisk (*) indicates that a particular assignment is preferred. An
empty cell indicates no assignment has been made.
Pin
The device's pin number for the device to which this signal is assigned. This field can also be used to make a
pin assignment by selecting the desired pin number from the drop-down list. An asterisk (*) indicates that a
particular assignment is preferred. An empty cell indicates no assignment has been made.
Lock
Specifies whether or not the signals assignment is locked (i.e., cannot be moved by a build). This cell is only
editable for assigned pins.
Assigned and Locked A signal that has been assigned and locked to a particular pin is displayed in the
table as a dark blue row.
Assigned and Unlocked A signal that has been assigned but not locked is displayed in the table as a light
blue row.
Unassigned Signals that have not been assigned are white. This will be auto-assigned by PSoC Creator
on the next build.
Note Double-clicking a row in the table will display the design containing the associated Pins component, and open
the Configure dialog for it.
To Assign a Pin:
Assign a pin using either of the following methods:
Click on a signal in the Signal Table or on a pin already assigned elsewhere on the device and drag it to the
desired location on the device image.
209
Note While dragging a pin, a tooltip will indicate whether or not the current location is valid in addition to the
coloring noted above.
Select an assignment from the Pin column pull-down menu in the Signal Table. You can also type the pin
assignment in the field. While typing, legal assignments that are still possible based on what has currently
been typed will display. Values are entered in the form of:
P#[#] Specifies a location where the first # is the port number and the second # is the offset within the
port.
P#[#:#] Specifies a range of locations where the first # is the port number, the second number is the
offset within the port where the MSB of the signal should be placed, and the last # is the offset within
the port where the LSB of the signal should be placed.
A range can also be specified as any combination of the above two formats separated by commas.
To Unassign a Pin:
Unassign a pin using either of the following methods:
Right-click on an assigned pin on the device image and select Auto-assign <signal> during build.
Select the <Auto-assign during build> row from the Port or Pin column pull-down menu in the Signal
Table.
To Lock a Pin:
Lock a pin using either of the following methods:
If a pin is assigned but not locked, right-click on the pin in the device image and select Lock <signal> or
select the Lock check box in the table for the desired signal.
On the right-click menu, the Lock All option will lock all assigned pins.
To Unlock a Pin:
Right click on the pin in the device image and select Unlock <signal> or de-select the Lock check box in the table
for the desired signal.
On the right-click menu, the Unlock All option will unlock all locked pins.
Use the mouse wheel to scroll up and down; press [Shift] + mouse wheel to scroll left and right.
210
See Also:
Design-Wide Resources
Design shows the results of a build in design mode (this is default mode of the tool)
Debug provides a view into the current state of the device while debugging (see Analog Device Editor
Debugging)
The Analog Device Editor contains three major sections: analog interconnect diagram, design information table, and
properties.
211
If you hover the cursor over used resources, tooltips display relevant information. This same information will be
displayed in the Properties area when the resource is selected.
Wires
Wires can be locked (cannot move between builds). This includes resources locked by MARS components and
control files (even though the editor can over-ride those placements). Locked wires are solid lines; unlocked wires
are dashed lines.
Wires locked in the Analog Device Editor can also be unlocked. Wires locked by other sources must be unlocked by
those sources.
Switches
Switches are displayed as circles. A solid color means the switch is closed. White means the switch is open. Gray
means the state is not known.
In design mode, the check box selections in Properties for muxes control the display of run-time
changeable switches.
In debug mode, the state is based on the value of the actual register and can be edited from the GUI. If the
mux that owns the switch is hardware-controlled it is displayed in gray when debugging.
Note: DMA access to a software-controlled AMux will potentially cause the debugger to show erroneous states.
Switch breakpoints are shown by a dotted/dashed line around the switch. If the breakpoint is enabled the line is red;
if disabled, it is amber.
Switches are grouped within the device and this shall be shown by a dotted box around the circles. These groups
allow either at-most-one active terminal or any number of active terminals. The latter shall be distinguished in the
diagram with a gray fill in the surrounding box.
Pins and Components
Locked pins and components include a small pad-lock icon.
Digital pins used in the design are shown with a black background, white text, and teal tips. However, no routing
information is shown for digital pins.
212
Lock is a check box coercing the item to use the associated resource. It is possible to lock or unlock all
listed items in the Lock column using the pull-down menu, as follows:
Color allows the user to choose a display color in the Interconnect panel, from a pull-down, for a routing
resource. Note that it is common for resources to be displayed multiple times (for example, when a net
connects a pin to an analog resource in the top schematic), and so changing the color in one place requires
a (silent) change everywhere else.
Type is the component name (e.g. PGA_v1_70) or resource type (i.e. MUX or NET).
The entries in the table are listed alphabetical order by instance name and only that column may be used to change
the order of entries.
Each entry (components, pins and muxes) is expandable/collapsible to show lower levels of the component
hierarchy and the resources to which they are connected.
There are buttons at the top of the table to toggle on and off viewing selected items: Components, Muxes, and
Pins.
Properties:
The Properties area displays information based on the selection in the table or diagram. If you select multiple
items, the area will not show any information. The area displays differently if you select pins/components versus
muxes.
Component/Pins View
For components and pins, this area displays various read-only properties depending on what is selected. The
properties that can be displayed include the following:
213
Component name
Resource name
Lock status
Use the buttons at the top of the panel to order the properties alphabetically or by category.
Mux View
For muxes, the Properties area displays an editable image of the selected mux to choose the active channels in
the interconnect diagram and Ohm Meter. If the target is a differential mux then making a channel active always
applies to both connections.
The diagram includes check boxes to choose the active channels(s) of the mux. It also shows the net names
associated with each channel and the common terminal. The coloring for each net will be the same as that chosen
in the table. When you select and de-select a channel, the change is reflected in the interconnect diagram and the
Ohm meter.
Use the Check All and Uncheck All buttons at the top of the panel to select all or de-select all channels,
respectively.
Note If the AtMostOneActive parameter is set to "true," then you can only select one channel and the Check All
button will be disabled.
See Also:
Ohm Meter
Manual Placement
Route Editing
214
Start Ohm meter Opens the Ohm Meter to the selected signal.
Copy Copies the interconnect diagram to a bitmap file that you can paste
in an appropriate editor.
On Pin:
Start Ohm meter Opens the Ohm Meter to the selected pin.
Go to in pin editor Opens the Pin Editor and selects the same pin.
Copy Copies the interconnect diagram to a bitmap file that you can paste in
an appropriate editor.
215
On Wire:
Lock route Locks/unlocks the selected route. Locked routes are shown as solid
lines; unlocked routes are shown as dashed lines.
Re-route Switches the Analog Device Editor to Manual Routing mode. See Route
Editing.
Remove obsolete "Entire Net" route data Removes nets that were locked as part
of an entire net when you change the schematic.
Copy Copies the interconnect diagram to a bitmap file that you can paste in an
appropriate editor.
Add/Edit breakpoint Used to add or edit breakpoints. See Analog Device Editor
Debugging.
Lock route Locks/unlocks the selected route. Locked routes are shown as solid
lines; unlocked routes are shown as dashed lines.
Re-route Switches the Analog Device Editor to Manual Routing mode. See Route
Editing.
Copy Copies the interconnect diagram to a bitmap file that you can paste in an
appropriate editor.
On Switch:
See Also:
Schematic Editor
Pin Editor
Ohm Meter
Manual Placement
Route Editing
216
Ohm Meter
The Ohm Meter displays the resistance between pairs of points (pins and/or components but not wires or switches)
in the Analog Device Editor interconnect view. The dialog allows you to change probe points in the diagram and see
the parasitics. The dialog also contains SPICE route data.
Probes are displayed in the interconnect diagram with an attached pin. The first-placed pin is pink and, when it is
placed, all legal destination probe points are automatically marked with blue probes. Select a blue pin to see the
resistance for that route. Re-selecting the start-point for probing clears previous probes, clears the dialog results,
and refreshes the legal destination (blue) probes.
To Open the Ohm Meter:
Right-click on a pin or component in the diagram or the table and select Start Ohm Meter >. Then point to the
access point from which to start.
217
Parasitic Tab:
This tab displays the resistance between the two points when you click a blue pin in the diagram. This includes the
total resistance and the resistance of every switch in the route.
The Access Point pull-down menu allows you to change the second selected pin as an alternative to clicking on
different blue pins.
SPICE Tab:
This tab shows a SPICE netlist for the route. This is read-only text.
Use the Copy to Clipboard button to copy the data to a simulator of your choice.
See Also:
218
Manual Placement
The Analog Device Editor manual placement feature allows you to specify where analog components should be
placed when a build is performed. You cannot use this feature to place pins. Instead you must use the Pin Editor.
To Manually Place a Component:
Right-click on a component and select Relocate >. Then point to the desired location. The menu will only allow
valid moves. If no move is available, the menu item will be disabled.
You may move a component to a currently occupied location. The existing component will be placed in a new
location by the subsequent build.
Signal Routing
After selecting the new location, the routed signals will be redrawn in a temporary state, also known as a rat's nest.
This is only shown if the route is selected.
219
See Also:
Pin Editor
Context Menus
Route Editing
Route Editing
Route editing consists of ripping up routes and re-routing signals, as well as manually selecting switches to route
signals. Context Menus are included on various elements to facilitate route editing.
Rip-Up
Nets When a net is ripped up, the wires and switches used to route the net are marked as unused
Net-Ties/Net-Joins When a Net-Tie or Net-Join is selected, you can rip up the entire net or any of the
sub-nets collected to form the entire net. Ripping up any of the sub-nets is the same as ripping up a net.
Ripping up the entire net causes all of the individual sub-nets to be ripped up, as well as the additional
resources used to implement the net-tie and net-join components.
Muxes Rip-up of a mux is applied to the entire mux. When a mux is ripped up, all of the wires and
switches used to route the mux are marked as unused.
Re-Route
When you select the Re-Route command, the Analog Device Editor enters manual route editing mode. In this
mode, you can manually route signals by clicking on switches to open or close them. Switches available for routing
are shown highlighted in the default color; switches not available are grey. When you select a switch to route a
signal, addition switches become available to select.
Open switches are shown as hollow circles; closed switches are shown as solid circles.
While editing, the Status Bar shows the operation in progress.
Two buttons are available: Commit Edit or Cancel Edit. "Commit" saves and locks the routing; "Cancel" reverts
the Analog Device Editor the state prior to editing.
220
Mux Routes
Editing a mux arm is similar to editing a signal net with the following differences:
When you start editing a mux, all of the resources used by the mux (for all arms) are temporarily marked as
unused to allow the user maximum flexibility in reusing resources shared with other arms.
The endpoints to be connected are nets rather than pins (like muxes).
There are separate rip-up and edit operations since there is no resource sharing.
See Also:
Route Editing
221
The Analog Device Editor will automatically go back to the design view when the debug session has stopped.
Open/Close Switches:
In debug view, you can use the context menu to open/close any switch that is not DSI controlled. Switches that are
DSI controlled will be displayed with a grey center to indicate that they are used; however, PSoC Creator does not
know the current state of the switch.
Note Because the state of the Analog Device Editor can be changed without the CPU running, it may be out of
date. Right-click on the interconnect diagram and select Refresh to update all visible debug windows.
Switch Breakpoints:
Breakpoints are implemented with the on-chip address breakpoint(s). The breakpoint applies to the whole register,
which controls a number of switches and unrelated elements. The debugger determines whether the break
occurred as a result of the switch-of-interest and ignores (continues execution) other changes.
To set a breakpoint, right-click on a switch. You can set the following conditions: on changed, on opened, on closed.
Memory Watchpoint
222
223
Clock Editor
The Clock Editor is a design-wide resources tool to create and edit clocks. This tool allows you to view all clocks,
add and delete design-wide clocks, as well as edit design-wide and system clocks.
Note PSoC Creator collects DWR information dynamically. Depending on the complexity of the design, it may take
a few seconds to update the DWR information.
Add Design-Wide Clock This command allows you to add a design-wide clock to your design. See
Add/Edit Design-Wide Clock.
Delete Design-Wide Clock This command allows you to delete any design-wide clocks you may have
added.
Edit Clock This allows you to edit design-wide clocks in your design. See Add/Edit Design-Wide Clock.
224
Clock Table:
The Clock Editor displays all the clocks using a table. By default, clocks are sorted by Type. You can sort by any
column by clicking the column header and switch between ascending and descending order
Note A secondary sort is always performed on the Nominal Frequency column.
Column
Description
Type
System internal and external clocks sources that can be used in your design
Design-wide clocks declared in the clock editor that are sharable across the entire design
Local clocks added to schematics via components
Boost low voltage analog boost clock shown when the Variable Vdda option is selected in the
System Editor.
Name
Domain
Desired
Frequency
The desired frequency for the clock. If not used ? MHz will be displayed.
Nominal
Frequency
The nominal frequency for the clock. This is determined by the system solving the clocks. If not solvable ?
MHz will be displayed.
Accuracy
Tolerance
Displays the tolerance range entered for the clock as a percent. If no tolerance has been specified - will be
displayed.
Note Tolerance can only be specified for Auto clocks.
Divider
Displays the divider used for the clock. This may have been specified elsewhere or calculated when the
clocks were solved.
Start on Reset
If checked, this option will cause the _Start() function to be called for the clock pre-main (checked by
default). You can set this option for all New local clocks and all design-wide clocks.
There is a pull-down menu next to the column header, which allows you to check or uncheck all the
applicable boxes at once.
System clocks show this box as read-only. For them the value is determined by their enabled state in the
Configure System Clocks dialog. Existing clocks also have this field as read-only. It displays the Start on
Reset value for its source clock in this case.
Source Clock
The clock, if any, used to create the clock. Clocks whose input clock was not explicitly specified (i.e.,
<Auto> was selected) will be displayed as "Auto: Clock the solver picked."
225
System clocks internal to the device display their accuracy information. System clocks that come from outside the
device (e.g., XTAL, XTAL 32kHz, and Dig Sig) will allow you to enter accuracy statistics (+X%, -Y% or +X ppm, -Y
ppm). The default accuracy values will be +0%, -0%.
The PSoC Creator clock system will take the accuracy of the reference clock, the actual achieved frequency, and
compare that against the tolerance and requested frequency. If the achieved frequency/accuracy falls outside the
requested bounds, a DRC error will be generated.
See Also:
Design-Wide Resources
Clock Name Allows you to type a name for the local clock.
226
Summary Displays information about the clock being create and the source clock being used (if Source
is not <Auto>).
Clock Type: New / Source: <Auto> Enter the Frequency and optionally a Tolerance range. PSoC
Creator figures how to implement it.
Clock Type: New / Source: Specified Select a particular source clock from the pull down menu to divide
down. Then enter a desired frequency or explicit divider.
If you specify a Desired Frequency, PSoC Creator calculates the divider automatically.
Clock Type: Existing / Source: Specified Create an alias for the given source clock.
You can view the clock characteristics for various clocks using the design-wide resources Clock Editor.
See Also:
Design-Wide Resources
Clock Editor
Component Catalog
227
This dialog allows you to specify different characteristics about the system clocks.
A check mark indicates that the clock is enabled. When a clock is disabled it turns gray and its contents are
replaced by text explaining how to enable it. Some clocks cannot be disabled.
The lines show where clock signals can go. If a line is gray, then the current clock configuration does not
use that path.
The error icon indicates that the clock is configured incorrectly. Hovering over the icon will display a
message indicating exactly what is wrong.
Note This dialog will contain different clocks and options depending on the device selected for the design. For
some devices, this dialog will be split into different tabs for high-frequency and low-frequency clocks.
For specific details about the configuration options for system clocks, refer to the appropriate Technical Reference
Manual.
228
Digital Signal:
The Digital Signal can be configured to use any routed digital signal in your design. When using the output from a
digital pin as the Digital Signal, you will need to ensure that the pin is configured with the input as unsynchronized.
This is done via the Input tab in the Pins component Configure dialog by deselecting the "Input Synchronized"
option. For more information, refer to the Pins component datasheet.
To Open this Dialog:
In the Design-Wide Resources Clock Editor:
Design-Wide Resources
Clock Editor
229
XTAL Configuration
The XTAL Configuration dialog is used to configure characteristics for the external crystal.
230
Startup timeout (ms) When using the default timeout, this field is read only and displays the default
timeout value. If you deselect the Use default timeout check box, this field becomes enabled to specify a
timeout based on specific XTAL requirements.
Automatic This option is selected by default. Reference levels are calculated from the given XTAL
frequency. The XTAL clock initialization uses these values to set the CFG1 register.
Manual This option is used by advanced users. This enables the Feedback and Watchdog fields to fine
tune the reference level configuration. The XTAL clock initialization uses these values in the CFG1 register.
Enable automatic gain control This check box enables automatic gain control (AGC). AGC
measures oscillation amplitude and compares it to a reference value. If it is too high or low, an internal
adjustment is made in the XTAL to increase or decrease amplitude. This reduces drive level and helps
to meet crystal requirements. It is not needed in all cases. This check box is not selected by default.
When it is selected, the Feedback field becomes visible under Watchdog.
Watchdog The watchdog (XERR/error detection) is a circuit that measures oscillation amplitude and
compares it to a reference value. If it is too low, an error signal that goes to a status register bit is
asserted. This bit can be polled in software, and also controls a mux that implements "fault recovery."
The watchdog is used at XTAL startup to determine when oscillations have reached an acceptable
amplitude, and the XTAL can be used as a clock source throughout the part. The watchdog reference
level is the voltage to which the oscillation amplitude is compared when determining if oscillation is
acceptable.
Feedback The feedback reference level is the voltage of which the oscillation amplitude is compared.
Amplitude adjustment:
Automatic This option is selected by default. The Amplifier Gain (AMPIADJ) field is calculated from the
given XTAL frequency. This option allows you to specify Shunt capacitance and Load capacitance of the
crystal. These will be used with the XTAL frequency to calculate the value of AMPIADJ, which the XTAL
clock initialization uses to set the CFG0 register.
Manual This option is used by advanced users. This enables the Amplifier Gain (AMPIADJ) field to
manually enter a specific value for AMPIADJ. The XTAL clock initialization uses this value to set the CFG0
register.
See Also:
Clock Editor
231
Workspace Explorer
Generated Files
Note Design-wide clocks use resources on the device and have APIs generated for them with a "Cy" prefix.
To Open the Dialog:
You open this dialog from the Clock Editor.
Click Add Design-Wide Clock to open the dialog to create a new design-wide clock.
232
Selecting "<Auto>" allows you to specify the Desired Frequency and optionally the Tolerance. The source
and divider are then calculated by PSoC Creator.
Selecting "<Select Signal...>" opens the Select Source Clock dialog to select from a list of available signals.
Selecting "<Select Pin...>" (PSoC 4/PRoC BLE devices only) opens the Select Source Clock (from Pin)
dialog to select from a list of available pins.
Selecting any other specific base clock allows you to specify the Desired Frequency or Divider, as
follows:
If you specify a Desired Frequency, PSoC Creator calculates the divider automatically.
You can view the clock characteristics for various clocks using the design-wide resources Clock Editor.
Note For PSoC 4/PRoC BLE devices, there is a Use fractional divider check box. If you specify the
Frequency option, selecting the Use fractional divider check box means that PSoC Creator will calculate the
fraction. If you specify the Divider option, this check box provides a manual option for you to specify the
fraction.
4. On the Advanced tab, specify whether or not to synchronize this clock with the MASTER_CLK (synchronize,
by default). This tab is not applicable to PSoC 4/PRoC BLE devices.
See Also:
Design-Wide Resources
Clock Editor
233
To be used as a clock input, a signal must meet all of the following requirements:
If the signal is from a terminal, the terminal must be at the Top Schematic level.
If not at the Top Schematic level, then the signal must not be connected to a schematic terminal.
From the Configure System Clocks dialog, click the ellipsis button [...] in the Digital Signal clock section.
From the Add/Edit Design-Wide Clock dialog, under Source, choose the "<Select Signal...>" option in the
pull down menu. (For PSoC 4/PRoC BLE devices, you must select Clock Type "Existing.")
Signal Frequency:
This field is used to specify the frequency of the selected signal.
Accuracy:
These fields are used to specify the accuracy of the selected signal. The value is always displayed as a percent,
but can be entered as a % or ppm.
Toolbar:
The toolbar provides expand and collapse commands to show or hide the entire signal tree.
Show Un-named Signals:
Select this check box to show all the signals in your design; de-select to show only named signals.
234
See Also:
Design-Wide Resources
Clock Editor
235
Toolbar:
The toolbar provides expand and collapse commands to show or hide the entire signal tree.
Table Fields:
The signal table contains all the signals in a table format with the following columns:
Column
Description
Name
Port
The device's pin shown in port form. This also indicates if the pins is unlocked.
Pin
The device's pin number for the device to which this signal is assigned.
Alias
Design-Wide Resources
Clock Editor
Interrupt Editor
The Interrupt Editor allows you to change the priority of interrupt service routines (ISRs) in your design.
Note PSoC Creator collects DWR information dynamically. Depending on the complexity of the design, it may take
a few seconds to update the DWR information.
236
This editor is part of the design wide resources file, which includes other resources, such as the Clock Editor.
The Interrupt Editor contains a table with the following columns:
Instance Name The instance name is also used as the ISR name. This property is read-only in the table.
Priority This is used to select the interrupt priority using the pull-down menu. There is a default value
assigned for this property, denoted as Default <#>, so that it can be distinguished from explicitly selecting
the default number. Unselected default values will be updated as the device changes; values explicitly
chosen will not.
If changing devices results in an illegal value, then an error icon will be displayed in the cell. An error will
also be placed in the Notice List window.
Interrupt Number This information (interrupt number) will only be available after place-and-route. This
property is read-only in the table.
To Change Priority:
Select a value for the appropriate interrupt from the pull down menu.
See Also:
Design-Wide Resources
237
DMA Editor
The DMA Editor displays all the direct memory access (DMA) components that have been directly placed in the
design, as well as all the DMA components inside placed components.
Note PSoC Creator collects DWR information dynamically. Depending on the complexity of the design, it may take
a few seconds to update the DWR information.
The DMA Editor is only available on devices that support DMA.
The DMA Editor consists of a table where each row represents a DMA. The table contains the following columns:
Name The hierarchical name of the instance that the DMA came from. This property is read-only in the
table.
Channel Number This information will only be available after place-and-route. This property is read-only
in the table.
Note If no DMA resources are used in a design, the DMA Editor will display a message to that effect.
To Change Priority:
For PSoC 3 and PSoC 5LP, click the down arrow on the menu, and select the appropriate Priority value from the
pull-down menu.
For PSoC 4, the priority must be set in the DMA component itself. The DWR simply shows the value specified in the
component.
238
To Select/Edit a DMA:
Double-click an entry in the table; PSoC Creator opens the schematic file and highlights the associated DMA
instance, plus it opens the Configure DMA dialog, where you can edit various parameters.
Refer to the appropriate device DMA Component datasheet for more information.
See Also:
Design-Wide Resources
DMA Wizard
DMA Wizard
The DMA Wizard aids in quick and accurate development of applications that use DMA. The wizard guides you
through the process of defining transaction descriptors. It also generates the necessary C code that you can copy
and paste into your application. The DMA Wizard only works in the context of a design project that contains at least
one DMA component. If there is no DMA component in your design, the wizard displays a message to that effect.
The DMA Wizard contains the following steps:
Global Settings
Transaction Descriptors
Generated Code
239
Getting Started:
The Getting Started step allows you to select the project and DMA instance for you to configure.
Project This lists all the design projects in the currently open workspace that contain DMA components.
By default the Active project is selected if it fits the previous requirements.
After selecting the appropriate project and instance, click Next > to proceed to the next step.
See Also:
DMA Editor
240
Source This can be SRAM, Flash, or EEPROM. It can also be a component that was created with the
ability to be used with the DMA Wizard. If the selected component has more than one possible source, a
second drop-down will appear allowing for a more specific selection.
Base Addr Depending on which PSoC device is used, the contents of the Base Address may or may not
be automatically provided. When not filled in by default, a C expression needs to be provided. If not added,
an error icon will appear. This will not prevent you from continuing with the wizard. It will only generate code
that will not compile.
Destination:
Destination This can be SRAM or a component that was created with the ability to be used with the DMA
Wizard. If the selected component has more than one possible destination, a second drop-down will appear
allowing for a more specific selection.
Base Addr Depending on which PSoC device is used, the contents of the Base Address may or may not
be automatically provided. When not filled in by default, a C expression needs to be provided. If not added
an error icon will appear. This will not prevent you from continuing with the wizard. It will only generate code
that will not compile.
Set Manually:
The following fields are defined automatically. To set these manually, select the Set Manually check box.
Bytes per Burst Allows you to set the number of bytes to transfer in a single burst. This value is
calculated to be the maximum value that is supported by both the source and the destination. To the right of
this field the range of legal values for the current source and destination is displayed. If you enter an invalid
value or if there is no legal value, an error icon will appear next to the field. This will not prevent you from
continuing with the wizard. It will only generate code that will not compile.
241
Each Burst Requires a Request Allows you to set whether or not each burst requires a request before it
is sent. The value is automatically calculated based on the selected source and destination.
Transaction Descriptors:
Number of TDs Specifies the number of transaction descriptors to create (between 1 and 128).
Single Chain or Loop This determines what the Next TD will be for the last TD entered. If single chain
the Next TD will be END. If Loop it will loop back to the first TD.
After configuring the appropriate settings, click Next > to proceed to the next step.
See Also:
DMA Wizard
DMA Editor
Description
TD#
Displays the logical Transaction Descriptor number. It is used in conjunction with Next TD.
Endian
Enables 2- or 4-byte endian byte swapping. When set to 2 or 4, the Bytes per Burst setting must be set as a
multiple of the endian selection. An error will be added to the cell if this is not the case. This will not prevent you
from continuing with the wizard. It will only generate code that will not compile.
Enable trq
Enable nrq
242
Field
Description
Length
The length in bytes for this TD (0 to 4095). This field is a C expression that is evaluated at run time. If endian
swapping is enabled, the length must be a multiple of endian swap size. An error will be added to the cell if this
is not the case. This will not prevent you from continuing with the wizard. It will only generate code that will not
compile.
Source
The source address for the DMA transfer. This field is a C expression that is evaluated at run time. If a
component is selected as the source this field may be a drop-down list of addresses. In any case the cell is
editable. If empty an error icon will be added to the cell. This will not prevent you from continuing with the wizard.
It will only generate code that will not compile.
Inc (Source) Enables incrementing of the Source address as the DMA progresses through the specified number of bytes.
Destination
The destination address for the DMA transfer. This field is a C expression that is evaluated at run time. If a
component is selected as the source this field may be a drop-down list of addresses. In any case the cell is
editable. If empty an error icon will be added to the cell. This will not prevent you from continuing with the wizard.
It will only generate code that will not compile.
Enables incrementing of the Destination address as the DMA progresses through the specified number of bytes.
Inc
(Destination)
Auto Next
Specifies whether or not to automatically execute the next TD once this TD completes without requiring another
request.
Next TD
Specifies the next logical TD in the chain of TDs. Set to END if this TD chain is complete with this TD.
The Reset to Defaults button will reset all the values in the table to be their default, calculated values.
After configuring the appropriate settings, click Next > to proceed to the next step.
See Also:
DMA Wizard
DMA Editor
243
The Copy to Clipboard button adds the code to the clipboard. You can also use standard keyboard shortcuts and
the right-click menu, as needed.
Note If any errors were ignored in the previous steps, an error icon will display reminding you that the code will not
work.
See Also:
DMA Wizard
DMA Editor
244
System Editor
The System Editor is used to edit various system properties. It contains a table with different categories of
properties, such as Configuration, Programming/Debugging, and Operating Conditions. The available categories
change based on your design.
Note PSoC Creator collects DWR information dynamically. Depending on the complexity of the design, it may take
a few seconds to update the DWR information.
To Edit a Property:
Click in the Value column for a property to edit.
Different properties have different methods of editing. Some properties have a check box to toggle on and off, some
have a pull down menu to choose an option, and some have a text field in which to enter a value.
If you enter an invalid value, an error will display to indicate the invalid value and how you might correct the
problem.
Property Descriptions:
Under each category, there are one or more rows of properties you can edit. When you highlight a particular
property, its description displays in the text box at the bottom of the editor. The table contains the following columns:
Option This column displays the name of each row/level in the hierarchy.
Value This column displays the current value of a setting and allows you to change it when applicable.
245
Description
Note
Configuration
Device Configuration
Mode
Enable Error Correcting If true, the ECC will be used to detect and correct errors in the
Code (ECC)
FLASH memory. Selecting this option hides the "Store Configuration
Data in ECC Memory" option.
WARNING Exercise caution changing this setting during
development. Excessive re-programming of this setting may cause
unexpected results.
Store Configuration
Data in ECC Memory
Instruction Cache
Enabled
If true, the device will write data coming from the FLASH to the
instruction cache SRAM.
If true, the fast IMO will be used. This configuration balances the
Applies to PSoC 3 and PSoC
5LP devices only.
need for rapid boot and configuration against peak power
consumption. If true, the IMO will run at the faster speed of 48 MHz
instead of 12 MHz during device startup.
This configuration balances the need for rapid boot and configuration
against peak power consumption. If true, the IMO will run at the
faster speed of 48 MHz instead of 12 MHz during device startup and
between CyPmSaveClocks() and CyPmRestoreClocks() functions
calls. See System Reference Guide for more information about these
functions.
WARNING Exercise caution changing this setting during
development. Excessive re-programming of this setting may cause
unexpected results.
Read Accelerator
Enabled
Unused Bonded IO
This option controls how unused bonded pins will be used for
internal analog place and route.
Allow but warn option will allow the analog router to make use
of unused pin switches in the current design, but will give out
warnings on the pins whose switches are used.
Allow with info option will allow the analog router to make use
of unused pin switches in the current design, and will give out
notes on the pins whose switches are used.
246
Option
Description
Note
Heap Size
Defines the number of SRAM bytes to reserve for the Heap space.
Stack Size
Defines the number of SRAM bytes to reserve for the Stack space.
Programming/Debugging
Chip Protection
4-wire JTAG
GPIO
Enable Device
Protection
5-wire JTAG
GPIO
247
Option
Description
Note
Enables hardware reset via the optional XRES pin (P1[2]). This is in
addition to the dedicated XRES pin on this device.
WARNING Exercise caution changing this setting during
development. Excessive (over 1000 times) re-programming of this
setting may cause the selection to become permanent.
Enable XRES
Enables hardware reset via the optional XRES pin (P1[2]). This
device does not have a dedicated XRES pin, if disabled it is not
possible to program the part without a power cycle or to issue a hard
reset from the debugger.
By default, the reset is done by toggling the XRES pin. The power
cycle method is highly dependent on the design of your board, and
may not be possible. If a XRES pin is not available and the Power
Cycle does not work, the part cannot be reprogrammed.
To ensure that the device can be programmed, this option should be
enabled.
WARNING Exercise caution changing this setting during
development. Excessive (over 1000 times) re-programming of this
setting may cause the selection to become permanent.
Operating Conditions
These settings specify the various voltages and temperature ranges in which the PSoC device is used. Various
components in the PSoC device use these values for configuration information, so you should use correct values.
There are numerous ways these settings can affect your design, including:
The USB_Start function has an option to use Vddd to set the internal USB regulators for enumeration.
The ADC_CountsTo_Volts() API uses these voltages for the Vssa to Vdda Input Range.
The SAR_ADC component uses the Vdda voltage setting for configuring the Input Range and Reference.
The SC block components (TIA, PGA, PGA_Inv, Sample_Hold, Mixer) enable boost clocks when the Vdda
is set below 2.7 V.
The VDAC8 component generates a note explaining that the range of the VDAC is limited to the range from
0 V to Vdda.
Static Timing Analysis uses smaller timing delays in the UDBs if Vddd is >= 1.8 V (and you selected the 0
C 85 C Temperature Range). IO delays are smaller if the voltage (VddioN) is 3.3 V or higher.
Option
Description
Vdda (V)
Note
248
Option
Description
Note
Variable VDDA
Vddd (V)
Vddio0 (V)
Vddio1 (V)
Vddio2 (V)
Vddio3 (V)
Temperature Range
Note: The voltage values entered here are used by certain APIs (for example, ADC_CountsTo_Volts), as well as
component Configure dialogs (for example, the ADC_DelSig component uses this Vdda information for showing
input range if Vref is selected to Vdda/4 or Vdda/3). Although it is recommended to update the actual Vddx voltages
in the DWR System Editor, the device will not get damaged if a different valid (as per the datasheet) supply voltage
is given.
See Also:
Design-Wide Resources
Bootloader and Bootloadable component datasheets (available from the Component Catalog)
249
Directives Editor
The Directives Editor is used to add, remove, and edit directives. See Directives for more information about the
directives available in PSoC Creator.
Note PSoC Creator collects DWR information dynamically. Depending on the complexity of the design, it may take
a few seconds to update the DWR information.
To Add a Directive:
Click the Add Directive button on the top left of the editor.
To Edit a Directive:
Enter a Component/Signal name, Directive Type, and Directive Value as appropriate in each column.
Component (Signal) Name - Use this column to enter the signal or component name. Currently there is no
validation check for this column, except you must enter a name in this column if you enter a value in the
Directive Value column.
Note The Component Name for this field is the fully elaborated name of the component as specified in the
<project>.rpt file after a successful build (e.g, "\Counter_1:CounterUDB:sC8:counterdp:u0\"). You can find
the <project>.rpt file under the Output tab in the Workspace Explorer.
Directive Type - Use this column to select a valid directive type from the drop down list. The initial value for
this column is INVALID. If you enter a value in the Directive Value column, you must change the Directive
Type to the appropriate type. Valid types include:
ForceSignal: Maps to the 'placement_force' directive format used for arbitrary logic. Allows the
assignment of a UDB PLD location to the output signal of a block of logic to tell the placer to put that
250
ForceComponentUDB: Maps to the 'placement_force' directive format for UDB components. Assigns
the location of UDB component listed to the location specified. This generates a rule of the form:
attribute placement_force of [component name] : label is "[UDB spec]"
where [UDB spec]: U(3,2)
ForceComponentFixed: Maps to the 'placement_force' directive format for Fixed Function blocks.
Assigned the location of the fixed block listed to the location specified. This generates a rule of the
form:
attribute placement_force of [component name] : label is "[fixed spec]"
where [fixed spec] : F([fixed block],i)
where [fixed block] : CAN, Comparator, I2C, SC, Timer, VIDAC, ...
Group: Maps to the 'placement_group' directive format. Groups the specified signal name into the
specified group. This generates a rule of the form:
attribute placement_group of [signal name] : signal is "[group name]"
Directive Value - Use this column to specify the value for the directive, based on the selected Directive
Type. Each type has certain rules for its value. If the value does not follow the rules of the type, an error
icon will display next to the text (for example, see signal_5 in the image). Mouse over the error icon to show
the reason of the error.
To Delete a Directive:
Click a row in the table and click the Delete Directive button.
See Also:
Design-Wide Resources
Directives
251
Note PSoC Creator collects DWR information dynamically. Depending on the complexity of the design, it may take
a few seconds to update the DWR information.
Protection Levels:
The tool offers four levels of protection, as follows. You can assign one of four protection levels (two levels for
PSoC 4) to each row; see the table below. flash protection levels can only be changed by performing a complete
flash erase. For more information on PSoC flash and security features, refer to a device datasheet or Technical
Reference Manual (TRM).
Factory Upgrade (F) Read protected. No device external to the PSoC device can read a flash block that
is read-protected. The SPC Read commands cannot be used to read a block that is read protected. Only
the processor and the PHUB can access a block of flash that is read protected. (This option is not available
for PSoC 4/PRoC BLE devices.)
Field Upgrade (R) External write protection. No device external to the PSoC device can erase or write a
row of flash that is external write protected. Includes all Read Protect restrictions. (This option is not
available for PSoC 4/PRoC BLE devices.)
Full Protection (W) Fully protected. Neither the PSoC CPU nor any device external to PSoC can erase
or write a block of flash that is fully protected. Includes all protections from lower levels of flash data
protection. This level is used when a block of flash should never be modified by an internal process or
external device.
252
PSoC 4
Allowed
Not Allowed
External write,
internal read and write
External read
n/a
n/a
Field Upgrade
External read
and write
n/a
n/a
Full Protection
Internal read
External read
and write,
Internal write
Internal read
External write,
Internal write (see
Note below)
Allowed
Not Allowed
Unprotected
Factory
Upgrade
Note To protect the PSoC 4 device from external read operations, you must change the device protection settings
to Protected in the DWR System Settings. You must also enable Chip Lock from Options > Programmer
Options before programming the device for these settings to take effect. You must use the PSoC Programmer tool
to program the device.
To protect the bootloader portion of flash, set the corresponding rows to full protection. PSoC Creator lets you
easily select the protection setting for each row.
Note The Full Protection level cannot be used on the last two rows of flash for Bootloader or Bootloadable projects.
These rows are used for application metadata and require internal write access.
253
By default the starting and ending values are set to include all rows of flash.
2. Select your desired protection level from the drop-down list located to the right of the previous fields.
3. Click the Set button.
See Also:
Design-Wide Resources
EEPROM Editor
The EEPROM Editor allows you to set up EEPROM data from PSoC Creator without requiring any code to run in
the PSoC application. It is a grid that displays the EEPROM memory according to the display options. Each cell is
editable, with a default value of 0xFF.
Note PSoC Creator collects DWR information dynamically. Depending on the complexity of the design, it may take
a few seconds to update the DWR information.
The left column shows the base addresses. The top row shows the offsets for each column. The ASCII display on
the right is similar to that shown in the Memory Window.
254
The file opens as a tabbed document in the work area, and it allows you to access the various design-wide
resources in your project. Click the EEPROM tab to access the EEPROM Editor.
To Import/Export Data:
You can write a sequence of bytes in an external editor in comma-separated value (CSV) format, save it as a CSV
file, and import the file into PSoC Creator. Click Import, navigate to the CSV file location, select it and click Open.
The changes are applied in the EEPROM Editor.
You can also make edits in the EEPROM Editor, export the data as a CSV file, then open the file in an external
editor. Click Export, navigate to the location to save the file, and click Save.
Use the View pull-down menu to change the size of the data displayed in the editor: 8-bit, 16-bit, or 32-bit.
Use the Format pull-down menu to change the format of the data displayed in the editor: Hex, Signed Int,
Unsigned Int.
Bootloader Support:
You can use the EEPROM Editor on any type of project. However, you cannot use it for both bootloader and
bootloadable. PSoC Creator will indicate an error if such a condition occurs.
For multi-application bootloaders, the EEPROM is equally divided amongst all bootloadables.
Rules:
1. If you have set up a bootloader/multi-application bootloader project to use EEPROM, then no bootloadable
project using that bootloader is allowed to use EEPROM (the DWR in the bootloadable project will not allow
you to turn on EEPROM for that project).
2. If the bootloader is not using EEPROM and it is not a multi-application bootloader, then any bootloadable
projects using that bootloader may enable EEPROM in their DWR and use the full EEPROM memory region.
255
3. If you have a multi-application bootloader and that bootloader is not using EEPROM, then bootloadables using
that bootloader may use EEPROM. The EEPROM will be divided evenly amongst the bootloadable .cyacd files
(e.g. *_1.cyacd has the first half of EEPROM and *_2.cyacd has the upper half of the EEPROM data).
See Also:
Design-Wide Resources
Memory Window
Symbol Editor
The Symbol Editor allows you to create and edit components that can then be used in your designs.
The process of creating components can be complex. These topics are provided as a help if you press [F1] for the
various dialogs you may encounter. For more in depth discussion regarding creating components, refer to the
Component Author Guide.
The main topics of the Symbol Editor include:
This section also contains various topics related to working with the Symbol Editor:
Creating a Symbol
Symbol Wizard
256
Creating a Symbol
Creating a symbol is only one aspect of creating a component. The process of creating components can be
complex. For more in depth discussion regarding creating components, refer to the Component Author Guide.
You create a symbol within a project. So first, either create a new project or open an existing one.
1. Once you have opened a project, select the Components tab in the Workspace Explorer.
2. Right-click on a component or project, and select Add Component Item...
You can also select this option from the Project menu.
The Add Component Item dialog displays.
See Also:
257
Symbol Wizard
Symbol Wizard
The Symbol Wizard allows you to create a basic symbol and specify the names and types of terminals. The wizard
also offers a preview of the symbol, as well as the option to change the title color.
Creating a symbol is only one aspect of creating a component. The process of creating components can be
complex. For more in depth discussion regarding creating components, refer to the Component Author Guide.
258
Note This field is normally used to enter an expression to display the value of a single parameter for the component
in the symbol (for example, Param name = `=$ParamName`). See Using Text Substitution for more information
about expressions.
To Delete a Terminal:
Double-click the row header cell for a terminal. A dialog will display to confirm the deletion.
You can also select a row and click the Delete
button.
259
See Also:
Creating a Symbol
On Canvas:
260
Symbol Parameters.
Generate Verilog Generates a Verilog file based on the Symbol's definition. See
Generate Verilog.
On Selected Object(s):
Cut, Copy, Paste, Delete Same as commands from the Standard Toolbar.
Shape Same as shape commands from the Common Design Entry Toolbars.
Select Allows you to select a specific object when two or more objects are drawn
on top of each other.
Align When two or more objects are selected, this command allows you to align
selected shapes: left, right center, top middle, and bottom.
Edit Name and Width For terminals only, opens Terminal Name dialog.
See Also:
Symbol Editor
Standard Toolbar
261
The dialog provides templates of the different types of items you can add to a component. The options available will
vary depending on the type of item you select and whether you are adding an item to a component or creating a
new component.
Select a component
You can also use the Project menu to open this dialog; however, the Destination field does not get selected
automatically as it does for the context menu.
Symbol Contains the symbol templates to create an empty symbol or to use the Symbol Wizard. See
also Creating a Symbol.
Implementation Contains the implementation templates. See also Creating a New Schematic.
API Contains the API templates to create C, header, and assembly files.
262
Library Contains a set of library templates to allow component authors to add libraries for different
compiler tool-chains and configurations (DEBUG/RELEASE).
Misc Contains miscellaneous templates to create a documentation file, Control File, XML file or any other
type of miscellaneous file.
Beside each template, there is a brief description for each component item.
Target generic device
The Target generic device check box disables/enables the Architecture, Family, and Device pull-down menus.
These options determine where in the project hierarchy the new item will be stored. This field is only available for
certain types of component items, such as implementations, API files, etc. The check box will become active for
different template items you select.
Select the Target generic device check box to create the selected component item at the top-level of the
component and disable the other options; de-select to enable them.
Choose an Architecture to create the component item in a subfolder for an architecture (e.g., PSoC3,
PSoC4, or PSoC5.).
Choose a device Family to create the component item in a subfolder for a family of devices (e.g., CY8C32,
PSoC 4000, PSoC 4200 BLE, CY8C52LP, etc.).
Choose a specific Device part number to create the component item in a subfolder for a specific device.
Component Name
The Component Name field allows you to specify a name for the component when you create a new component
for a project. This field is disabled when adding component items at the component level.
Item Name
The Item Name field allows you to specify a name for some component items. The following component items
derive their name from the Component Name:
Symbol
Schematic
Control file
Verilog file
Configuration
The Configuration field only applies to Library template files. It allows you to specify if the library is for debug
mode, release mode, or both.
Destination
The Destination field is only active when you open this dialog using the Add Component Item command from the
Project menu. This field is a pull-down menu that allows you to select the project or component to which you want
to add the component item. Notice that if you select a project, the Component Name field becomes active.
Conversely, if you select a component, the Component Name field becomes inactive.
263
See Also:
Symbol Wizard
Workspace Explorer
Creating a Symbol
Use component terminals when you are creating a symbol in the Symbol Editor, as part of creating a component.
For more information about creating components, refer to the Component Author Guide.
To Place a Terminal:
Select the appropriate Terminal tool from the Design Elements Palette and click on the canvas. The Terminal
Name dialog will display.
264
To Rename a Terminal:
Right-click a terminal and select Edit Terminal Name.
The Terminal Name dialog will display.
Use the dialog to specify the terminal name and/or indices, as appropriate.
2. Change the Show Label property to true/false to show/hide the label, respectively.
3. Click OK.
To Delete a Terminal:
Select the terminal and press [Delete] or click
See Also:
Symbol Editor
265
The process of creating components can be complex. This topic is provided as a help if you press [F1] for this
dialog. For more in depth discussion regarding creating components, refer to the Component Author Guide.
2. Click the [...] button in the Doc.CatalogPlacement field to open the Catalog Placement dialog.
266
t The tab name. The tab order displayed in the Component Catalog is alphabetical and case insensitive.
x A node in the tree under the tab. You must have at least one node.
If you do not specify the display name, the symbol name will be used instead; however, you must use the t/x/
syntax.
If you do not define the Doc.CatalogPlacement property for a given symbol, it will display by default under the
Default tab.
If you want to show the symbol in multiple catalog trees, enter separate syntax strings in different rows of the
dialog.
See Also:
Component Catalog
Properties dialog
267
The process of creating components can be complex. This topic is provided as a help if you press [F1] for this
dialog. For more in depth discussion regarding creating components, refer to the Component Author Guide.
To Create Parameters:
For each symbol, you can create any number of parameters.
1. Define the Name, Type, and Value of a parameter in the parameter table on the left side of the dialog.
2. For each parameter, define the properties on the right side of the dialog.
3. To add another parameter, type in the next row of the parameter table.
268
See Also:
Symbol Editor
Enumeration Types
269
The process of creating components can be complex. This topic is provided as a help if you press [F1] for this
dialog. For more in depth discussion regarding creating components, refer to the Component Author Guide.
To Add a Validator:
1. Type an expression in the first row of the validator table in the Expression field. Refer to the Component
Author Guide.
2. In the Error message field, type in the message to display if the validation check is not met.
270
3. To add another validator, type in the next row of the validator table.
4. Click OK to close the dialog.
See Also:
Symbol Editor
Exporting a Component
After you have finished developing one or more components, you can export them without providing the entire
project or library. This allows for a library-free distribution method of components and allows you to more easily
control your own libraries and dependencies.
If you prefer to include the component as part of a project/library, see Archiving a Workspace/Project.
To Export a Component:
1. In the Workspace Explorer, under the Components tab, right-click on the component to view the context menu,
and select Export Component.
This option opens the Save As dialog to save the component with a default .cycomp file name of
comp_archiveXX, where XX is a number that will increment each time you export a component.
Click Save.
3. Select Add to Existing Archive... to update an existing exported component archive. This option allows you to
update an existing component, and it allows you to add additional components to an existing .cycomp file.
271
The .cycomp file contains all of the files included with the selected components, and it is used by PSoC Creator
during the Import Component process.
See Also:
Archiving a Workspace/Project
Workspace Explorer
Import Component
UDB Editor
The Universal Digital Block (UDB) Editor is a graphic tool to create PSoC components. This simple-to-use editor
provides an approachable way to implement and configure UDB resources.
Note The UDB Editor is not intended to enable 100% of UDB functionality or to make the most optimal designs
possible. Rather, its purpose is to increase your ability to use UDB resources. This editor does not replace the
Datapath Config Tool, which is more of an expert-level tool for working with UDBs. Refer to the Component Author
Guide for more information about the Datapath Config Tool and UDB resources. Refer to the UDB Editor Guide for
more information about the UDB Editor.
The main components of the UDB Editor include:
Verilog Displays Verilog code generated from the design canvas. The UDB Editor currently supports
Verilog; additional languages may be added in the future. All expressions must confirm to Verilog syntax.
UDB Properties
Common Design Entry Toolbars commands common to the design entry tools
272
The UDB Editor provides the following UDB features as editable blocks:
Datapath (DP)
Control Register
Status Register
Count7
State Machines
See Also:
UDB Datapath
UDB Count7
273
UDB Properties
On the right side of the UDB Editor, there are several sections for properties.
Misc
Masks
FIFOs
Toolbar:
The toolbar contains the following commands:
Delete Row Deletes the selected row in one of the properties tables.
To Add an Input/Output/Variable:
Click in the cell showing "Enter Name", type a name and press [Enter].
To Delete an Input/Output/Variable:
Click on a row and press the [Delete] key or click the [Delete Row] button.
274
See Also:
UDB Editor
UDB Datapath
UDB Datapath
The UDB datapath element is used to configure datapath resources in the PSoC device. This element contains
several tables to edit Inputs, Registers, Outputs, and Instructions.
For more information about UDB datapaths, refer to the Component Author Guide.
To Place a Datapath:
Click on the Datapath icon
in the UDB Design Elements Palette, and drag the instance to the canvas.
275
Note Each area of the Datapath instance contains different configuration dialogs. See Configure Dialog
Descriptions for more information.
2. Select a value from the pull-down menu or enter a value in the field, as appropriate.
3. Click OK to close the dialog.
276
Inputs
This dialog contains fields to select a datapath input and assign an input expression. There can be a total of six
inputs for a datapath. All supported values can be entered at the same time using this dialog.
Registers
This dialog contains fields to enter initial values for load registers. All supported values can be entered at the same
time using this dialog.
Note The values in the Load column come from the Input dialog selections; they are included as read-only fields for
reference.
277
Outputs
This dialog contains fields to enter datapath output and assign a condition. There can be a total of six outputs for a
datapath. All supported values can be entered at the same time using this dialog.
Instructions
This dialog contains fields to enter various datapath instructions. There can be a total of eight instructions for a
datapath, and each instruction must be configured individually.
Each instruction is divided into three parts: ALU operation, Register writes, and Compare options. The ALU
operation determines what arithmetic or Boolean operation is performed for that instruction cycle. Register writes
are used to load A0 and A1 with values for the next instruction cycle. Compare options are used to set the
comparisons being made using comparator0 and comparator1. Refer to the Component Author Guide for more
details.
See Also:
UDB Editor
278
Refer to the Component Author Guide for more information about control registers and the UDB Editor.
in the UDB Design Elements Palette, and drag the instance to the canvas.
To Configure Bits:
1. Double-click on the Control Register instance to open the Configure dialog.
See Also:
UDB Editor
279
Refer to the Component Author Guide for more information about status registers and the UDB Editor.
in the UDB Design Elements Palette, and drag the instance to the canvas.
To Configure Bits:
1. Double-click on the Status Register instance to open the Configure dialog.
See Also:
UDB Editor
280
Refer to the Component Author Guide for more information about status interrupt registers and the UDB Editor.
in the UDB Design Elements Palette, and drag the instance to the
To Configure Bits:
1. Double-click on the Status Interrupt Register instance to open the Configure dialog.
See Also:
UDB Editor
281
UDB Count7
The Count7 counter is a 7-bit down counter that should be used when a counter of three to seven bits is needed.
This provides resource savings compared to PLDs or datapath-based counter designs.
Refer to the Component Author Guide for more information about the Count7 and the UDB Editor.
To Place a Count7:
Click on the Count7 icon
in the UDB Design Elements Palette, and drag the instance to the canvas.
To Configure Bits:
1. Double-click on the Count7 instance to open the Configure dialog.
See Also:
UDB Editor
282
Refer to the Component Author Guide for more information about state machines and the UDB Editor.
in the UDB Design Elements Palette, and drag the instance to the canvas.
Machine name must be globally unique; it is auto-populated when not a start state.
283
2. Click and drag from an anchor point to begin drawing the state transition.
3. Continue dragging to another state to make the connection. When you release the mouse, a Configure dialog
will display.
284
See Also:
UDB Editor
Other Tools
Schematic Macro Editor
The Schematic Macro Editor is similar to the Schematic Editor in that you use it to create schematics with access to
the Component Catalog and other associated schematic tools. However, the Schematic Macro Editor is also similar
to the Symbol Editor in that you use it to create component macros that will display in the Component Catalog.
Schematic macros are typically created by component authors to simplify usage of the components they build.
Typical uses of the components are prepared and made available as macros. End users use these macros instead
of using base components.
285
Schematic macros are mini schematics. A component can have multiple macros. Macros can be at the generic,
architecture, family and device levels. Macros can be dragged from the component catalog and dropped into
schematics. Macros can have instances (including the component for which the macro is being defined), terminals,
and wires.
The main components of the Schematic Macro Editor include:
Common Design Entry toolbars commands common to the design entry tools
See Also:
Schematic Editor
Symbol Editor
By creating you own sheet templates, you can add logos, company information, and so on to your template file, and
have them display on your designs.
2. On the New File dialog, select the Sheet Template icon, and click OK.
The Sheet Template Page Setup dialog displays.
286
3. Select the page size, select the page orientation, enter margins, and click OK.
A blank sheet template file (.cysheet) opens.
Designing a Template:
You can use all the drawing tools to design the template to meet your specifications.
Use the Text tool to type your Company Name, Address, and other important information.
Use the shape tools to create legends, frame your information, or for any other shapes you might need.
The address fields (Addr1, Addr2, Addr3) can be used to enter your company's address.
The current user field can be used to enter your name or company ID.
The DisplayName is where you enter the name of this template. It is also the name displayed in the Sheet
Catalog when you create a new executable project.
Saving a Template:
You can save your template anywhere on your PC. The default location for PSoC Creator to locate your template is
<INSTALL_PATH>\templates\sheets. If you save your template in another location, specify that location using the
PSoC Creator Design Entry Options, under Sheet Templates
See also:
Properties
287
Format Shape
The Format Shape dialog allows you to change various properties for any shape (or set of shapes) on your canvas.
The types of properties available will vary depending on the selected shape(s). For example, text offers font, color,
size, etc., while a line offers width, pen type, end cap, etc.
Default Expression Defines the default value for the shape expressed as <size>b<value>, where
<size> = number of bits, and <value> = the binary value.
Shape Tags Defines one or more tags to be associated with one or more shapes for use with the shape
customization code; refer to the Component Author Guide.
Visibility Expression Defines an expression to evaluate whether or not the selected shape is visible. For
example in the UART component, this property is defined with the variable $FlowControl for the rts_n and
cts_n terminals. If $FlowControl is set to true in the instance, then these terminals display in the schematic;
if false, they are hidden.
See Also:
288
Note Many of these commands are also available from the Schematic Editor Context Menus and Symbol Editor
Context Menus.
Formatting:
The following table lists and describes the design entry formatting commands.
Note These commands apply to text labels only. To adjust text properties for the code editor, see the Options
Dialog.
Icon
Command
Description
--
Font Style
--
Font Size
Bold
Italic
Underline
Align Left
Font Color
Line Color
Fill Color
Shape Formatting:
The following table lists and describes the design entry shape formatting commands:
Icon
Command
Description
Format Shape
Open Format Shape dialog to define various characteristics of the selected object(s).
Bring to Front
Send to Back
289
Icon
Command
Description
Rotate Left
Rotate Right
Flip Vertical
Flip Horizontal
Convert to Closed
Shape
Group
Ungroup
See Also:
Schematic Editor
Symbol Editor
Common Elements:
The following table lists and describes the common design entry shape commands available on both the Schematic
Editor and Symbol Editor:
Icon
Command
Shortcut **
Description
Select
[Esc]
Draw
Rectangle
[R]
Draw Ellipse
[E]
Draw Line
[L]
Draw Arc
[C]
290
Icon
Command
Shortcut **
Description
Draw Text
[T]
Insert Image
[M]
Used to insert an image onto the canvas. Allowed image formats are: BMP, GIF, EXIF,
png, PNG, and TIFF.
** Keyboard shortcuts for shape drawing tools are only active while the sheet canvas document is active.
Terminals
Used to draw digital input, output, and inout, as well as analog and external
schematic terminals. See Working with Schematic Terminals and Keyboard Shortcuts.
Note Schematic terminals are hidden from the DEP when you are editing a top-level schematic. They only
appear when creating a schematic implementation for a component.
Used to draw wires on the schematic; the shortcut is [W]. See Working with Wires.
Wire
Sheet Connector
Used to draw connectors between commonly named wires on multiple sheets; the
shortcut is [S]. See Using Multiple Pages and Connectors.
Terminals
Used to draw digital input, output, and inout, as well as analog and external
component terminals. See Working with Component Terminals and Keyboard Shortcuts.
To activate normal mode, single-click an element; to activate sticky mode, double-click an element.
See Also:
Schematic Editor
Symbol Editor
Keyboard Shortcuts
291
To Create Text:
1. From the Design Elements Palette, select the Text Tool.
2. Click on your schematic or symbol canvas.
A text box appears:
To Edit Text:
1. Double-click the text label to edit.
The text becomes selected in the same manner as creating new text.
See Also:
Schematic Editor
Symbol Editor
292
The format must use a backward apostrophe [`], equals sign [=], the expression, and closed with another
backward apostrophe [`]. If the expression is or contains a parameter, use the dollar symbol [$] in front of the
parameter name.
`=$<parameter>`
Text access to parameters and functions really only makes sense in symbols. There may be a corner case
that would make sense in schematics. Access to parameters and functions is not allowed in macros.
Text in symbols can see all parameters defined in the symbol. It doesn't matter if they're built-in (such as
$INSTANCE_NAME) or user-defined.
Text in schematics can see all parameters defined in the schematic's symbol. For example, the schematic
that implements a UART_v1_20 component can use `=$PARAM` to expand UART parameters.
Text substitution has no semantic influence on the design. It is only available so it can be read by users.
Text in a Schematic Editor only has access to the default value of the parameters.
Text in schematics that do not have symbols cannot see any parameters. You can only use simple
expressions, such as `=1+1`.
Text expressions have access to component-specific functions created via the ICyExprEval_v1 or
ICyExprEval_v2 customizer APIs (see Customizer API Reference Guide). The exact same rules apply here
as with parameters:
293
Substitution Examples:
The following sections provide different examples for variables you can use.
Symbol Parameters
On symbols, you can refer to any parameter you define (but you'll get the default value). When your symbol is
instantiated in a schematic, you'll see the parameters set by the user on that instance. All parameters must use the
$ sign. For example, parameter p1, type = int, default value = 42, enter the following:
`=$p1`
Document Properties
On symbols and schematics you can refer to a document property. For example:
`=$Doc.CurrentUser`
The text displayed for this label will be the current user's name or ID. See the Properties dialog for more information
about the different properties available.
Instance Name
On symbols you can refer to the instance name. You'll always get "Inst_N" in the symbol document, but when
dropped in a schematic it will have that instance's proper name.
`=$INSTANCE_NAME`
Note There is a setting in the Design Entry Options dialog to show or hide unevaluated expressions
Enumerations
On symbols and schematics you can refer to any enumeration. For example, if you define the following enum type:
enum Foo
{
Foo_VAL_1 = 1,
Foo_VAL_2 = 2
};
- or `=cast(int, Foo_VAL_1)`
The first method takes advantage of the fact that the + operator forces the left and right to be a number and that 0
is the additive identity. The second method uses the explicit casting operation and forces the enumeration to
convert to an int.
294
Complicated Expressions
You can also do complicated expressions. For example:
`="p1=" . $p1 . " Current User=" . $Doc.CurrentUser . " Foo_VAL_1=" . cast(int,
Foo_VAL_1)`
The text displayed for this label will be: p1=42 Current User=xxx Foo_VAL_1=1
This example used casting and string concatenation. You can also embed as many substitution strings in your edit
text as you want. For example:
Life is short, so eat `=$1` donuts and `=Foo_VAL_1 + 0` fig newtons.
The text displayed for this label will be: Life is short, so eat 42 donuts and 1 fig newtons.
See Also:
Schematic Editor
Symbol Editor
Properties dialog
Moving a line
Resizing a line
295
To Move a Line:
1. Click the Select tool.
2. Click and hold the mouse button on the line to move, and drag it to the desired position.
When you hover your mouse over the line, your cursor changes to a finger.
To Resize a Line:
1. Click the Select tool.
2. Click the mouse button on the line to resize.
Notice that its handles display.
To change both the width and the height, drag a corner handle.
See Also:
296
Drawing a shape
Moving a shape
Resizing a shape
To Draw a Shape:
1. Click the tool for the shape to draw. See Common Design Entry Toolbar.
2. Move the cursor to the position to start the shape.
3. Click and hold the mouse button, and drag the cursor to the end point of the shape.
4. Release the mouse button.
To Move a Shape:
1. Click the Select tool.
2. Click and hold the mouse button on the shape to move, and drag it to the desired position.
When you hover your mouse over the line, your cursor changes to a finger.
To Resize a Shape:
1. Click the Select tool.
2. Click the mouse button on the shape to resize.
Notice that its handles display.
To change both the width and the height, drag a corner handle.
See Also:
297
Zooming
There are different windows, such as the Schematic Editor and Symbol Editor, that allow you to zoom in and out.
For these types of windows there are several useful zoom features you may wish to use:
Toolbar
[Ctrl] Key
Right-Click
To pick a specific zoom percentage, click the Zoom pull down menu and select the zoom level you want.
You can also manually type any percentage; the available zoom range is 2% to 2038%.
Press and hold the [Ctrl] key and drag a box around the area you wish to magnify. This action draws a red
rectangle as you drag the mouse.
Immediately upon releasing the mouse, the canvas will zoom to the selected area.
Press and hold the [Ctrl] key and use the scroll wheel on your mouse to zoom in and out incrementally.
298
Press and hold the [Ctrl] key and press the [+] key to zoom in and the [] key to zoom out.
See Also:
Standard Toolbar
Keyboard Shortcuts
Scrolling
Various windows provide scroll bars to view more information. There are a few ways to scroll:
Press and hold the [Shift] key with the mouse scroll wheel to scroll left and right.
Use the left and right arrows to scroll vertically; up and down arrows scroll horizontally.
Verilog
VHDL
asm
always
abs
auto
and
access
bool
assign
after
break
attribute
alias
case
begin
all
catch
buf
and
char
bufif0
architecture
class
bufif1
array
const
case
assert
const_cast
casex
attribute
continue
casez
begin
default
cmos
block
299
C/C++
Verilog
VHDL
delete
deassign
body
do
default
buffer
double
defparam
bus
dynamic_cast
disable
case
else
edge
component
enum
else
configuration
explicit
endattribute
constant
export
endcase
disconnect
extern
endfunction
downto
false
endmodule
else
float
endprimitive
elsif
for
endspecify
end
friend
endtable
entity
goto
endtask
exit
if
event
file
inline
for
for
int
force
function
long
forever
generate
mutable
fork
generic
namespace
function
group
new
highz0
guarded
operator
highz1
if
private
if
impure
protected
ifnone
in
public
initial
inertial
register
inout
inout
reinterpret_cast
input
is
restrict
integer
label
return
join
library
short
medium
linkage
signed
module
literal
sizeof
large
loop
static
macromodule
map
static_cast
nand
mod
struct
negedge
nand
switch
nmos
new
template
nor
next
this
not
nor
throw
notif0
not
300
C/C++
Verilog
VHDL
true
notif1
null
try
or
of
typedef
output
on
typeid
parameter
open
typename
pmos
or
union
posedge
others
unsigned
primitive
out
using
pull0
package
virtual
pull1
port
void
pulldown
postponed
volatile
pullup
procedure
while
rcmos
process
wchar_t
real
pure
_Bool
realtime
range
_Complex
reg
record
_Imaginary
release
register
repeat
reject
rnmos
rem
rpmos
report
rtran
return
rtranif0
rol
rtranif1
ror
scalared
select
signed
severity
small
signal
specify
shared
specparam
sla
strength
sll
strong0
sra
strong1
srl
supply0
subtype
supply1
then
table
to
task
transport
time
type
tran
unaffected
tranif0
units
tranif1
until
tri
use
301
C/C++
Verilog
VHDL
tri0
variable
tri1
wait
triand
when
trior
while
trireg
with
unsigned
xnor
vectored
xor
wait
wand
weak0
weak1
while
wire
wor
xnor
xor
302
When you build a project, PSoC Creator goes through series of processes to produce an output file. For a design
project, the output is a hex file used to program a device. For a library project, the output is a library file used to
specify component information. The following image shows the processes at a high level for a design project. A
library project would not necessarily include all of these processes.
When you create a project, PSoC Creator sets the tool chain with which to build the output. The tool chain is a
collection of tools (code generator, compiler, assembler, linker, etc.) that transforms a project's contents into the
appropriate output for the project's type.
Build Configurations:
PSoC Creator provides Debug and Release configurations for these tool chains. Changing between build
configurations can help when developing and testing a design. For example, while first developing code it is easiest
to use a 'Debug' configuration that typically has fewer optimizations and produces more debug information. This
can help in tracking down exactly what is causing an issue. As the code becomes stable and is getting ready for
release, using a 'Release' configuration becomes preferable as additional optimizations are often desired. These
optimizations help cut down the size of the program and allow it to run faster.
Having multiple configurations available allows for quickly switching between 'Debug' and 'Release' modes if issues
are discovered that need investigation. The Build Configuration on the main toolbar allows for changing between
different configurations. If this option is not visible, right click on the toolbar area and select Build Configuration.
Additionally, the build options for any configuration can be adjusted using the Build Settings dialog.
Section Topics:
This section covers various aspects of the PSoC Creator build system. It includes the following topics:
303
Build Menu
Build Settings
Control File
Directives
Generated Files
The pull-down menu allows access to different build and clean options, shown in the following table.
The Build toolbar contains the following commands:
Menu Item
Build (Named) Project
Icon Shortcut
[Shift]+[F6]
Description
See Also
304
Menu Item
Icon Shortcut
Description
See Also
Cancel Build
Compile File
[Ctrl]+[F6]
Generate Application
Program
[Ctrl]+[F5]
Debug
[F5]
Generated Files
See Also:
Build Menu
The Build menu contains the following commands:
Menu Item
Build All Projects
Icon Shortcut
[F6]
Description
See Also
Building a PSoC
Creator Project
Cancel Build
[Ctrl] + [Break]
Compile File
[Ctrl] + [F6]
305
Menu Item
Icon Shortcut
Description
See Also
Generate Application
Generated Files
Generating a Project
Datasheet
See Also:
Build Settings
The Build Settings dialog lets you define various build settings on a per-project basis. You can also select a different
toolchain for the selected project, and in turn set different settings for the compiler, assembler, and linker.
Debug
Customizer
Toolchain
306
Compiler
Assembler
Linker
Library Generation
Settings Options:
The top of the dialog contains the following pull-down menus:
Configuration Use this menu to set build setting preferences for the different types of builds: Debug or
Release. Debug mode adds logging information for debugging purposes; Release mode does not.
Note This option does not change the build type for your project. It is only used to set preferences. The
currently active build type is shown in parentheses. To change the active build type, close the Build
Settings dialog, and use the Configuration pull-down menu located on the main toolbar.
Toolchain Use this menu to select the toolchain for the selected project. To specify a default toolchain for
all new projects, see Selecting a Default Compiler.
Processor Type This field displays the processor type for design projects. For library projects, use this
menu to select the processor type.
Custom Code Gen Options Custom arguments to control the API code generator. At this time, there are
no arguments exposed to users. This field is internal to Cypress only.
Fitter:
Custom Fitter Options Specify custom arguments to control how the design fits into the PSoC device.
Some of the options include the following:
-q
The -q ("quiet") option suppresses the printing of status messages during compilation. This
leads to a less cluttered screen when compilation and synthesis are finished.
-xor2
The -xor2 option passes along any XOR operators found in the design to the fitter to
implement as it sees fit.
307
-f(O|D|T)
The -f option enables certain global fitter options. -f must be followed (without an intervening
space) by one of the arguments O, D or T. The options define the type of flip-flop that should be
used by UDB logic (d-type or t-type). O stands for optimal, and will allow warp to pick optimal
flip-flop type for your device.
-f(P|K)
The -fK option forces the fitter to preserve the user-specified polarity for all outputs. This is
the opposite of the -fP option, which optimizes for the optimal polarity. The -fK option is not
recommended for most designs, but is useful in certain cases when the user is able to
determine the proper polarity for all the signals.
-m
The -m option enables a smart compile of the project Verilog files. Generally, without this
option, Warp compiles all the files. When this option is specified, Warp compiles only those files
that have been modified since the last compile.
-w#
The -w option specifies the maximum number of warnings that can appear as a result of a
single Warp run before Warp quits.
-e#
The -e option specifies the maximum number of non-fatal errors that can occur on a single
Warp run before Warp exits.
-yg(a|s|c) :
The -yg option causes Warp to synthesize the design so that UDB components are optimized
for area (a), speed (s) or as combinatorial equations (c).
-yv#
The -yv option controls the amount of information that is reported in the report file. The -yv
option should be followed by a digit. The default is 0. Numbers higher than zero produce more
verbose report files useful for debugging. By default (with a value of 0), the report file only
indicates major events during synthesis.
-v#
The -v option has a numeric argument that controls the aggressiveness of the virtual
substitution algorithm. The range of numbers allowed is 0 to 11, where a value of 0 does not
perform any virtual substitution and a value of 11 performs virtual substitution even against the
better judgement of the algorithm to isolate large combinatorial and compact them in a UDB.
Synthesis:
Custom Synthesis Options Specify custom arguments to control HDL synthesis. See also Directives
Editor.
-fl -- no_factor
-o -- opt_level
Quiet Output Control the level of output from the synthesis tool: true or false.
Synthesis Optimization Effort Select how much effort the synthesizer should put into optimizing the
design: none, normal, or exhaustive.
Virtual Node Substitution Level Used for optimizing designs for size and speed: 0-11.
See Also:
Workspace/Project
Project Types
Directives Editor
308
Debug Target:
This controls what portion of the design is to be debugged. It contains the following options:
Application Code and Data This is the default value; valid for all project types.
In normal projects and bootloader projects, this refers to the application flash.
Application Code and Data 2 Use this option for a Multi-App Bootloader project for debugging the second
application of the bootloadable project.
Bootloader Use this option only for debugging the Bootloader part of a Bootloadable project.
Note Because the Bootloader performs a software reset to start the Bootloadable application, there is no way to
309
debug a Bootloadable application from the standard Execute Code menu option. Instead, it is recommended that
you debug your application before making it a Bootloadable project. If you have already made it a Bootloadable
project, you can still use the debugging functionality by programming the design onto the board. Then, reset/power
cycle the device and use the Attach to Target option to debug the Bootloadable application.
See Also:
Build Settings
Attach to Target
310
General:
Assembly References Specify any additional .NET assemblies which need to be included while building
the customizer code for the selected project.
Command Line Options Specify any additional command line options to be given to the compiler while
building the customizers for the selected project. The default command line option only defines the
"TRACE" constant, which is useful while debugging.
Customizer Build Mode Specify whether the customizers for this project should be built in "Debug" or
"Release" mode. In the "Debug" mode, the customizer will be built with debugging information. This mode
should be chosen while debugging customizers.
See Also:
Build Settings
311
General Category:
The top level of this category contains only one option under General: Output Directory. This option allows you to
specify the relative path to the output file directory. The default is:
$(ProjectDir)\$(ProcessorType)\$(Platform)\$(Config)
This defines the project directory, processor type, platform, and configuration.
See Also:
Build Settings
312
ARM Options:
General
Additional Include Directories Specify additional directories to the compiler's include path. If you wish
to specify more than one, separate them with semi-colons.
Create Listing File Create file containing high-level source and assembly: true or false.
Difference Tables Enable to issue warning when assembler alters the code emitted for directives: true or
false.
Generate Debugging Information Produce debugging information to work with GDB: true or false.
Join Data and Text Sections Enable this option to generate shorter address displacements: true or
false.
Suppress Warnings Enable this option to suppress all warnings: true or false.
Command Line
Custom Flags Allows you to enter any flags that are understood by the compiler. Refer to the appropriate
compiler documentation. These flags are added to the flags generated by PSoC Creator based on the
selections made in other sections.
313
Keil Options:
General
Additional Include Directories Specify additional directories to the compiler's include path. If you wish
to specify more than one, separate them with semi-colons.
Generate Debugging Information Produce debugging information to work with GDB: true or false.
Preprocessor Definitions Opens the Preprocessor Definitions dialog to add define directives to your
source code.
Listing File
Create Listing File create file containing high-level source and assembly: true or false.
Macros Include all macro expansions in the listing file: true or false.
Command Line
Custom Flags Allows you to enter any flags that are understood by the compiler. Refer to the appropriate
compiler documentation. These flags are added to the flags generated by PSoC Creator based on the
selections made in other sections.
See Also:
Build Settings
314
ARM Options:
Code Generation
Struct Return Method Specify the method used for returning short structs/methods: system default,
register, or memory.
Verbose Asm Enable extra commentary information in the generated assembly code to make it more
readable: true or false.
General
Additional Include Directories Specify additional directories to the compiler's include path. If you wish
to specify more than one, separate them with semi-colons.
Create Listing File Create file containing high-level source and assembly: true or false.
Default Char Unsigned Set the default char type to be unsigned: true or false.
Generate Debugging Information Produce debugging information to work with GDB: true or false.
Preprocessor Definitions Opens the Preprocessor Definitions dialog to add define directives that can
impact how your C source code is compiled.
315
Optimization
Optimization Level Options for code optimization. These values correspond with the toolchain command
line code (in parentheses): None (-O0), Debug (-Og), Minimal (-O1), High (-O2), Speed (-O3), Size (-Os).
Refer to the toolchain manual for details.
Command Line
Custom Flags Allows you to enter any flags that are understood by the compiler. Refer to the appropriate
compiler documentation. These flags are added to the flags generated by PSoC Creator based on the
selections made in other sections.
Keil Options:
Code Generation
General
Additional Include Directories Specify additional directories to the compiler's include path. If you wish
to specify more than one, separate them with semi-colons.
Browse Information Include browser information in the generated object module: true or false.
Float Fuzzy Specify the number of bits rounded before comparing floating-point numbers: 0-7.
Generate Debugging Information Include debugging information in the object file: true or false.
316
Preprocessor Definitions Opens the Preprocessor Definitions dialog to add define directives that can
impact how your C source code is compiled.
Listing Files
Assembly Code Listing Append an assembly mnemonics list to the listing file: true or false
Create Listing File create file containing high-level source and assembly: true or false.
List Include Files Print a list of the #include files in the listing file: true or false.
Optimization
Linker Code Packing Include information in the object file for linker-level program optimizations: true or
false.
Optimization Emphasis Indicate the emphasis of the optimization done by the compiler: none, size, or
speed.
Command Line
Custom Flags Allows you to enter any flags that are understood by the compiler. Refer to the appropriate
compiler documentation. These flags are added to the flags generated by PSoC Creator based on the
selections made in other sections.
See Also:
Build Settings
317
ARM Options:
General
Additional Libraries Specify additional libraries to link to the executable. Use semi-colons to separate
more than one.
Additional Library Directories Specify additional libraries to add to the linker's library path. Use semicolons to separate more than one.
Additional Link Files Specify additional files to link to the executable. Use semi-colons to separate more
than one.
Create Map File Generate an updated listing file derived from the relocated addresses and data from the
linker: true or false.
Custom Linker Script Specify the path to a custom linker script to use when building the project instead
of the default script provided with the cy_boot component.
Use Debugging Information Enable to use the debugging information generated by gcc during
compilation of the source code: true or false.
318
Command Line
Custom Flags Allows you to enter any flags that are understood by the compiler. Refer to the appropriate
compiler documentation. These flags are added to the flags generated by PSoC Creator based on the
selections made in other sections.
Keil Options:
General
Additional Link Files Specify additional files to link to the executable. Use semi-colons to separate more
than one.
Create Code Listing Create code listing file that contains program source/assembly: true or false.
Disable Unreferenced Segments Warnings Disable linker warnings about unreferenced code
segments: true or false.
Recursions Control the number of recursions allowed in the linker before an abort: integer.
Listing File
Create Map File Generate an updated listing file derived from the relocated addresses and data from the
linker: true or false.
Cross Reference Report Include a cross reference report in the listing file: true or false.
Generate Memory Map Generate the memory map and overlay map in the listing file: true or false.
Debugging
Generate Debug Lines Include line number information in the linker output and map files: true or false. If
false, source-level debugging will not be possible.
Generate Local Symbols Include local symbol information in the linker output and map files: true or
false. If false, source-level debugging will not be possible.
Generate Public Symbols Include public symbol information in the linker output and map files: true or
false. If false, source-level debugging will not be possible.
Symbol Types Include symbol type information in the output file: true or false.
319
Command Line
Custom Flags Allows you to enter any flags that are understood by the compiler. Refer to the appropriate
compiler documentation. These flags are added to the flags generated by PSoC Creator based on the
selections made in other sections.
See Also:
Build Settings
Custom Flags Allows you to enter any flags that are understood by the compiler. Refer to the appropriate
compiler documentation. These flags are added to the flags generated by PSoC Creator based on the
selections made in other sections.
See Also:
Build Settings
320
a new rule has been added to the PSoC Creator backend that was previously missing
changes to the backend have resulted in the project "moving" into a corner of the solution that cannot be
solved
If a new rule has been added to PSoC Creator, the design was invalid, but PSoC Creator was not flagging the
design. If the error message is not about a rule violation, but about PSoC Creator being unable to map, place, or,
route the design, this can be worked around.
To work around the issue, open the design in the previously successful version of PSoC Creator and follow the
instructions for adding a Control File. Then use the control file to force the design to have the same placement as
the design previously had. Then save and close the design. When you open the design in the new version of PSoC
Creator, the design will keep the control file and work as in the previous version.
See Also:
Design-Wide Resources
Pin Editor
Directives Editor
Directives
321
Generated Files
Control File
Control File
A control file is an optional file that provides a common location for setting global directives for a given design. This
provides detailed control over many aspects of synthesis while maintaining a device and vendor independent
hardware description language (HDL) source file. The control file allows the user to attach directives via the
attribute mechanism, and the file supports the Warp specific HDL syntax for these (extended) attributes to allow the
cutting and pasting of these directives between the HDL source and the control file. The file can also be used for
back-annotating pinout and internal placement information from fitting and place and route results automatically.
During the process of synthesis, optimization, and factoring, Warp derives many new signal and node names to
realize the design. For example, Warp separates buses into individual signals. Even though objects such as buses
make HDL design entry much simpler, no VHDL-based way exists to assign attributes to portions of a bus. In other
cases, Warp produces brand new signal names which may not have any direct correlation to any single
VHDL/Verilog object within a design. This situation occurs during factorization where factors are produced by
examining the design globally.
Only one control file is allowed per design, and the file must have the same base name as the top-level design file
name. For example, for a top-level design whose name is mydesign.vhd or mydesign.v, the control file must be
called mydesign.ctl.
The creation and editing of the control file is an iterative process, typically done to refine, improve, or constrain the
results of synthesis.
The control file is applied during parsing/analysis, during synthesis, and during fitting. Names created during
parsing/analysis are not qualified. Therefore, if the control file pattern matches the name, the attribute is applied.
This occurs at any level of the design hierarchy.
For example, consider a top level signal called c. An attribute applied to c will be applied to the top level signal, but
it will also be applied to any internal signal named c, including those in the Warp library. So if the control file says:
attribute placement_force of c : signal is "U(1,2)A";
it will attempt to force all signals named c into that programmable logic block.
Likely, there will be too many signals, and the placer will complain. The work around is to rename the top level
signal something unique, like top_level_c, or to use an attribute in the source file, not the control file.
322
See Also:
Directives
CSAttribute:
For the rare situation when there are multiple objects which have the same identifier differing only in case (eg,
Fred_Astaire and fred_astaire), CSAttribute (case sensitive attribute) can be used to select the object with the same
name as the pattern provided.
The CSAttribute keyword treats all patterns in a case-sensitive manner.
FixedAttribute:
FixedAttribute is intended for use by tools. The pattern on the FixedAttribute line is actually a case sensitive name
in which any meta characters are treated as actual characters in the identifier.
The FixedAttribute keyword accepts an identifier, not a pattern, and does a case-sensitive match.
Validity Checking:
For both the CSAttribute and Attribute directives in the control file, the validity of the attribute name and the legality
of the value must be checked for both Verilog and VHDL based designs. For string valued attributes, the actual
check is done by the destined client of the attribute (for example the placement_force value will only be checked by
the appropriate fitter). The following example shows how Attribute, CSAttribute and FixedAttribute match with
Verilog and VHDL source code.
Pattern
Source
Identifier
VDHL Source
Match
Verilog Source
Match
mysig
Mysig
MYSIG
mySig
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
323
Pattern
Source
Identifier
VDHL Source
Match
Verilog Source
Match
mysig
Mysig
MYSIG
mySig
Yes
Yes
Yes
Yes
Yes
No
No
No
mysig
Mysig
MYSIG
mySig
Yes
Yes
Yes
Yes
Yes
No
No
No
See Also:
Control File
A comment begins with "--" and terminates at the end of the line.
The lines in the control file contain attribute, csattribute, or fixedattribute statements.
The line must start with one of the keywords: attribute, csattribute, or fixedattribute.
The syntax for the attribute, csattribute and fixedattribute statements in the control file are as follows:
attribute attribute_name [of] pattern [:] [object-class] [is] value ;
csattribute attribute_name [of] pattern [:] [object-class] [is] value ;
fixedattribute attribute_name [of] identifier [:] [object-class] [is] value ;
All the words in the above lines except for the pattern and identifier are treated in a case-insensitive manner. The
pattern is interpreted as described in Control File Pattern Matching. The default object-class is a SIGNAL. However
object-class can be:
label
entity
module
architecture
signal
For VHDL designs, attribute statements can be present in both the control file and in the source. A control file
attribute will take precedence over the source file attribute. If there is a specific attribute in the source and a
matching attribute line in the control file, the attribute in the control file will take precedence.
A specifically applied attribute takes precedence over a hierarchically applied attribute.
324
Attribute_name:
Attribute_name is the directive name.
Patterns/Identifiers:
The name of the object upon which the directive is being placed can be specified as an identifier (simple,
extended/escaped) or as a pattern. Individual bits of an array are represented by enclosing the integer in
parentheses.
In the control file, Warp accommodates both VHDL extended identifiers and limited Verilog escaped identifiers. An
extended or escaped identifier always starts with a backslash. It is terminated with the first unescaped backslash if
it exists, or the first encountered white space if there is no trailing backslash terminator. A backslash within a VHDL
extended identifier is escaped by preceding it with another backslash.
In the case of Verilog escaped identifiers, no embedded backslashes are allowed in the control files. For example,
even though '\foo\bar ' is a valid escaped identifier in Verilog, it is not valid in the control file. The limited version of
the escaped identifiers are added as a convenience to the user and the recommendation is to always use VHDL
style extended identifiers.
Note Names with [ ] need to be replaced with wildcards instead of the [ ]. For example:
attribute placement_force of \Sync:genblk1[0]:INST\ : label is "U(0,0)2"
becomes:
attribute placement_force of \Sync:genblk1?0?:INST\ : label is "U(0,0)2"
Optional Keywords:
The keywords "of" and "is" are optional and are simply ignored.
Object-Class:
Object-class refers to the type of HDL object. If the object-class is not specified, a signal is assumed. For VHDL,
valid classes include entity, architecture, component, and label. The label class can be used to specify a directive
intended for a component instantiation. For Verilog, valid classes include module, label, and signal.
Directive Terminator:
A directive is terminated either with a new line, a semi-colon, or a comment.
Value:
Value is the value of the directive.
325
[c-c]
represents a single character in the given ASCII character range that has to be matched.
[0-9]
represents a single character in the given ASCII character range that has to be matched.
[ccc]
While constructing the pattern, the characters are treated as case sensitive. The matching still depends on the
attribute directive type (Attribute, CSAttribute). The pattern matching characters and wildcard constructs are treated
as character literals when enclosed in [ ]. The pattern matching is always a complete match.
326
Directives
Directives may be used to influence the implementation of a design. They are used in an iterative fashion to refine,
improve, or constrain the results of synthesis. Directives may be applied to components that have been either
instantiated in a schematic or inferred by the synthesizer from Verilog HDL code.
Target
Format
Location values
placement_force
Arbitrary logic
U(1,2)A
or
U(1,2,A)3
placement_force
Fixed function
F(Timer,3)
or
F(DFB,0)
placement_force
UDB component
U(3,2)
port_location
IO Port
PORT(2,3)
placement_group
Arbitrary logic
group_1
synchronization_needed
IO Port
AUTO
or
SYNC
or
NOSYNC
no_factor
Arbitrary logic
opt_level
Arbitrary logic
synthesis_off
Arbitrary logic
Placement Directives
Synthesis Directives
2 or 1 or 0
placement_force:
The placement_force directive aids in locking down signals and associated components to particular locations in
the fitter. Typically the fitter positions components in an optimal location on the device; however, you might want to
constrain the fitter to position components in specific locations.
attribute placement_force of signal_name : signal is "string";
attribute placement_force of component_name : label is "string";
The string is a location descriptor of either a programmable logic block, macrocell, UDB element, or fixed function
block. Each has its own format and meaning specific to the object being addressed.
For an element of a UDB (Datapath, status register, etc.), it can be constrained to a specific UDB. The
format to specify this is U(x,y) where x,y is the UDB row and column. For the attribute to be recognized,
the attribute must be assigned to the component using the version of the attribute with the label keyword for
it to have an effect. An example of this would be:
327
Note When specifying the location of a datapath chain, the attribute must be applied to the first datapath in
the chain for it to have an effect.
In the case of a set of random logic, it can be constrained to a specific PLD within a specific UDB. The
format to specify this is U(x,y)l where x,y is the UDB row and column and l is the PLD descriptor ("A"
or "B" to denote one of the two PLDs within a UDB). This will still allow the fitter to choose a macrocell
column that best fits the design layout. For the attribute to be recognized, the attribute must be assigned to
the output signal from the macrocell for it to have an effect. An example of this would be:
attribute placement_force of out_1 : signal is "U(2,4)A";
It is also possible to constrain a set of random logic to a particular macrocell column within a specific PLD
on a specific UDB. The format to specify this is: U(x,y,l)i where x,y is the UDB row and column, l is the
PLD descriptor ("A" or "B" to denote one of the two PLDs within a UDB) and I is the macrocell index within
the PLD. For the attribute to be recognized, the attribute must be assigned to the output signal from the set
of random logic for it to have an effect. An example of this would be:
attribute placement_force of out_2 : signal is "U(1,3,A)2";
The attribute should be applied directly to any fixed function components by referencing them by name
(instead of referencing a signal) by using the label keyword. The format for the label is
F(block_type,index), where the block_type is the keyword descriptor for the block, and index is the instance
of that block to use. The valid set of keywords are: CAN, Comparator, DFB, DSM, Decimator, EMIF, I2C,
SC, Timer, USB, VIDAC, Abuf, Lpf:
attribute placement_force of \Timer_1:TimerHW\ : label is "F(Timer,1)";
port_location:
The port_location directive maps the external signals of the design to pins on the target device based on the
location of that pin within the device, not on the package. The syntax for the directive is:
attribute port_location of bit_name : label is "string";
The format for the string to describe the location is PORT(port_index, pin_index) where port_index is the number of
the port on the device and pin_index is the pin within the port.
An example for this directive:
attribute port_location of Terminal_1 : label is "PORT(2,3)";
Note that when using this directive to fix the location of a logical port, the information should be applied to the first
pin of the port to have an effect.
placement_group:
The placement_group directive can be used to group a set of signals (that relate to arbitrary logic, not fixed function
components) and to ask the place and route tool to place these signals together. The place and route tool will
attempt to place all signals that have the same group identifier together in a minimal number of PLDs. The format
of this directive is:
attribute placement_group of signal-name : signal is "string" ;
The string used can be any user defined string that is used to uniquely identify a group (see examples below). The
328
group identifier is case insensitive. The following example will attempt to put the logic driving signal2 and signal3
together:
attribute placement_group of signal2: signal is "group1" ;
attribute placement_group of signal3: signal is "group1" ;
synchronization_needed:
The synchronization_needed directive can be used to modify the default synchronization behavior for the IOs of the
part. By default, IOs used as inputs are synchronized and IOs used for outputs are unsynchronized.
attribute synchronization_needed of signal-name : signal is "string" ;
attribute synchronization_needed of logical-port-name(pin-index) : label is "string" ;
The synchronization_needed attribute can take the value of a string. This string value can be one of AUTO, SYNC,
or NOSYNC. Examples of the use of the attribute would be:
attribute synchronization_needed of Terminal_1 : signal is "SYNC" ;
attribute synchronization_needed of dport_1(2) : label is "NOSYNC" ;
no_factor:
The no_factor directive prevents logic factoring within the Warp synthesis engine to prevent splitting said node.
attribute no_factor of signal_name : signal is value;
During the optimization phase, the Warp synthesis engine aliases signals which have identical drivers (equations).
Using this directive causes equations to bypass these two actions. This feature can be useful if the design
constraints cause certain identical logic to be duplicated or if the logic factoring algorithm is being overaggressive.
Examples:
This example prevents the signal my_signal from being aliased or from being factored.
attribute no_factor of my_signal : signal is true;
This example prevents all signals in my_module from being aliased or factored.
opt_level:
The opt_level directive instructs Warp on the amount of effort that should be spent optimizing certain signals.
attribute opt_level of signal_name : signal is integer;
The integer represents the amount of effort. Currently, there are three levels of effort (0, 1 and 2). An opt_level of 0
instructs Warp to turn off all optimization on said signal. This directive is also passed along to the PLD/CPLD fitters
which do the same thing. An opt_level of 1 causes Warp to perform a simple and quick optimization of equations.
An opt_level of 2 causes Warp to perform the highest level of optimization available. An opt_level of 2 is
recommended for all designs.
Example:
This directive disables all optimization on the signal my_signal.
attribute opt_level of my_signal : signal is 0;
329
synthesis_off:
The synthesis_off directive controls the flattening and factoring of expressions feeding signals for which the
directive is set to true. This directive causes a signal to be made into a factoring point for logic equations, which
keeps the signal from being substituted out during optimization.
attribute synthesis_off of signal_name : signal is value;
The synthesis_off directive can only be applied to signals. The default value of the synthesis_off directive for a
given signal is false. This directive gives the user control over which equations or sub-expressions need to be
factored into a node (i.e., assigned to a physical routing path).
When set to true for a given signal, synthesis_off causes that signal to be made into a node (i.e., a factoring
point for logic equations) for the target technology. This keeps the signal from being substituted out during
the optimization process. This can be helpful in cases where performing the substitution causes the
optimization phase to take an unacceptably long time (due to exponentially increasing CPU and memory
requirements) or uses too many resources.
Making equations into nodes forces signals to take an extra pass through the array, thereby decreasing
performance, but may allow designs to fit better.
The synthesis_off directive should only be used on combinational equations. Registered equations are
natural factoring points; the use of synthesis_off on such equations may result in redundant factoring.
Example:
This example sets the synthesis_off directive to true for a signal named sig1.
attribute synthesis_off of sig1:signal is true;
See Also:
Directives Editor
Control File
Generated Files
Upon a successful build, PSoC Creator generates various files that become a part of your design. These files are
listed in the Workspace Explorer under the Source tab. These files are specific to the device architecture (PSoC 3,
PSoC 4/PRoC BLE, or PSoC 5LP) and the selected compiler. The following lists and describes the files generated
from a build.
File(s)
Description
CyBootAsmIar.s
CyDmac.c /.h
CyFlash.c /.h
330
File(s)
Description
CyLib.c /.h
cypins.h
Contains the function prototypes and constants used for port/pin access and
control.
cyPm.c/.h
CySpc.c /.h
cytypes.h
Provides macros and defines to allow code to be written tool chain and
processor agnostic.
cyutils.c
cymem.a51
KeilStart.a51
Cm3Start.c/Cm0Start.c
PSoC3_8051.h /.inc
cm3gcc.ld/cm0gcc.ld
Cm3RealView.scat/Cm0RealView.scat
core_cm0.h or core_cm3.h
core_cmFunc.h and core_cmInstr.h
core_cm0_psoc4.h or
core_cm3_psoc5.h
PSoC 4/PRoC BLE or PSoC 5LP specific interrupt information for CMSIS
libraries.
CyBootAsmGnu.s
CyBootAsmRv.s
General
cydevice_trm.h
Defines all of the addresses in the configuration space of the device. These
addresses do not contain any context information related to instances drawn
in your design(s). You should not need to use any of these addresses
directly.
cydevice.h
cydevicekeil_trm.inc (PSoC 3)
Defines all of the addresses in the configuration space of the device for the
Keil assembler (AX51). These addresses do not contain any context
information related to instances drawn in your design(s). You should not
need to use any of these addresses directly.
Defines all of the addresses in the configuration space of the device for the
GNU assembler (gas). These addresses do not contain any context
information related to instances drawn in your design(s). You should not
need to use any of these addresses directly.
Defines all of the addresses in the configuration space of the device for the
Real View assembler. These addresses do not contain any context
information related to instances drawn in your design(s). You should not
need to use any of these addresses directly.
cydevicekeil.inc (PSoC 3)
331
File(s)
cydevicegnu.inc (PSoC 5LP / PSoC 4
/ PRoC BLE GCC)
cydevicerv.inc (PSoC 5LP / PSoC 4 /
PRoC BLE Real View)
Description
cydevicerv_trm.inc.
cyfitter.h
cyfitter_cfg.c
Implements the methods and logic necessary to configure the device before
main. You should not need to use anything implemented in this file.
cyfitter_cfg.h
cyfitterkeil.inc (PSoC 3)
cyfittergnu.inc (PSoC 5LP / PSoC 4 /
PRoC BLE GCC)
cyfitterrv.inc (PSoC 5LP / PSoC 4 /
PRoC BLE Real View)
project.h
This file includes all of the other header files found in this directory and its
sub-directories. It exists for convenience sake, allowing you to include all of
the generated headers with just one #include statement.
<project>.cyversion
Boot Component:
All design projects include a "boot" component to provide version control for all the boot firmware files, such as
CyDma*, CyFlash*, etc. The component is hidden in the Component Catalog by default, and it cannot be placed
onto a design. The files from the boot component get deposited into a folder named
"Generated_Source/<Architecture Name>/cy_boot" in the Workspace Explorer after a successful build.
Designs created with earlier releases of PSoC Creator will include earlier versions of the boot component, which
contains all the API files as they were. If updated API files are needed, use the Component Update Tool to upgrade
the boot component to the latest version.
Refer also to the System Reference Guide.
Component APIs:
The generated source will also include APIs for instantiated components (e.g., counter_1.c, counter_1INT.c,
counter_1.h), which will be listed in device-specific folders. If you do not want APIs generated for a specific
instance, use the built-in parameter CY_SUPPRESS_API_GEN. See Configure Component Parameters for more
information.
332
Results Files:
The Workspace Explorer also contains the Results tab, which contains the following files:
<project>.cycdx This contains XML information specific to component debug windows. This is used by the
debugger to determine what to display for the design. There is no reason for you to open or modify this file.
For more information about this file, refer to the Component Author Guide.
<project>.rpt This is the project report file. It contains information for how the device was programmed,
including a section on how the target device's resources were utilized. Advanced users can review the
information in this file to determine if there might be better ways to configure the design.
<project>_timing.html This is the Static Timing Analysis report. See Static Timing Analysis for more
information.
The Results tab may also contain various other files, including
<project>.cyfit This file is an internal database for PSoC Creator to hold data on the results of Code
Generation. A user will not interact with this file directly. It is regenerated each time the project is built.
<project>.elf This file contains debugging information for the GCC tool chains. A user will not interact with
this file directly.
<project>.ihx Intel HEX file produced by building the project, containing only the compiled design. A user
will not interact with this file directly.
<project>.hex Intel HEX file produced by combining <project>.ihx file with selected protection,
configuration, and initialization settings. A user will not interact with this file directly.
<project>.map This file is produced by the linker. It contains details on how the device's memory was
used, where functions and variables were placed and other details depending on the tool chain. A user will
not interact with this file directly.
<file>.lst Code listing file showing initial c code and generated assembly. A user will not interact with this
file directly.
<project>.omf This file contains debugging information output by the Keil toolchain. A user will not interact
with this file directly.
See Also:
Workspace Explorer
Component Catalog
Component Update
333
Project Files/Folders
The following are the project files and folders to include in source code control. There are two types of projects:
design and library. Design project files are contained in a folder named <project>.cydsn. Library project files are
contained in a folder named <project>.cylib.
As indicated in the following list, some files are common to both types of projects, while others are specific to
design projects only. As a general rule, include all of these files and subfolders in source code control.
: ': '
Setup Time: The minimum length of time that data must arrive at the input pin before the registers clock
signal is asserted at the clock pin.
Register-to-register Delay: Delay from the output of a register to the input of a register. The static timing
analyzer will compute the maximum frequency if both registers have the same clock.
For more information on design practices and strategies about how to best use the STA report, refer to Application
Note: AN81623.
Static timing analysis identifies delays in a designs digital logic and computes the maximum frequency for each
clock. The static timing analysis report shows the critical paths in the design that limit the clock frequency. If the
actual clock frequency exceeds the calculated maximum frequency, the report indicates a timing violation in the
design.
Static timing analysis only has access to the design during the build process, so it does not have knowledge of how
the elements of the design will be used or of any changes made dynamically (such as firmware that changes a
clock frequency). Because of these limitations, static timing analysis may issue warnings about paths that are not
actually problematic, because of the way the design is used. If you have verified that the path in question is not
334
used, you can safely ignore these warnings. For example, if a pin component is configured as "Digital Input &
Digital Output," static timing analysis may issue a warning about a path going to the output and then back in on the
input of the same pin component. If no configuration would ever result in this path being used, this warning can be
safely ignored.
Note It may not be safe to ignore these warnings. Please review the warnings in the Notice List Window and
address as necessary.
Static timing analysis does not have knowledge of how signals are generated or used outside the PSoC device. It
can display delays related to such signals, but cannot automatically find timing violations.
Report Layout:
The STA report contains a title, project information, various sections described under "Report Sections," and
expanding/collapsing links to information in those sections.
Project Information
Every STA report contains the following project information:
Device used
Device revision
Expanding/Collapsing Links
The links include:
Expand All This link expands all sections in the report, making the information visible.
Collapse All This link collapses all sections in the report, making only the section header visible.
Show All Paths This link expands the applicable section tables to show a multiline view of the full timing
path.
Hide All Paths This link collapses the applicable section tables to show only a single line for the timing path.
335
Report Sections:
The following sections may be included in the report. Except for "Timing Violations," any section that is empty will
not be included.
Timing Violation
Clock Summary
Register to Register
Input to Output
Input to Clock
Clock to Output
Source Clock
Destination Clock
Slack (ns)
Clock_1
Clock_2
-2.501
Clock_1
Clock_3
-3.458
Clock_2
Clock_3
-2.344
Clock_1
Clock_2
-0.127
Pin_3
Clock_1
Pin_3
Clock_2
Setup:
Hold:
Asynchronous:
Only one entry is included for each violating source / destination clock pair. The detail for each failing path is shown
in later sections. On the STA report, you can click on an entry in the table to jump to the specific details.
If a particular violation type is not present in the design, that header will not be present in the table. The one line
entry for each violating clock pair includes following fields:
336
Slack: The slack time of the failure. For a Setup or Hold violation, this is always a negative number
(indicating a violation). For an Asynchronous clock crossing violation, this field is left blank.
Domain
48.000 MHz
Unrestricted
Clock_1
24.000 MHz
21.845 MHz
Clock_2
12.000 kHz
22.387 MHz
Pin_3
Pin_3
18.000 MHz
18.000 MHz
45.239 MHz
Pin_5
Pin_5
Unknown
Unknown
21.764 MHz
Frequency
Unknown
The one line entry for each clock in the system has the following fields:
Clock: The name of this clock. The first entry is always BUS_CLK. The remaining entries are shown in
alphabetical order.
Domain: This is the Clock Domain to which this clock belongs. Clocks in the same domain are synchronous
to each other.
Nominal Frequency: This is the frequency that this solved by the tool from the desired frequency in the
design. It is the direct value of the source clock divided by the divider setting. There is no accommodation
for accuracy or jitter due to synchronization with MASTER_CLK. In the case of a clock where the frequency
cannot be determined (i.e. clock coming from a pin), the frequency is displayed as Unknown.
Required Frequency: This is the frequency at which paths using this clock must be able to meet timing.
This clock is the Nominal clock with the addition of worst case synchronization jitter.Required Frequency
(MHz): This is the clock frequency specified in the design. If this is an Asynchronous clock that doesnt
have a clock frequency property, it is displayed as "Unknown".
Maximum Frequency: This is the frequency at which this clock can safely run. It is calculated based on the
slowest path in the design that impacts this clock. If a clock is not restricted N/A will appear in this column.
Violation: There are two possible violations: "Frequency" or "Unknown." Frequency is shown when the Max
Frequency is less than the Required Frequency. Unknown is shown when the Required Frequency is
unknown. These violations are shown in red. If there is no violation, this field is blank.
337
Setup Subsection
This subsection is further divided into Source clock and then Destination clock. Each of these clocks is listed in
alphabetic order. If the negative edge of the clock is used that is considered a distinct clock and the negative edge
is denoted along with the clock name.
The Source clock heading lists the Source clock name and required frequency. For example:
Source clock: Clock_1 (Required Freq. 24.000 MHz)
The Destination clock heading lists the Destination clock name and required frequency. It also includes the
requirement for the path delay. This is dependent on the combination of the source and destination clocks. It can be
impacted by the use of opposite clock edges or different clocks that are synchronous to BUS_CLK. For example the
following destination clock is different from the source clock, but both are synchronous to BUS_CLK, which in this
example is running at 48 MHz.
Destination clock: Clock_2 (Required Freq. 12.000 MHz)
Path Delay Requirement: 20.833ns (48 MHz)
The following is an example of three timing paths with the second entry expanded to show the complete path.
Source
Delay
(ns)
Slack
(ns)
Violation
12.500
-2.500
SETUP
9.091
0.909
Type
Destination
FMax
(MHz)
Delay (ns)
macrocell U(3,1)
dff_reg1
.cr_clk
.q
Route
dff_reg1
.q
.main_0 3.608
macrocell U(3,2)
Net_5
.main_0 .mc_d
2.810
macrocell U(3,2)
Net_5
Setup
0.875
Skew
0.548
Clock
1.250
8.696
1.304
The one line entry for each path has the following fields:
FMax (MHz): The maximum frequency based on this specific path in MHz (this is 1/Delay).
Delay (ns): Delay along the path in ns including the setup time and any clock skew.
Slack (ns): Slack is the (Path Delay Requirement - Actual Delay). Display any slack less than 0 in red.
Violation: The only violation type is "SETUP". Display "SETUP" in red for negative slack and nothing in the
field otherwise.
Entries are listed from the least slack to most slack. All paths that violate setup time are included in the report. After
that, up to another 10 entries are shown for each clock pair.
338
Each single line entry can be expanded to show a detailed complete path. Each entry includes the following fields:
Macrocell
Datapath
Location: This is the location of the cell indicated in the type field. It is present for all types except Route
and Clock.
U(x,y): Format for all cells in the UDB array (x,y are the coordinates of the UDB)
Pi[j]: Format for a pin (i is the port number and j is the pin number within the port)
Fanout: This indicates the fanout of the signal. This is expected to be 1 except for Routes where it should
indicate the number of destinations driven by this same signal.
Instance/Net: This is the Instance or Net name associated with this piece of the route.
Note Macrocell names might not match the original component name. The fitter may combine macrocells
with other nets and macrocells. This process can cause some name information to be lost. Macrocells that
have been combined with nets may inherit the net name, such as "Net_73".
Source and Dest: These are the source and destination pins on the cells at both ends of this portion of the
route. The destination field is also used by itself (source empty) for some special cases:
Setup: Special case included at the end of each setup path to indicate the setup required to the register.
Skew: Special case included only for routed clocks (Global clocks do not get a skew entry).
Delay: Incremental delay in ns for this portion of the overall path. The sum of all the incremental delay
entries must equal the Delay in the one line summary.
Hold Subsection
This subsection is further divided into Source clock and then Destination clock. Only source / destination pairs are
present when at least one of those clocks is a routed clock. The naming and ordering of the subsections is the
same as those in the "Setup" subsection, except that clock frequency is not included for the Source and Destination
headings. For example:
Source clock: Clock_1
Destination clock: Clock_2
339
The following is an example of three timing paths with the second entry expanded to show the complete path.
Source
Destination
Slack (ns)
Violation
dff_reg1:macrocell.mc_q
Net_5:macrocell.mc_d
-0.541
HOLD
dff_reg1:macrocell.mc_q
Net_6:macrocell.mc_d
2.965
Type
Location
Fanout
Instance/Net
Source
Dest
Delay (ns)
macrocell U(3,1)
dff_reg1
.cr_clk
.q
1.000
Route
dff_reg1
.q
.main_0
3.122
macrocell U(3,2)
Net_5
.main_0
.mc_d
2.523
macrocell U(3,2)
Net_5
Hold
-0.120
Skew
-3.560
Clock
dff_reg1:macrocell.mc_q
Net_7:macrocell.mc_d
5.234
The one line entry for each path is the same format as the "Setup" subsection entries, with the following changes:
Slack is calculated in the same way that Delay is calculated for "Setup." It is the sum of all the Delay entries
present in the detailed path.
Entries are listed from the least slack to most slack. All paths that violate hold time are included in the subsection.
After that, up to another 10 entries are shown for each clock pair.
Each single line entry can be expanded to show a detailed complete path. Each entry is similar to those in the
"Setup" section, with the following changes:
Delays are calculated based on a best case path instead of a worst case path
Hold: Special case included at the end of each hold path to indicate the hold required to the register.
Positive hold requirements are indicated with a negative number such that the sum of the incremental
delays totals to be the slack time.
Skew: Always present since without clock skew there cant be a hold time violation in this architecture.
Delay: Incremental delay sums to the slack time. The sign of the Hold and Clock skew entries needs to be
such that these entries sum properly for that calculation.
340
The following is an example of three timing paths with the second entry expanded to show the complete path.
Source
Destination
Delay (ns)
dff_reg1:macrocell.mc_q
Net_5:macrocell.mc_d
12.500
dff_reg1:macrocell.mc_q
Net_6:macrocell.mc_d
9.091
Type
Location
Fanout
Instance/Net
Source
Dest
Delay (ns)
macrocell U(3,1)
dff_reg1
.cr_clk
.q
1.250
Route
dff_reg1
.q
.main_0
3.608
macrocell U(3,2)
Net_5
.main_0
.mc_d
2.810
macrocell U(3,2)
Net_5
Setup
0.875
Skew
0.548
Clock
dff_reg1:macrocell.mc_q
Net_7:macrocell.mc_d
8.696
The one line entry for each path is the same format as the Setup entries with the following changes:
Delay is calculated to provide information to the user, but it is not used to compute whether a timing
requirement is met.
Entries are listed from the most delay to least delay. Up to 10 entries are shown for each clock pair.
Each single line entry can be expanded to show a detailed complete path. The detailed entries for the path are
identical to the entries that are present for Setup.
341
Destination
Delay (ns)
Pin_3(0):iocell._fb
Pin_4(0):iocell.pad_out
56.823
Pin_3(0):iocell._fb
Pin_6(0):iocell.pad_out
54.113
Type
Location
Fanout
Instance/Net
Source
Dest
Delay (ns)
Pin
P5[6]
Pin_3(0)
.pad_in
.fb
15.258
Route
Net_3
.fb
.main_0
5.714
macrocell U(3,2)
Net_4
.main_0
.q
3.350
Route
Net_4
.q
.input
6.297
Pin_6(0)
.input
.pad_out
23.495
Pin
P5[2]
Pin_5(0):iocell._fb
Pin_6(0):iocell.pad_out
42.696
The one line entry for each path has the following fields:
Each single line entry can be expanded to show a detailed complete path. The detailed entries for the path are
identical to the Setup entries, except that the special case entries for clock skew and setup are never present.
342
The following is an example of three timing paths with the second entry expanded to show the complete path.
Source
Destination
Delay (ns)
Pin_3(0):iocell._fb
Net_7:macrocell.mc_d
31.763
Pin_3(0):iocell._fb
Net_6:macrocell.mc_d
24.657
Type
Location
Fanout
Instance/Net
Source
Dest
Delay (ns)
Pin
P5[6]
Pin_3(0)
.pad_in
.fb
15.258
Route
Net_5
.fb
.main_0
5.714
macrocell U(3,2)
Net_6
.main_0
.mc_d
2.810
macrocell U(3,2)
Net_6
Setup
0.875
Pin_5(0):iocell._fb
Net_6:macrocell.mc_d
22.376
The longest path from each input to the clock is shown with a single line entry. These entries are ordered from
longest to shortest. These entries are similar to the "Input to Output" section, except there is a setup entry for each
path.
343
The following is an example of three timing paths with the second entry expanded to show the complete path.
Source
Destination
Delay (ns)
dff_reg1:macrocell.mc_q
Pin_4(0):iocell.pad_out
43.873
dff_reg1:macrocell.mc_q
Pin_6(0):iocell.pad_out
30.459
Type
Fanout
Instance/Net
Source
Dest
Delay (ns)
macrocell U(3,1)
dff_reg1
.cr_clk
.q
1.250
Route
dff_reg1
.q
.input
5.714
Pin_6(0)
.input
.pad_out
23.495
Pin
Location
P5[2]
dff_reg2:macrocell.mc_q
Pin_6(0):iocell.pad_out
29.745
The longest path from a clock to each output is shown with a single line entry. These entries are ordered from
longest to shortest. These entries have the same expansion capability and all the same fields as the "Input to
Output" section.
Destination
Type
Delay (ns)
Pin_9(0):iocell._fb
Pin_6(0):iocell.pad_out
TURNON
49.625
Pin_9(0):iocell._fb
Pin_6(0):iocell.pad_out
TURNOFF
49.625
Type
Location
Fanout Instance/Net
Source
Dest
Delay
(ns)
Pin
P3[5]
Pin_9(0)
.pad_in
.fb
15.258
Route
Net_26
.fb
.main_0
5.714
macrocell U(2,1)
tmpOE__Pin6_net_0
.main_0
.q
3.350
Route
tmpOE__Pin6_net_0
.q
.oe
6.331
Pin_6(0)
.oe
.pad_out
18.972
Pin
P5[2]
344
In order to distinguish these two entries an additional field is added to the one line entry:
Type: Either TURNON or TURNOFF depending on whether the output is enabled or disabled.
Destination
Type
Delay (ns)
dff_reg3:macrocell.mc_q
Pin_6(0):iocell.pad_out
TURNON
22.869
dff_reg3:macrocell.mc_q
Pin_6(0):iocell.pad_out
TURNOFF
22.869
Type
Fanout
Instance/Net
Source
Dest
Delay (ns)
macrocell U(1,1)
dff_reg3
.cr_clk
.q
1.250
Route
dff_reg3
.q
.oe
5.714
Pin_6(0)
.oe
.pad_out
15.905
Pin
Location
P5[2]
In order to distinguish these two entries an additional field is added to the one line entry:
Type: Either TURNON or TURNOFF depending on whether the output is enabled or disabled.
See Also:
Generated Files
Workspace Explorer
Syntax:
cyprjmgr
[-h]
[-ver]
[-wrk <workspace_name>]
[-clean]
[-build]
[-rebuild]
[-archive <archive_level> <archive_as_zip>]
345
[-t <toolchain>]
[-c <config>]
[-p <TopProject>]
[-n <TopDesign>]
[-d <selectedDev>]
[-m <paramsFile>]
[-import <Source_Project> <Source_Component>]
[-rename <component_name> <new_name>]
[-delete <component_name>]
[-exclude <component_name>]
[-s]
[-v <visibility>]
[-prj <Target_Project>]
[-cmp <Target_Component>]
[-addprj <prj_path>]
[-cp <path>]
[-con <Target_Project>]
[-batch <file_name>]
[-updateComp <source_project> <source_component>]
[-updatePrj <source_project>]
[-updateInst]
[-updateDWInst]
[-forceWrite]
[-noCustBuild]
[-noRefresh]
[-ol <compiler optimization level>]
[-warn <High|Low|None>]
[-buildPreCompCust <Project>]
[-updateInstIfNeeded]
[ignoreDepsWarning]
[-export <IDE>]
All other arguments are optional and will be used to set up the build environment. All the optional
arguments will apply to the workspace followed by the w or -wrk switch.
Options:
The following table lists and describes the various optional arguments:
Argument
Description
-wrk, -w
-prj
Specifies the target project on which all the command line options will be targeted. In case target
project is not specified, Top Project of the workspace becomes the target project
-cmp, -o
Specifies the target component on which all the library options will be targeted. In case target
component is not specified, the Top Block of the Target Project becomes the Target Component
The following four options target the entire workspace unless the target project is set with -prj:
-clean
-build
-rebuild
346
Argument
Description
-archive
Archives the workspace/project with different archiver levels (complete/typical), and as zip or
nozip
-h
-ver
-t
Sets the tool chain the action should use (Keil, ARM etc.)
-c
-ol
-warn
-p
-n
-d
Sets the selected device of the Target Project that will be built
-m
Parameters file that will override the default parameter values of the schematic in the TopDesign
of the Top Project
-import
Imports the Source Component from the Source Project into the target project of the workspace
-rename
-delete
-exclude
-l
Adds a new empty library project with name <NewPrjName> to the workspace
-s
-v
-addprj
-cp
Copies the entire workspace to the location specified by <path>, all command line options will act
on the copy created
-con
-batch
Reads a file containing a series of commands, one on each line. Executes the commands one by
one. When batch option is used, all other optional switches are ignored
-updateComp
-updatePrj
-updateInst
-forceWrite
-noCustBuild
Delay building of customizer DLLs until the end (e.g., during imports)
-noRefresh
Disable updates from the refresh manager (Use with extreme care)
-buildPreCompCust
-updateDWInst
Exports the project to the target IDE. Valid targets are EWA, Eclipse and uVision
347
Breakpoints
Open documents
-c <config name> (defaults to value in workspace user file, if no user file defaults to Debug)
Other options:
There are other options that are not necessary, as the information is available to the workspace/project when a
build happens, but which you can control through the command line. They are as follows:
-d - Sets the selected device of the Target Project that will be built
348
This option will clean/build/rebuild the workspace respectively. Only one out of clean, build, or rebuild can be used
in one run of the tool.
-h
cyprjmgr.exe h
t
cyprjmgr.exe w workspace build t ARM CM3-GCC 4.9-2015-q1-update
This will build the workspace with the toolchain specified. If no toolchain is specified by the user, the workspace will
build with the toolchain, with which it was built the last time.
c
cyprjmgr.exe w workspace build c Release
This will build the workspace with the build config specified (Release, in this example)
p
cyprjmgr.exe w workspace -build p Design01
This will set the project Design01 in the workspace as the Top Project and build the workspace
n
cyprjmgr.exe w workspace build n component01
This will set the component component01 in the Top Project of the as the Top Component and build the workspace
d
cyprjmgr.exe w workspace build d CY8C3866AXI-040
This option will set the device for all Projects in the workspace and build it.
cyprjmgr.exe w workspace build d CY8C3866AXI-040 prj Design01
This option will set the device for the target project and build it.
cyprjmgr.exe w workspace build d CY8C3866AXI-040 t DP8051-Keil Generic prj
Design01
This switch sets the device and toolchain for the target project Design01.cyprj and builds it
-rev
cyprjmgr.exe w workspace rev ES1
This switch sets the revision of the selected device for all the Projects in the workspace.
cyprjmgr.exe w workspace build
d CY8C3866AXI-040
This option sets the device revision to ES1 for the target project Design01.cyprj and builds it.
349
m
cyprjmgr.exe w workspace build m params_file
This option will read in parameters and their values from a text file, and override those values in the schematic.
Format of the params file :
The params file accepts parameters and their values as name=value pairs. The name of the instance must
be given as inst_name=value.
For example,
inst_name=and_1
NumTerminals=8
TerminalWidth=4
inst_name=Counter_1
Resolution=16
This will change the values of parameters NumTerminals and TerminalWidth in the instance and_1, and
Resolution in the instance Counter_1.
prj
cyprjmgr.exe w workspace prj Project01
This option sets Project01 in the Workspace as the Target Project. All library options on the same command line will
act on Project01. If no Target Project is selected, the Top Project of the Workspace becomes the Target Project.
cyprjmgr.exe w workspace build prj Project01
This option overrides build to work only with Project01 (only if Project01 is in workspace) and its dependencies
instead of building the entire workspace. This is equivalent to selectively building a project in the GUI.
o, -cmp
cyprjmgr.exe w workspace o Component01
cyprjmgr.exe w workspace -cmp Component01
This option sets Component01 as the Target Component in the Target Project. All library options on the same
command line targeting a component will act on the Target Component. If no Target Component is selected, the Top
Component of the Target Project becomes the Target Component.
import
cyprjmgr.exe w workspace import SourceProject SourceComponent
This option will import the Source Component from the Source Project to the Top Project of the workspace.
cyprjmgr.exe w workspace import SourceProject SourceComponent prj TargetProject
This option will import the Source Component from the Source Project into the Target Project of the Workspace.
350
rename
cyprjmgr.exe w workspace rename ComponentName NewComponentName
This option will rename the Top Component in the Top Project from ComponentName to NewComponentName.
cyprjmgr.exe w workspace rename ComponentName NewComponentName prj Project01
This option will rename the Top Component in Project01 of the Workspace
cyprjmgr.exe w workspace rename ComponentName NewComponentName prj Project01 o
Component02
delete
cyprjmgr.exe w workspace delete Component01
This option removes Component01 of the Top Project of the Workspace from the disk.
cyprjmgr.exe w workspace delete Component01 prj Project01
This option removes Component01 of Project01 of the Workspace from the disk.
exclude
cyprjmgr.exe w workspace exclude Component01
This switch removes the Component01 instance from the Top Project of the Workspace.
cyprjmgr.exe w workspace exclude Component01 prj Project01
This switch removes the Component01 instance from Project01 of the Workspace.
l
cyprjmgr.exe w workspace l LibraryName
s
cyprjmgr.exe w workspace s
This option lists the external dependencies of the Top Project in the Workspace.
cyprjmgr.exe w workspace s prj Project01
v
cyprjmgr.exe w workspace v false o Component01
This option will set the visibility of symbol Component01 in the Top Project of the Workspace to false.
cyprjmgr.exe w workspace v false o Component01 -prj Project01
351
This option will set the visibility of the symbol Component01 in Project01 of the Workspace.
addprj
cyprjmgr.exe w workspace addprj Project01
con
cyprjmgr.exe w workspace con
This option checks the consistency of the Top Project of the Workspace. That is:
There is no file in the Target Project folder that the project does not know about.
All files that the project knows about, are at the location pointed by their Canonical Name property.
cp
cyprjmgr.exe w workspace cp NewLocation
This option will copy the entire workspace folder to NewLocation. All other options given on the same command line
will now act on the NewLocation Workspace.
-ver
cyprjmgr.exe -ver
-batch
cyprjmgr.exe w workspace batch file_name
This option reads a text file that has a series of CyPrjMgr commands, one per line. The CyPrjMgr tool reads each
line, executes the command, and if successful goes to the next command. If a command fails, the tool exits with
failure message.
When batch is used, all other optional switches on the command line are ignored.
-updateComp
cyprjmgr.exe w workspace -updateComp source_project source_component
This option updates the component in the Top Project of the workspace.
cyprjmgr.exe w workspace prj Project01 - updateComp source_project source_component
352
The tool looks for a component in the target project with the same base name as the source component. If
it does not find, the component is imported to the target project.
If it finds the target component, it compares the files in the source component to the corresponding file in
the target component in the following way :
If there is any file in the source component that does not exist in the target, UPDATECOMP.
If a file with the same name as in source exists in the target component, the contents of the two files
are compared. If their contents are different, UPDATECOMP.
UPDATECOMP : Remove the target component from the target project. Import the source component into the
target project.
-updatePrj
cyprjmgr.exe w workspace updatePrj source_project
The toolchains of the source project and target project are compared. If they are different, UPDATEPRJ.
From the confirmed identical toolchains, compare the source project toolchain settings with its counterpart
in the target project. If they are different, UPDATEPRJ.
Compare the non-component files of the source project with the target project (i.e., main.c, .cydwr file,
.cyprj file). If any of these is different form its counterpart. UPDATEPRJ.
UPDATEPRJ : The target project is removed from the workspace and its directory is deleted. The source project
and all its files/folders/components are copied in place of the target project and the project is added to the
workspace.
-archive
cyprjmgr.exe w workspace archive complete zip
This archives only project Design01 with typical archive level. The archived project will be exact replica of the
source project (in the example shown above, Design01 is the source project).
The archive of the workspace/project is based on the following rules:
It archives the whole workspace if no target project provided, else it archives only the sprcified project.
353
Two different level of archive available, complete and typical. Using complete archive level the whole
project/workspace is archived whereas with typical archive level only.
There is an option available to archive as zip or nozip, which allows the user to archive into zip or just the
copy of the content.
-updateInst
cyprjmgr.exe w workspace updateInst
This switch updates all the instances of the components on the schematic including the boot component for the
project, for all the projects in the specified workspace with the latest versions of the components available.
cyprjmgr.exe w workspace updateInst prj Design01
This switch updates all the instances of the components on the schematic including the boot component for the
target project Design01 with the latest versions of the components available.
Update instance of the workspace/project is based on the following rules
It updates all instances on the schematic with the latest component instances.
If a target project is provided, it updates the instances of the components in the specified project only. If the
project is not specified,,it updates all the projects in the workspace with instances of the latest versions of
all the components.
-forceWrite
cyprjmgr.exe w workspace d CY8C3866AXI-040 forceWrite
This switch sets the device for all the Projects in the specified workspace, even if the workspace and projects are
read-only.
Force writing of the workspace/project is based on the following rules:
The workspace and project files are made writable if they are read-only
Any other switch passed to the cyprjmgr tool, which changes files, need to use this option to save the
changes to read-only files.
If this option is not provided changes will not be saved on read-only files.
-noCustBuild
cyprjmgr.exe w workspace -build noCustBuild
This switch delays the building of the customizer DLLs until the end.
-noRefresh
cyprjmgr.exe w workspace -build noRefresh
This switch disables the refresh manager while building the project.
-buildPreCompCust
cyprjmgr.exe w workspace -build buildPreCompCust project
This switch builds customizer for a specific project the building of the customizer DLLs until the end.
354
-updateDWInst
cyprjmgr.exe w workspace -build updateDWInst
This switch updates the instances on the schematic to the latest version
-ol
cyprjmgr.exe w workspace -build ol level
This switch sets the compiler optimization level. The level is compiler specific.
-warn
cyprjmgr.exe w workspace -build warn[High|Low|None]
-updateInstIfNeeded
cyprjmgr.exe w workspace -build updateInstIfNeeded
-ignoreDepsWarning
cyprjmgr.exe w workspace -build ignoreDepsWarning
-export
cyprjmgr.exe w workspace -export uVision
Syntax:
cyhextool -o <out.hex> -f <in.hex> -id <XXXXXXXX>
[-ecc <ON|OFF|HexFile>] [-cunv <XXXXXXXX>] [-wonv <XXXXXXXX>] [-ee <eeprom.hex>]
[-prot <protect.hex>] [-a <PROGRAM={0},...>]
355
Normal Options:
The following table lists and describes the various arguments for normal projects:
Argument
Description
-o <out.hex>
-f <in.hex>
Specify input file name (required). This file is normally produced by the linker.
-id XXXXXXXX
-ecc <ON|OFF|HexFile> Enable ECC (ON), disable ECC (OFF), or specify a user-defined Intel hex file to program the
ECC bits. If this option is omitted, ECC will be disabled.
-cunv <XXXXXXXX>
Specify hexadecimal customer NV latch data (4 bytes for PSoC 3/PSoC 5LP only). The
default is all zeros.
-wonv <XXXXXXXX>
Specify hexadecimal write-only NV latch data (4 bytes for PSoC 3/PSoC 5LP only). The
default is all zeros.
-ee <eeprom.hex>
-prot <protect.hex>
Specify user-defined Intel hex file to program Flash protection bits (64 bytes for PSoC
3/PSoC 5LP only). The default is all zeros.
-a <PROGRAM={0},...>
-meta XXXX>
Specifies the metadata (debugging enabled, silicon rev). The meta value is always exactly
two bytes.
-rev <XX>
Bootloader/Bootloadable Options:
The following table lists and describes the various additional arguments for bootloader projects:
Argument
Description
-acdStart <XXXX>
-e <XXXX>
-blsize <path to file> Specifies the file containing the address of the bootloader size
-blChkType <X>
-blVer <XXXXXXXXXX>
-flsLine <XXX>
-arraySize <XXXXX>
356
Input:
The input hex files (program, protect, config) should be in Intel hex format. All input files should begin at address 0.
The cyhextool program will automatically add an offset to the addresses to match the address map specified in the
following table or the address map specified on the command line.
Name
CUNVLAT
000080
WONVLAT
0000F8
EEPROM
008000
None
CONFIG
080000
None
PROTECT
0C0000
None
PROGRAM
100000
None
CHECKSUM
200000
N/A
The -a option controls the address map. The argument of the -a option consists of a comma separated list of
NAME=VALUE pairs. Each name corresponds to a section of the output file. The value is the address of the
beginning of the section in hexadecimal. Optionally, VALUE may be ADDRESS:SIZE where ADDRESS is the
hexadecimal address and SIZE is the hexadecimal size of the section. If the size is specified, cyhextool will
produce an error message if the input data for that section exceeds the section size.
Output Format:
The output format is expected to be compatible with the format specified under Input. The first line of the output file
contains a header for the programmer. The PROGRAM, PROTECT, CONFIG (ECC), and EEPROM data will be
aligned to 64-byte boundaries with zero-padding so that each line file will correspond to a Flash row. The checksum
is calculated using the following steps:
1. Find the mod-65536 (16-bit) sum of all of the data bytes in the PROGRAM section.
2. Find the mod-256 sum the MSB and LSB of the result from step 1 and the constant 2.
3. The checksum is the twos complement of the result from step 2. The checksum will be between 0x00 and
0x100, so it is represented with two bytes.
Toolchain Support:
The makefile runs the cyhextool program after the linker finishes. If the linker does not produce an Intel hex file
directly, the makefile generator will add commands to convert the output file to Intel hex format.
Keil
Keil uses the OMF or OMF2 file format. Keils OH51 or OHX51 tool may be used to convert OMF/OM2 files to Intel
hex format:
OH51 program.omf
357
Description
-h
-V
-C <file.elf>
-S <file.elf>
-P <file.elf>
--flash_row_size <bytes>
--flash_size <bytes>
--size_var_name <name>
--checksum_var_name <name>
[--ignore offset <bytes>]
-E <file.elf>
--flash_row_size <bytes>
--flash_size <bytes>
Creates a *.c file with the bootloader's Flash, Flash Protection, Customer NVL,
Write Once NVL, EEPROM, Chip Protect, Meta, and Bootloader Meta. It also
outputs the NVL section on the console out.
-B <file.elf>
--flash_row_size <bytes>
--flash_size <bytes>
--flash_array_size <bytes>
[-ee_array <arrayNum>]
-M <inputFile1.elf>
<inputFile2.elf>
<outputFile.elf>
--flash_row_size <bytes>
--flash_size <bytes>
Same as -C option, plus merge inputFile1 & inputFile2 into a single file, output
as outputFile. Excluding the flash data and bootloadable metadata, inputFile1 &
inputFile2 must have the same sections with matching content.
The cyelftool inserts or updates the following sections of the post-link .elf file:
.cychecksum - All devices, contains the checksum of the flash portion of the application
.cyloadermeta - All devices. The tool will update the section with the bootloader checksum and size
information for a bootloader project.
358
.cymeta - All devices. The checksum field will already have the silicon ID so that the cyelftool only needs to
read the value, update it with the checksum, and write it back to the .elf file
.cyloadablemeta (.cyloadable1meta/.cyloadable2meta) - All devices. The linker flow will populate all but the
Application Checksum, Application Entry Address, and Application Length in these sections. The tool will
need to compute these missing items and insert them into the post-link .elf file.
Keil Compiler
PSoC Creator includes the Keil compiler. It is a fully functional C compiler that is limited to level 5 optimization. If
you need better optimization, you can upgrade by contacting Keil.
This Keil compiler will work as is for 30 days, at which time it becomes "Code Size Limited." This means it cannot
link a program larger than 2k. To resolve the code size limited issue, you must register the compiler. Registration is
free. It only requires that you complete an online form.
The second field should also be automatically competed. It should contain the code: IKA1P-M6Q0E8W7ST.
3. Enter all other required values as necessary then press the Submit button.
4. You will be sent a value via email to enter in the LIC field in the Keil Registration dialog. Bring the dialog back
up and paste the new LIC value into the "New License ID Code (LIC)" field and press the "Add LIC" button.
5. Your LIC will be added and you will have a fully registered version of the Keil compiler.
If you have any problems with the above registration process, try using the Keil Vision3 application. Open the
registration dialog by selecting License Management under the File menu.
See Also:
Keil documentation
359
The *.cyre file opens in the code editor. The file is named based on the project and cannot be renamed without
renaming the project (similar to the DWR file).
360
Modified function:
void Foo(void) CYREENTRANT;
Modified function:
void `$INSTANCE_NAME`_Foo(void) `=ReentrantKeil($INSTANCE_NAME . "_Foo")`;
In this case, the function MyFunc, which is in the file main.c, is being called from two different concurrent execution
flows. The first caller, denoted ?C_C51STARTUP, is the main flow of execution that originates from the main()
function. The second caller is the ISR_1 interrupt that is in the isr_1.c file.
See Also:
Keil Compiler
361
The IDE Export Wizard dialog provides support for developing application firmware in 3rd party development
environments. Once the design has been exported, you can write, debug, and test firmware in your preferred
environment.
The export process supports the generation of new projects, as well as updates to existing ones. With the update
option, you can make last-minute changes to the hardware and quickly update your project.
362
IMPORTANT All devices using 3rd party programmers except Vision using MP3 require that the project exported
to the appropriate IDE have a System Editor Debug Select value of anything other than GPIO. If a project with
Debug Select set to GPIO is exported, it will be able to program only one time. Subsequent attempts to program
via the 3rd party will fail. This is a limitation of the ARM standard acquire sequence, which is not aware of the
special acquire sequence used by Cypress for our devices.
Notes
If the project has not been built, you will be prompted to build it.
When using the Eclipse IDE, you do not need a full PSoC Creator installation during firmware development.
You must have a Java JRE or JDK installed (Java version 6 or higher).
You must have a GCC ARM compiler installed. The GNU Tools ARM Embedded toolset is available at
https://launchpad.net/gcc-arm-embedded.
You must install Eclipse CDT from http://www.eclipse.org/cdt. Look for the "Eclipse C/C++ IDE" download
package. The Eclipse Juno SR2 and later releases support the Cypress-provided Eclipse feature.
If you are running a 32-bit operating system, download the 32-bit version of Eclipse.
363
If you are running a 64-bit operating system, you should download the version of Eclipse that matches
the Java runtime version that you have installed; that is, 32-bit Eclipse for 32-bit Java or 64-bit Eclipse
for 64-bit Java.
You must also have the new Cypress-provided Eclipse feature (com.cypress.psoccreatorimport) installed,
which provides the following functionality:
Speeds the creation of an Eclipse project associated with a PSoC Creator design with a new PSoC
Creator project type and pre-populating tool chain build options.
Provides project resource synchronization between PSoC Creator and Eclipse. Changes made in the
set of files that constitute a project in PSoC Creator are reflected in subsequent builds in Eclipse.
In Eclipse, select Help > Install New Software to open the Install dialog.
Check the Contact all update sites during install to find required software check box in the Details
section of this dialog.
364
Select the Add button at the top of the dialog to open the Add Repository dialog.
Click Archive and browse to the location where you saved the Cypress-provided Eclipse plugin zip
file that you downloaded above. Select the file and click Open; then click OK.
Back on the Install dialog, select the check box next to "PSoC Creator Import Feature" and then click
Next >.
The next wizard page summarizes the features you are about to install. Click Next > and read and
accept the license for this feature.
Click Finish to install the plugin. There might be a warning about the software not being signed; click
OK.
In order to use the Segger J-Link debug probe, you must download the Segger J-Link toolset from
http://www.segger.com/jlink-software.html. You will need release 4.74 or later.
Note The Eclipse IDE option is not available for PSoC 3 projects.
The process is simple. The next step is to confirm that you want to export the design. Click Export.
365
Use the Copy project path to Clipboard button to copy the project folder path so you can paste it in the
Eclipse New Project dialog as the location path.
Select the Open Eclipse Export Documentation option to display this document.
Select the Open containing folder option to open a folder showing all the files that were exported.
Select the appropriate options and click Finish to complete the export process.
Notes:
The project folder created in Eclipse shares file system folders with the original PSoC Creator project. This
is required so that changes to merge regions in any component files made within Eclipse by a firmware
developer can be seen within PSoC Creator during any subsequent updates, and vice versa.
When deleting a project in Eclipse, do not check the Delete project contents on disk check box. This will
remove the file system folder contents, making them unavailable in PSoC Creator as well.
366
On the wizard's C Project page, under Project Type > Others, select "PSoC Creator Project."
Note In Eclipse releases earlier than the Luna release, the Others category does not exist. The "PSoC
Creator Project" entry can be found in the Project Type list as shown.
For the project location, uncheck the Use Default Location check box, browse to and select your
PSoC Creator project's top-level folder (the one ending in .cydsn). This allows PSoC Creator and
Eclipse to share the same source files.
2. Click Next to move to the Select Configurations wizard page. No changes are needed here. Click Next again.
3. On the Cross GCC Command wizard page:
Set path by navigating to the bin folder of your compiler's install directory, where you can find armnone-eabi-gcc.exe. This is typically found using the following path:
367
<ARM_tools_install_path>/bin
(Look for arm-none-eabi-gcc.exe and not gcc.exe.)
Note You can use the ARM GCC installation included in PSoC Creator, if you have PSoC Creator
installed.
The newly created PSoC Creator project in Eclipse includes toolchain settings, accessible in the Project
Explorer pane.
4. Right-click the project name and select Properties > C/C++ Build > Settings.
5. Then select the Tool Settings tab.
These settings are driven by the project's PSoC device. Certain options will be different depending on whether the
project is for a PSoC 4/PRoC BLE or PSoC 5LP device. (The pre-populated option settings are listed in the Project
Build Settings section at the end of this document in case you decide to change them and later want to restore
these values. These values are set by default; you typically do not need to modify them for your project.)
368
Without 'make', you need to adjust your project build settings to use the Eclipse internal builder instead.
1. Right-click the project name and select Properties > C/C++ Build.
2. Select the Builder Settings tab.
3. Change the Builder type value to External builder. Click the OK button.
Note For more complex designs, Make files may be generated with absolute paths for files outside of the
current project. This can expose a bug in GNU Make versions later than 3.8.0 and earlier than 4.0. You may
see an error like: "Multiple targets. Stop.". The solution is to use the Eclipse Internal Builder, or to change your
GNU Make version to one that does not contain this bug.
369
Under Includes, these project include paths are provided as default values:
"../Generated_Source/${GEN_ARCH}"
-ffunction-sections
Under Miscellaneous, Other flags, these ARM-related flags default values are provided via the
${PROC_FLAGS} variable setting:
-c -fmessage-length=0
Under Includes, these project include paths are provided as default values:
"../Generated_Source/${GEN_ARCH}"
Under General, Other flags, these ARM-related flags default values are provided via the
${PROC_FLAGS} variable setting:
-L "../Generated_Source/${GEN_ARCH}"
-T ../Generated_Source/${GEN_ARCH}/${LINKER_FILE} -specs=nano.specs
Under Miscellaneous, Linker flags, these ARM-related flags default values are provided via the
${PROC_LINK_FLAGS} variable setting:
Under Miscellaneous, Linker flags, this default value is provided: -Xlinker --gc-sections
"${EXPORT_FOLDER_PATH}/${TOOL_NAME}/CyComponentLibrary.a"
370
The link step command line is structured so that "-Wl,--start-group" and "-Wl,--end-group"
options surround all input files and libraries, providing multiple linker passes to resolve cyclic references
between libraries, if needed.
Build Customization
Project Customization
Compiler optimization settings Other optimizations that might be useful in reducing your generated
flash image size include:
Under Cross GCC Compiler:
If you need to customize the link step for your executable image, do the following:
1. Copy the file from the above location to the top level folder of your Eclipse project. This will prevent any
subsequent builds in PSoC Creator from overwriting your changes to this file.
2. Edit your new copy of the file as needed.
3. Change the Build Settings linker flags (under Cross GCC Linker, Miscellaneous, Linker flags) to be:
Build Customization
If your design requires specialized steps in order to build to completion (beyond the standard pre-build/assemble/
compile/link/post-build stages of the standard Eclipse CDT Managed Build System [MBS]), you may want to
consider managing your own build for the project. Perhaps the easiest way to do this is to turn off the MBS
automatic generation of Makefiles with every project build. You can then customize the already generated
Makefiles to complete your project build as needed.
To turn off the automatic generation of Makefiles for your project, do the following:
In the Eclipse Project Explorer, right-click on your project name and select Properties
371
Target interface is set to JTAG (PSoC 5LP only), or SWD (PSoC 4/PRoC BLE or PSoC 5LP)
2. In Eclipse, create a new Debug Launch configuration for your design. Use the menu selection Run > Debug
Configurations
3. Create a new debug launch configuration by selecting the "GDB Hardware Debugging" category and clicking
the New button (circled in the following figure).
372
Provide path to the design's executable file produced by the project build. Navigate to the project's
Release or Debug folder to find it, or simply click the Search Project button and select the
executable.
The debugger launcher should be set to "GDB (DSF) Hardware Debugging Launcher."
Note However, for the Eclipse Kepler release, it is suggested that users select the "Legacy GDB
Hardware Debugging Launcher." (This is found at the bottom of the Main tab, change using the "Select
other..." link.)
Debugger tab:
Set the path to the GDB command by browsing to the GDB executable to use. Typically, this will be
named arm-none-eabi-gdb.exe, located in the same folder as the "Cross compiler path" setting
provided when importing into Eclipse.
Host name is "localhost" and port is "2331" (the default J-Link GDB server port).
Startup tab:
Halt is checked
Load Image and Load Symbols sections must have "Use project binary" selected.
Press Apply and Close to save this debug launch configuration for later use.
373
5. Launch the Segger J-Link GDB server by running "J-Link GDB Server" via All Programs->SEGGER->J-Link
ARM menu. Verify the following are set:
Target device is set to the Cypress PSoC device you are using. Press the "" button to browse the
supported devices. Select Cypress in the Manufacturers pull-down to list only Cypress devices. Select
your device family and press OK.
The server should connect to the target at this point and indicate it is waiting for a GDB connection, as shown in
figure below.
6. In Eclipse, set any needed breakpoints in your code. Run the Debug launch configuration you created in step 2
above by using the Run > Debug Configuration menu selection to locate your debug launch configuration
from the ones under the GDB Hardware Debugging heading. Click the Debug button to start the debug
session. The GDB Server will display additional output when the Eclipse GDB session begins.
7. When your breakpoint is encountered, Eclipse will change to its debug perspective and halt. Normal Eclipse
debug functionality (breakpoint manipulation, examining/changing variables and memory, etc) is available at
this point.
Note If you experience problems with the PC not tracking as you would expect while stepping through code,
you may be able to correct this by turning off compiler optimization in your code while debugging, as follows:
8. Right-click the project name and select Properties > C/C++ Build.
9. Select Settings.
10. Select Cross GCC Compiler (PSoC Creator).
11. Select Optimization.
12. Change the optimization level to "None".
13. Rebuild your design and start debugging again.
374
Before building and exporting a PSoC 5LP based design to Eclipse, go to your project's Design Wide
Resources System page and uncheck the "Store Configuration Data in ECC" check box. Storing
configuration data in ECC memory is the default setting for PSoC Creator projects, but must be changed for
designs exported to Eclipse in order for them to execute properly once flashed.
Your design cannot use EEPROM memory with any initial values set from the PSoC Creator EEPROM
Editor. The Segger-provided PSoC 5LP flashloader does not yet program this memory space.
Your design cannot use ECC memory, as the Segger-provided PSoC 5LP flashloader does not yet program
this memory space. Your project's DWR System settings should have the "Enable Error Correcting Code
(ECC)" box unchecked, as shown above.
The Segger-provided PSoC 5LP flashloader does not yet program the NVL memory space. This means the
following settings, if changed in your design in PSoC Creator, must be programmed by building and
downloading your design first in PsoC Creator with a Cypress MiniProg3 probe. You can then export your
design to Eclipse and program via a J-Link probe:
375
3. In PSoC Creator, configure the Bootloadable component for the bootloadable project to point at the hex/out files
of the bootloader project in the Eclipse output directory.
376
6. Build Project
7. Repeat step 2.a to step 2.d, but replace "_1" with "_2".
8. Then, use CyElfTool.exe to create a combination hex file that has the bootloader and both bootloadable images
in it.
377
10. Note the -flash_row_size, flash_array_size, flash_size command line arguments. Note the ee_array and -ee_row_size arguments as well, if they exist. You will use these values in the command line
shown in step 3.d. below.
11. In a Windows command line, cd into the .cydsn directory of your bootloadable project.
12. Run the CyElfTool.exe tool using a command similar to the following:
Export\CyElfTool.exe -M Debug\{ProjectName}_1 Debug\{ProjectName}_2
Debug\{ProjectName}.hex --flash_row_size 128 --flash_size 32768 -flash_array_size 32768
Note Flash and EE arguments are device-dependent and can be copied from the bootloadable's
postbuild.bat file.
Note If you use the release configuration, make sure to change all instances of Debug in the above
command line to Release. The above CyElfTool.exe command will generate a combination hex file that
contains the bootloader image and both bootloadable images. It will have name {ProjectName}.hex.
13. You should now have two bootloadable .cyacd files, a bootloader elf file, and a combination hex file in the three
Eclipse project Debug directories listed above. You can now program and debug your bootloader, either
bootloadable or combination files as you wish.
378
Click Next > to go to the Application Files page to select what non-generated code to export to the project:
Click Next > to go to the next page of the wizard to show the actions that will occur (such as exporting the selected
project XML files).
379
Click Export. The wizard will show the success/failure of the export actions and provide a link to extended
documentation on what the user needs to do now.
Optionally select the following action(s) when the export process completes:
Open the IAR EWARM Export Documentation. See Steps for Setting up the IAR Project.
See Also:
380
4. Open the IDE Options dialog (Tools > Options) and select Project. Then, select the Enable project
connections option and click OK.
5. Open the Add Project Connection dialog (Project > Add Project Connection), select IAR Project
Connection, and click OK.
381
6. On the Select IAR Project Connection File dialog, browse to the PSoC Creator Export directory, select the .ipcf
file, and click Open.
7. In the EWARM Workspace window, right-click on the project and select Options... to open the Options dialog.
8. For IAR versions earlier than 7.10.1 only, do the following:
382
9. On the General Options page, select Device under Processor variant. Then, click the Select Device button
and select the appropriate Cypress device.
10. On the Linker page, select the Config tab, check the Override default for the Linker configuration file.
Navigate to your project directory and go to the Generated_Source/{ARCH} directory and find the .icf file for
your project:
11. On the Linker page, select the Library tab. There, add the path to each of the libraries found in the
Export\ARM_IAR_Generic directory.
Prepend each of them with the IAR command $PROJ_DIR$, to let IAR find them in the project directory. This
ensures that your program will link with the correct libraries for your device. For example:
$PROJ_DIR$\Export\ARM_IAR_Generic\CyComponentLibrary.a
383
384
14. On the Debugger page, select the Download tab and check the Use flash loader(s) option.
15. Select the node for your debugger and select to the JTAG/SWD tab. Then, select the appropriate interface for
your device.
385
386
For PSoC 4/PRoC BLE, connect the I-jet with 10-pin adapter to the "PSoC 4/PRoC BLE Prog" 10-pin connector on
the CY8CKIT-042 (Pioneer Kit).
For information about how to use the IAR I-jet/Debugger system, go to the IAR IDE. In the Help menu, open the
documents named C-SPY Debugging Guide and I-jet User Guide.
See Also:
387
388
8. When selecting the linker configuration file, select the .icf with an _2 in its name.
9. Build the new project as usual.
10. Then, use CyElfTool.exe to create a combination hex file that has the bootloader and both bootloadable images
in it.
11. Open the postbuild.bat found in the export directory.
12. Copy the -flash_row_size, flash_array_size, flash_size command line arguments. Copy the ee_array and -ee_row_size arguments as well, if they exist.
13. In the Windows command line, cd into the .cydsn directory of your bootloadable project.
14. Run the CyElfTool.exe using a command similar to the following:
Export\CyElfTool.exe -M Debug\Exe\{ProjectName}_1.out Debug\Exe\{ProjectName}_2.out
Debug\Exe\{ProjectName}.hex --flash_size 262144 --flash_row_size 256 --ee_array 64 -ee_row_size16
Note Flash and EE arguments are device-dependent and can be copied from the bootloadable's postbuild.bat
file.
Note If you use the release configuration, make sure to change all instances of Debug in the above command
line to Release. The above CyElfTool.exe command will generate a Combination hex file that contains the
bootloader image and both bootloadable images. It will have name {ProjecName}.hex.
15. You should now have two .out files and one hex file in the UVBuild directory. You can now program and debug
your bootloader, either bootloadable or combination files as you wish.
All PSoC device projects can be exported to either Vision 4 or Vision 5 IDEs.
The export to Vision IDE process is slightly different for PSoC 3 devices than it is for PSoC 4, PRoC BLE,
and PSoC 5LP devices.
The Export to Generated CMSIS-Pack (Beta) option applies only to PSoC 4, PRoC BLE, and PSoC 5LP
devices, and it applies only to the Vision 5 IDE.
Refer to the following applicable topic for the PSoC device and version of Vision you are using:
389
4. Click Yes to build. If you click No, the export process will be cancelled.
390
5. If not already selected, select the Vision option. Click Next > to continue.
PSoC Creator checks whether MiniProg3/KitProg drivers have been registered with Vision. If they are not
registered, the MiniProg3/KitProg support for Vision step opens. However, if PSoC Creator locates a Vision
installation with MiniProg3/KitProg support enabled, then it will skip this step.
Note PSoC Creator only examines the first Vision installation found to see if it has MiniProg3/KitProg drivers
properly registered. If you have multiple copies of Vision installed on your computer, the auto-detection
process may not be accurate. If you are sure you already have drivers registered, you may skip this step of the
wizard.
6. If you need to register the drivers, click Install Drivers for Vision and follow the prompts on the installation
wizard. This process is only required once. See Registering MiniProg3/KitProg Drivers for more information.
7. If you need to register drivers with another Vision installation, go to the PSoC Creator Tools menu and select
Install drivers for Vision to launch the installation wizard.
8. Click Next > to continue.
391
Select the files you want added to your new Vision application project.
Note The wizard does not copy these files when exporting. It simply adds references to the existing
files to the Vision application project.
To start with an empty Vision application project, click the Unselect All button.
Once the initial export is complete, build settings and file management must be performed within the
Vision environment. For example, if you want to add a new source file, select File > New in Vision.
392
Optionally select the following action(s) when the export process completes:
393
See Also:
Note Creating and exporting a PSoC 3 project and then changing the device to a PSoC 4/PRoC BLE/PSoC 5LP
and re-exporting is not supported. If you wish to do this, you must manually delete your Vision project (*.uvproj)
before re-exporting. Then follow instructions for Exporting a Design to Keil Vision IDE (PSoC 4/PRoC BLE/PSoC
394
5LP).
3. Use the Project > Export to IDE menu option to open the IDE Export Wizard dialog.
Note PSoC Creator does not support PSoC 3-based bootloader/bootloadable application development in
Vision.
4. If you have not built the design, you will be prompted to build at this time.
395
5. Click Yes to build. If you click No, the export process will be cancelled.
After a successful build, the IDE Export Wizard opens.
6. If not already selected, select the Vision option. Click Next > to continue.
PSoC Creator checks whether MiniProg3/KitProg drivers have been registered with Vision. If they are not
registered, the MiniProg3/KitProg support for Vision step opens. However, if PSoC Creator locates a Vision
installation with MiniProg3/KitProg support enabled, then it will skip this step. Go to step 7.
Note PSoC Creator only examines the first Vision installation found to see if it has MiniProg3/KitProg drivers
properly registered. If you have multiple copies of Vision installed on your computer, the auto-detection
process may not be accurate. If you are sure you already have drivers registered, you may skip this step of the
wizard.
7. If you need to register the drivers, click Install Drivers for Vision and follow the prompts on the installation
wizard. This process is only required once. See Registering MiniProg3/KitProg Drivers for more information.
8. If you need to register drivers with another Vision installation, go to the PSoC Creator Tools menu and select
Install drivers for Vision to launch the installation wizard.
9. When complete with this step, click Next > to continue.
396
Optionally, modify the name for the Vision workspace and project. By default, these are based on the
names of the PSoC Creator project being exported.
You can also specify the location to store the exported project.
Note The wizard will not overwrite an existing project or workspace file. If you want to replace an existing
Vision project, you must delete it using Windows Explorer first.
11. Click Next > to continue.
The Application Files step opens.
Select the files you want added to your new Vision application project.
Note The wizard does not copy these files when exporting. It simply adds references to the existing
397
To start with an empty Vision application project, click the Unselect All button.
Once the initial export is complete, build settings and file management must be performed within the
Vision environment. For example, if you want to add a new source file, select File > New in Vision.
Optionally select the following action(s) when the export process completes:
398
See Also:
399
Changing Devices
Creating and exporting a project using Vision and then changing the device and re-exporting is not supported. If
you wish to do this, you must manually delete your Vision project (*.uvproj \*.uvprojx) before re-exporting. Then,
follow the appropriate instructions for the new PSoC device and version of Vision
4. Click Yes to build. If you click No, the export process will be cancelled.
After a successful build, the IDE Export Wizard opens.
5. If not already selected, select the Generated CMSIS-Pack (Beta) option. Click Next > to continue.
400
PSoC Creator checks whether MiniProg3/KitProg drivers have been registered with Vision. If they are not
registered, the MiniProg3/KitProg support for Vision step opens. However, if PSoC Creator locates a Vision
installation with MiniProg3/KitProg support enabled, then it will skip this step.
Note PSoC Creator only examines the first Vision installation found to see if it has MiniProg3/KitProg drivers
properly registered. If you have multiple copies of Vision installed on your computer, the auto-detection
process may not be accurate. If you are sure you already have drivers registered, you may skip this step of the
wizard.
6. If you need to register the drivers, click Install Drivers for Vision and follow the prompts on the installation
wizard. This process is only required once. See Registering MiniProg3/KitProg Drivers for more information.
7. If you need to register drivers with another Vision installation, go to the PSoC Creator Tools menu and select
Install drivers for Vision to launch the installation wizard.
8. Click Next > to continue.
The Select Toolchain step opens.
401
Vendor: Enter the Vendor name shown in the Vision 5 software pack.
Version: Enter the major version, minor version, and revision number for the software pack being
exported.
Include the project datasheet in the pack: If applicable, select this check box to include the project
datasheet.
If the project datasheet is generated, this option is available. To add a project datasheet to the pack:
Install the generated pack in Vision: Select this check box to install the generated pack that will be
exported to Vision.
Note If you deselect this option, the pack will not be installed automatically. You will have to install it
manually. Refer to Vision documentation.
If you do not have Vision 5 installed, deselect this option to perform the export and generate the pack
without installing it.
Optionally, you can download Vision 5 from the link provided.
Path to Vision 5 tools ini: This shows the default path to the TOOLS.INI file in the Vision 5
installation directory.
If you would like to export to another installed version of Vision 5 IDE on your computer, click the
ellipsis [...] button and navigate to the appropriate directory.
402
Select the files you want to add to your new Vision application project.
Note The wizard does not copy these files to the pack when exporting. It simply adds references to the
existing files to the Vision application project.
To start with an empty Vision application project, click the Unselect All button.
Once the initial export is complete, build settings and file management must be performed within the
Vision environment. For example, if you want to add a new source file, select File > New in Vision.
403
Optionally select the following action(s) when the export process completes:
Open in Vision
This option is available if you selected the Install the generated pack in Vision check box on the
Pack Generation step.
See Also:
404
405
Both of these projects can be opened together in a Vision workspace <ProjectName.uvmpw>. Both projects can
be built together using Project > Batch Build as shown in the following image.
406
407
See Also:
The following is a snapshot of the project built in Vision 5, but before building the project there are some options
that need to be set up as explained in the section Setting Options in Vision 5.
408
409
For ARM GCC, choose cm0gcc.ld (cm3gcc.ld for PSoC 5LP / GCC)
Note Adding the post build command will be done automatically for some newer versions of Vision, so you need to
check it depending on what version of Vision you are using.
See Also:
410
411
3. If not already selected, select the Vision option. Click Next > to continue.
The Export Project step opens.
4. Choose the Update device settings... option, and navigate to where the application project is stored.
This option will update the necessary application-level files, but it will not update any firmware files.
Note If you have the application project open in the Vision IDE, Cypress recommends that you close it before
re-exporting from PSoC Creator.
5. Click Next >. The wizard shows the changes that were made to the application project.
412
You can select the option to open the documentation and/or the containing folder.
6. Click Finish to complete the export process from PSoC Creator. Then re-open the project in Vision and
rebuild it
Note The Update device settings... option only modifies the Application project. No other files mentioned in
Key IDE Export Files/Projects will be changed.
What Gets Updated:
all Include path entries that point to the PSoC Creator Generated_Source directory (all <IncludePath> keys)
See Also:
Files/Projects Exported
413
1. Select the Project menu and point to Manage > Components, Environments, Books...
2. On the Components, Environment, and Books dialog, select the Folders/Extensions tab and make sure the
Use GCC check box is selected. Notice that changing the toolchain will reset all Options for Target settings.
3. Click the ellipsis [...] button and browse to the directory above the "bin" directory in your GNU GCC installation.
The path will be similar to the following:
C:\Program Files (x86)\Cypress\PSoC Creator\3.3\PSoC Creator\import\gnu\arm\4.9.3
4. Click OK to close the Browse dialog, and then click OK to close the Components, Environment, and Books
dialog.
5. Right-click on the project and select Options, then select the Linker tab.
414
6. If the project has any additional libraries, add them in the Misc controls section on the Linker tab. Notice that
the path to library files in the Misc controls section must be separated by forward slashes to be recognized by
Vision.
Also add the following command line option in the Misc controls section.
-specs=nano.specs
Note When Using Vision 4, you may get the following error while building the project:
assembling CyBootAsmGnu.s...
C:\Program Files (x86)\Cypress\PSoC Creator\3.3\PSoC Creator\import\gnu\arm\4.9.3\bin\arm-none-eabi-as:
unrecognized option `--pd'
...
arm-none-eabi-gcc: error: ./uvbuild/cybootasmgnu.o: No such file or directory
Removing NDEBUG from the Define field in the Conditional Assembly Control Symbols section on the
Assembler tab will resolve the problem.
415
Select the Linker tab and navigate to and select the scatter file located in the pack installation directory.
On the Options for Target ... dialog, select the User tab to add/check the following script to the After
Build/Rebuild text field and check the Run #1 check box.
$PExport\postbuild.bat "#L" -p "$P"
Note Adding the post build command will be done automatically for some newer versions of Vision, so
you need to check it depending on what version of Vision you are using.
Select the Assembler tab and navigate to and select the Include Paths directory.
In the Include Paths text field, enter a dot and then from the ellipsis [] button, navigate to and select the
416
Add .elf extension to the file name in Name of Executable text box.
In the Include Paths text field, enter a dot and then from the ellipsis [] button, navigate to and select
the proper directory. The path is either Generated_Source\PSoC4 or Generated_Source\PSoC5,
depending on the selected PSoC device. The text in the Include Paths text box should be similar to
the following:
.;.\Generated_Source\PSoC4
417
See Also:
418
Build Settings
Purpose
<DesignName>.cydsn/
<DesignName>_<Arch>lib.uvproj
Details
PSoC 3:
<DesignName>.cydsn/Generated_Source/
PSoC3/post_link.bat
Vision 5:
<User_Selected_Path>
/<DesignName>.uvprojx
Vision 4:
<User_Selected_Path>/
<DesignName>.uvproj
Only created/updated by
PSoC Creator as a part of the
Export to IDE wizard. It may be
named/saved to any reasonable
location.
419
Vision 5:
<User_Selected_Path>/
<DesignName>.uvoptx
<User_Selected_Path>/postlink.bat
(For PSoC 3 only)
Vision multi-application
workspace. This is a Vision
multi-application project file
that contains references to
both the library and application
projects.
Vision System Viewer file.
Contains component register
details. This is used by
Vision for peripheral register
420
(For PSoC 4/PRoC BLE and PSoC 5LP only) debug. This is the file format
expected by Keil Vision for
enabling peripheral register
debug through its System
Viewer.
Generated CMSIS-Pack:
Generator Package
<DesignName>.cydsn/<DesignName>.gpdsc Description file, is working as
the Vision project file. Once it
is created, it is shown at PSoC
Creator workspace/Results,
and gets updated during the
build process. If something
happened and it cannot be
updated, there would be a
message in Output window
that Vision 5 project is not up
to date.
Generated CMSIS-Pack:
<DesignName>.cydsn/Export/Pack/
<vendor.packName.version>.pack
See Also:
ULink2/ULink Pro is for PSoC 4, PRoC BLE, and PSoC 5LP devices.
Segger J-Link is for PSoC 4 and PRoC BLE devices. To set up Segger J-Link for PSoC 5LP devices, refer
to Setting Up for Segger J-Link/J-Trace Debugger for PSoC 5LP.
In order to fully enable PSoC 4/PRoC BLE/PSoC 5LP programming/debugging in Vision 4.72a you will need to
download an "add-on" for Vision.
421
Note If you are using a version later than 4.72a, you do not need this download.
The add-on can be found at the following link: http://www.cypress.com/go/creator/uvisionimportdownload
Once you have downloaded the add-on, unzip the archive and run the executable and follow the steps to install it.
Then, run Vision and follow these steps to set it up:
1. Before building and exporting a PSoC 5LP based design to Vision, go to your project's Design Wide
Resources System page and Disable the "Store Configuration Data in ECC" parameter. Storing configuration
data in ECC memory is the default setting for PSoC Creator projects, but must be changed for designs
exported to Vision.
2. Select Project > Options for Target to open the dialog, and go to the Debug tab.
422
4. Select the appropriate Port (SW or JTAG), and click on the Flash Download tab.
5. Select Erase Full Chip and if the flash algorithms have not been added automatically, Click on Add button and
add the proper On-chip Flash algorithm based on the following table. Then set the size of RAM for Algorithm as
indicated in the following table.
RAM for Algorithm values for Keil ULink (PSoC 4/PRoC BLE/PSoC 5LP) and Segger J-Link (PSoC
4/PRoC BLE) debuggers
RAM for Algorithm
PSoC Device family
Programming Algorithm *
Start
Size
PSoC 4000
0x20000200
0x0600
CY8C40xx
(16/8kB) Flash
PSoC 4100/4200
0x20000300
0x0D00
CY8C42xx 1 MACRO
(32/16kB) Flash
0x20000200
0x3E00
CY8C42xx/41xx-BLE,CYBL10xx
(128kB) Flash
0x20000400
0x7C00
CY8C42xx/41xx-BLE,CYBL10xx
(256kB) Flash
0x20000200
0x0C00
CY8C42xx/41xx-M
(128/64/32kB) Flash
PSoC 4200L
0x20000400
0x1C00
CY8C42xx-L
(256/128/64kB) Flash
0x0C00
CY8C5xxxx Flash
CY8C5xxxx Configuration
CY8C5xxxx CFG NVL
CY8C5xxxx WO NVL
CY8C5xxxx EEPROM
CY8C5xxxx Flash Protection
PSoC 5LP
0x20000400
Notes:
For projects exported through Vision : The Programming Algorithm should be present in
C:\Keil\ARM\flash\*.FLM. If Vision doesnt contain a Cypress flashloader, copy flashloaders from PSoC
Programmer folder (C:\Program Files (x86)\Cypress\Programmer\ 3rd_Party_Configuration_Files).
423
For projects exported through Generated CMSIS-Pack: The Programming Algorithm should be present
in a path similar to the following based on Vision installation directory and your chosen pack name
information:
C:\Keil_v5\ARM\PACK\<PackVendor>\<PackName>\<PackVersion>\FLM\<CypressDeviceName>\*.FL
M
For more information about how to set up your project; please refer to the Third-Party Tools for Cypress Devices
User Guide.pdf file in Documents folder in the 3rd_Party_Configuration_Files folder located in the root
installation folder of PSoC Programmer.
2. Launch the Vision IDE and select Project > Options for Target to open the dialog, and go to the Debug tab
424
3. Select the appropriate debugger and click Settings to open the Driver Setup dialog.
Note Please notice that for Vision 5 exported projects, the target name is not automatically recognized by JLink SW and you will get a message indicating that the selected device is unknown, so you need to select Yes
from the pop up window and then manually choose the appropriate device in the J-Link SW.
4. On the Debug tab, select the appropriate Port (SW or JTAG). Then, click the Flash Download tab.
5. Remove all other flash algorithms except CY8C5xxLP Flash. If you have flash algorithms of other memory
types such as EERPOM, CFG, NVLs, etc. in HEX then J-Link loader will fail, because it doesn't support them.
425
Notes:
For projects exported through Vision: The Programming Algorithm should be present in C:\Keil\ARM\flash\*.FLM. If
Vision doesnt contain a Cypress flashloader, copy flashloaders from PSoC Programmer folder (C:\Program Files
(x86)\Cypress\Programmer\ 3rd_Party_Configuration_Files).
For projects exported through Generated CMSIS-Pack: The Programming Algorithm should be present in a path
similar to the following based on Vision 5 installation directory and your chosen pack name information:
C:\Keil_v5\ARM\PACK\<PackVendor>\<PackName>\<PackVersion>\FLM\<CypressDeviceName>\*.FLM
Erasing All
426
Insert/Remove Breakpoints
Enable/Disable Breakpoints
Read/Write Registers
Read/Write Memory
For flash programming in Vision, before initiating the flash download, select the Cypress MiniProg3/KitProg vX.Y"
driver from the drop-down menu shown below. The settings button will bring up a dialog that can be used to select
different operations to be performed when you click the LOAD" button.
Erase Flash
Program Flash
Verify Flash
Select the Flash > Download menu option to initiate flash programming as shown in the following image.
427
The Vision debugger will be configured to use the MiniProg3/KitProg debug driver by selecting the Cypress
Miniprog3/KitProg vX.Y" driver in the Debug tab, as shown in the following image. The "Settings" button will bring
up a dialog that contains the following settings:
Protocol: SWD/JTAG
Target Voltage
Clock speed
Initiate debugging by clicking the Start/Stop Debug session" under the Debug menu. You can save these debug
settings by clicking the Save All button in the Vision IDE.
Refer to the Vision IDE documentation.
428
2. Click the Install Drivers for Vision button and the registration window will open.
You can also open this dialog from the PSoC Creator Tools menu.
3. Type the path or click [...] and navigate to the path to the Keil installation. This is the path to the directory that
contains the Vision tools.ini file.
429
A confirmation screen will display to indicate that the driver was successfully registered.
Note If there is no tools.ini file in the selected directory, an error will display. Make sure you have chosen the
correct directory.
5. When complete, click Finish.
430
Note If the project has been exported to Vision 5 generated software pack using GCC toolchain, you need to
navigate to the .hex file and .elf file in the project directory.
7. Select Project > Options for Target to open the dialog, and select the Linker tab.
431
8. In the Scatter File text box, change the _1 of the scatter file to _2.
4. Follow any other steps required as described in Opening Projects in Vision 5 IDE, and build the bootloadable
project as usual in Vision. Then use the following steps:
5. Select Project > Options for Target to open the dialog, and select the Linker tab. In the Scatter File text box,
choose the proper linker script with "_2" in the end such as Cm0RealView_2.scat for MDK and cm0gcc_2.ld for
432
GCC toolchain.
6. Select the Output tab and in the Name of Executable text box, and change "_1" to "_2" at the end of the
project name.
3. Copy the -flash_row_size, flash_array_size, flash_size command line arguments. Copy the ee_array and -ee_row_size arguments as well, if they exist.
4. In the Windows command line, cd into the .cydsn directory of your bootloadable project.
433
GCC toolchain:
Export\CyElfTool.exe -M {ProjectName}_1.elf {ProjectName}_2.elf {ProjectName}.hex
--flash_size 262144 --flash_row_size 256 --ee_array 64 --ee_row_size16
Flash and EE arguments are device-dependent and can be copied from the bootlodable's postbuild.bat
file.
6. You should now have two .axf files and one hex file in the Output directory. You can now program and debug
your bootloader, either bootloadable or combination files as you wish.
7. If you make any changes to either of your bootloadable projects, make sure those changes are mirrored in your
other bootloadable project.
8. If you re-export a bootloadable project from PSoC Creator, make sure to regenerate your second bootloadable
using the manual steps previously described.
To ensure the MiniProg3/KitProg drivers are successfully registered, verify that the Tools.ini file includes the
paths to MiniProg3 drivers under the C51, ARM, and ARMADS sections. The following example shows
entries in the Tools.ini file for the default installation of PSoC Creator:
[ARM]
TDRV12="<INSTALL_DIR>\PSoC
Creator\export\ide\uVision\4.x\driver\cyuvdriver_8051.dll"("Cypress
Miniprog3/KitProg v<version>")
[ARMADS]
TDRV12="<INSTALL_DIR>\PSoC
Creator\export\ide\uVision\4.x\driver\cyuvdriver_arm.dll"("Cypress Miniprog3/KitProg
v<version>")
[C51]
TDRV9="<INSTALL_DIR>\PSoC
Creator\export\ide\uVision\4.x\driver\cyuvdriver_arm.dll"("Cypress Miniprog3/KitProg
v<version>")
The number after TDRV can vary depending on the Vision installation. Also, the version number in the
path and name of the driver will change based on the installed version of PSoC Creator.
If the tools.ini file is not updated with the path to the MiniProg3/KitProg drivers, the file can be manually
updated with the appropriate path.
Firmware code written in PSoC Creator before the Vision application project is created for the first time
will by synced. Once the Vision application project has been created, build settings and files are
maintained in the Vision GUI.
434
The Export to IDE feature only supports the following PSoC Creator project variants:
PSoC 3 projects may use the DP8051 Keil 9.51 or DP8051 Keil Generic toolchain.
PSoC 5LP projects may use the ARM MDK Generic, "GCC 4.9-2015-q1-update", or "GCC Generic"
toolchain.
Code in the Start group in the Vision application project is automatically re-generated by PSoC Creator.
Vision post-build steps are unable to report errors in a way that influences the final error/warning count.
You should examine your Vision output window to make sure that there are no issues reported by the
post-build scripts.
Windows BAT files do no work reliably when run from UNC style paths (\\server\path\to\script.bat). In
particular, the BAT file processor may report that it cant set the current working directory to \\server\path.
You may work around this issue by using the Windows Map Network Drive feature to assign a drive letter
to your shared server directory.
It is not possible to work on a project in PSoC Creator and Vision 5 simultaneously. You need to close
Vision before reloading files modified by PSoC Creator. If you change your design in PSoC Creator and
build it, PSoC Creator automatically updates the pack. If accidentally you have Vision open while changed
the design in Creator, Vision might use the out of date pack, so you have to close it and re-open it to
access the updated pack.
For Vision 5 exported projects, it is very important to keep <project_name>.gpdsc file and
<vendor_name.pack_name.pack_version>.pack in sync. If you export a project to Vision 5 and select the
Install the generated pack in Vision check box, the pack will be installed in the Vision installation
directory automatically. Also a copy of the generated pack will be located under the
<project_directory>/Export/Pack folder and a <project_name>.gpdsc file will be located in project directory.
All these three must be kept in sync.
Once you have a <project_name>.gpdsc in the project directory, PSoC Creator detects it and updates it
during the build process. It also detects if you previously selected the Install the generated pack in
Vision check box, so it updates the pack in Export/Pack folder as well and installs it in Vision. If for any
reason PSoC Creator cannot install the pack during the build process (for example, say you uninstalled
Vision 5 from your system), you will see a message in PSoC Creator output window stating that the
Vision 5 project is not up to date and a re-export is required.
If you change a previously exported project in PSoC Creator and re-export the project with the same pack
name and version, use caution. If you deselect the Install the generated pack in Vision check box
(where previously you selected it), the pack in the Export/Pack folder is substituted with the up to date pack
in sync with new gpdsc file. However, the installed pack in Vision is out of date (still the previous one), so
you need to manually install the new pack before building the project in Vision 5. You can install the pack
by double-clicking on it and following the PackUnzip.exe dialog steps.
There can be more than one pack in the Export/Pack directory, but the gpdsc file in the project directory is
always in sync with the last generated pack. So, you may save the current exported Vision 5 project
somewhere else to keep the current gpdsc file for the current pack file before changing the design and
doing a new export.
Follow the manual steps to refer to the linker script file and post build command in the Vision Options for
Target dialog (See Opening Projects in Vision 5 IDE). If you do not add the linker script and try to build the
project in Vision, you will see an error similar to the following:
.\UVBuild\ADC_Differential_Preamplifier22.axf:
435
The GCC toolchain is not supported by CMSIS Pack Vision 5, so if you wish to export the project using
GCC toolchain you must follow the manual steps described in GCC Settings in Vision.
If you added a pdf file as an application file during the export process, the pdf file will appear in the Manage
Run Time Environment dialog. The other application files will appear under the PSoC Creator in Vision
workspace. The following snapshot shows the pdf file named "Application file" in the Manage Run Time
Environment dialog. If you click on the link under description, the pdf file will open.
If you do not choose to add the application files automatically, you can add them manually to the Source
Group in the Vision workspace. If you already added the application files automatically to the pack and
also add them manually, you will get a build error similar to the following:
.\UVBuild\ADC_Differential_Preamplifier22.axf:
Error: L6200E: Symbol __asm___6_main_c_5f9501ff____REV16 multiply defined (by main_1.o and
main.o).
See Also:
436
The PSoC Creator Debugger allows you to observe the run-time behavior of your program and determine the
location of semantic errors.
The debugger understands features that are built into programming languages and their associated libraries. With
the debugger, you can break (suspend) execution of your program to examine your code, evaluate and edit
variables in your program, view registers, see the instructions created from your source code, and view the memory
space used by your application.
Using a debugger, you can examine the content of variables in your program without having to insert additional
calls to output the values. You can insert a breakpoint in your code to halt execution at the point you are interested
in.
When your program is halted (in break mode), you can examine local variables and other relevant data using
facilities, such as the Watch window and the Memory window. For more information, see Watch Window or Memory
Window. Not only can you view the contents while in break mode, you can edit or change the contents, if you
desire. In most cases, you will set your breakpoint in a source file, where you write and edit your code. Sometimes,
you may choose to set the breakpoint in the debugger's Disassembly window instead. The Disassembly window
437
shows you the instructions created from your source code. For more information, see the Disassembly Window.
Unlike printf or MsgBox, setting a breakpoint does not add an additional functional call to your source code.
Therefore, setting a breakpoint is unlikely to change the behavior of the program you are trying to debug.
Note Using the Debugger, you can program your device through PSoC Creator without launching PSoC
Programmer. Also, the device will automatically be reprogrammed when you start a debug session.
The PSoC Creator debugger provides menu items, windows, and dialog boxes to access all its tools. You can
obtain help on any window, dialog box, or control by selecting the item and pressing [F1]. You can also drag and
drop to move debugging information between windows. The following lists the main sub-sections for the Debugger:
Debugger Commands
Debugger Menus
Debugger Windows
MiniProg3
QuickProgrammer
Error Handling
Supported Debuggers:
PSoC Creator supports the 8051 and ARM Cortex-M3 microprocessors. The supported debugger is GDB.
Icon
Shortcut
Description
[F5]
Programs the selected target with the latest version of the project
Starts the debug session
Halt Execution
[Ctrl]+[Alt]+[Break] Halts the debug target in the middle of whatever it is currently doing.
Especially useful if the chip is not behaving as expected and you want to
know what it is actually doing.
Stop Debugging
[Shift]+[F5]
Terminates the debug session and places PSoC Creator back in the
standard perspective. Use this if you are finished debugging the code and
ready to make changes or do something else.
438
Command
Icon
Shortcut
Description
Step Into
[F11]
Executes a single line of code. If the line is a function call, the debugger will
break at the first instruction in the function. If the line is not a function call, the
debugger will break at the following line of code. Use this to verify that a line
of code is doing what is expected. This function temporarily allows the
processor to run until it finishes processing the instructions that make up the
current line of code.
Step Over
[F10]
Executes a single line of code. The debugger will break at the following line
of code. If the current line of code is a function call, the function will be
executed without stopping. The debugger will then stop on the next line after
the function call. Use this to verify that a line of code is doing what is
expected. This function temporarily allows the processor to run until it
finishes processing the instructions that make up the current line of code.
Step Out
[Shift]+[F11]
Finishes executing the current function. The processor is allowed to run until
the current function has finished. It will halt again at the first instruction after
the function call. Use this to exit the current function and return to the calling
method. This function temporarily allows the processor to run until it finishes
processing the instructions that make up the current function.
[Ctrl]+[Shift]+[F5]
Halts the current debug session, recompiles the project, programs the device
with the updated code, and starts the debugger again. This allows for testing
changes much faster than having to start and stop the debugger each time a
change is made.
Reset
[Shift]+[Alt]+[F5]
Resets the Program Counter (PC) to zero, and puts the processor into a run
state. This allows you to start over running the program without going
through the whole build and program sequence.
Enable/Disable All
Breakpoints
Alternately enables and disables all breakpoints in the workspace. Use this
to quickly change the state of all breakpoints instead of having to change
each one individually. This is useful if there are multiple breakpoints set but
you just want the processor to run.
Enable/Disable
Global Interrupt
See Also:
439
Icon
Shortcut
Windows >
Description
Provides access to the various debugger windows. See Debugger
Windows.
Breakpoints
Output
[Ctrl] + [F5]
Program
Opens the Select Debug Target dialog to manually select the debug
target to use.
Debug
[F5]
[Alt] + [F5]
Toggle Breakpoint
Address Breakpoint
Function Breakpoint
Variable Watchpoint
Memory Watchpoint
[Ctrl] + [Shift] +
[F9]
440
Icon
Shortcut
Windows >
Description
Provides access to the various debugger windows. See Debugger
Windows.
Breakpoints
Output
[Ctrl] + [Alt] +
[W], [2]
[Ctrl] + [Alt] +
[W], [3]
[Ctrl] + [Alt] +
[W], [4]
Locals
Opens the Locals window to view and modify all of the local variables
in the current debug frame.
Components
Call Stack
Opens the Call Stack window to track the order that different
functions are called by the target program.
[Ctrl] + [Alt] +
[M], [2]
[Ctrl] + [Alt] +
[M], [3]
[Ctrl] + [Alt] +
[M], [4]
Watch >
Memory >
Disassembly
[Ctrl] + [Alt] +
[D]
Registers
Opens the Registers window to display the core CPU registers and
their values
[Ctrl] + [F5]
Program
Opens the Select Debug Target dialog to manually select the debug
target to use.
441
Command
Icon
Shortcut
Description
Resume Execution
[F5]
Continues the debugger. Starts the debug target running again after
a Halt or a breakpoint. Use this function to have the program
continue running to the next breakpoint.
Halt Execution
[Ctrl] + [Alt] +
[Break]
Stop Debugging
[Shift] + [F5]
[Ctrl] + [Shift] +
[F5]
Reset
[Ctrl] + [Alt] +
[F5]
Step Into
[F11]
Step Over
[F10]
Step Out
[Shift] + [F11]
Toggle Breakpoint
[F9]
Address Breakpoint
Function Breakpoint
Variable Watchpoint
Memory Watchpoint
[Ctrl] + [Shift] +
[F9]
Refresh
Enable/Disable Global
Interrupt
442
See Also:
Debugger Indicators
This topic explains the various indicator icons that appear in the debugger:
Breakpoints:
The following table shows the different breakpoint symbols you may encounter:
Hardware
Software
Permanent
Temporary
Breakpoint enabled
Breakpoint disabled
Breakpoint disabled due to error setting. View the error in the Notice List Window.
Breakpoint with condition/hit count disabled due to error setting. View the error in the Notice List Window.
There are four main categories: hardware, software, permanent, and temporary. Red means hardware; green
means software. The "1" in the top right corner means temporary.
Watchpoints:
A watchpoint will halt the program when the specified memory location is read, written, or accessed by the CPU.
There are three watchpoint icons, as follows:
Read Watchpoint
Write Watchpoint
Access Watchpoint
443
Stack Element:
This is grey highlighting surrounding a line of code indicating it is part of the call stack. This is an indication of how
code is being executed.
See Also:
Breakpoints Window
Variable Watchpoints
Software Breakpoints
Starting Debugger Indicates that you requested to start debugging a project. PSoC Creator is in the
process of configuring the selected device for debugging.
Checking Build Indicates what is actually happening in the process of starting up the debugger. It takes
a while to check if a build is necessary and, if so, to start the build process. This task uses a great deal of
CPU power.
Programming Indicates that the selected debug target is being programmed. The programming process
takes about 3-5 seconds to complete. This message provides information that something is actually
happening.
Debugging - Halted Indicates that the target device is halted and the user can interact with it. The
debugger has two states, halted and running. The options available to the user are significantly different
between the states. This message provides an at-a-glance indication of which state the debugger is in.
Debugging - Running Indicates that the target device is running and the user cannot interact with it.
444
See Also:
Debugger Windows
The PSoC Creator debugger offers a set of windows that give useful information for the debug environment. The
displays of these windows are all optional, although some of them will be displayed by default.
All of these windows are individually dockable or they can be free floating. If a window is free floating, it can be
individually resized. If a window is docked, resizing it will affect the nearby docked windows. If more than one
window is docked in the same location, a set of tabs will be placed at the bottom of the window listing all of the
available windows. Persistence of the default window settings and the user interface to select the default windows
is controlled by the PSoC Creator framework. See Customizing the Framework for more information about
arranging and resizing windows.
The following are the debugger windows available:
Memory Window
Watch Window
Breakpoints Window
Registers Window
Locals Window
Disassembly Window
Memory Window
The Memory window displays the values stored in the memory of the processor.
The memory is broken up into the different regions defined by the target architecture. The window displays a list of
addresses with the associated bytes along with an ASCII string that represents the series of displayed bytes. This
window is updated every time a halt event occurs.
445
Several memory windows can exist at one time, with each window focusing on a different area in memory. This tool
window is useful for viewing the raw data on the chip without any special filters or formatting. It is designed to allow
quick viewing of large blocks of data for validation purposes. In addition, this may be the only means of viewing
some regions of the chip that are not exposed via other windows.
Context Menus:
The following options are available if you right-click in the window:
See Also:
446
Watch Window
The Watch window is used to evaluate and display variables, registers, or expressions. It will only display items that
you specifically requested.
You can add items to the watch window by selecting a block of text in the Text Editor, or by typing the expression
directly into the Name column of the Watch window.
Use the Watch window to evaluate a wide range of expressions:
Simple variables Enter just the variable name. For example, if the program contains 'uint16 foo =
3;', enter 'foo'.
Array variables Enter just variable name with brackets around the index value. For example, if the
program contains 'uint8[10] foo;', enter 'foo[2]'.
Struct variables Enter just the variable name with a period separating the different items. For example, if
the program contains 'struct foo { uint16 a; uint8 b }; struct foo temp;', enter 'foo' to
view the whole struct, or 'foo.a' to view just the 'a' member of the struct.
Registers Enter a '$' sign in front of the register name. For example, to view the Program Counter, enter
'$PC'. All register names can be viewed by opening the Registers window.
Expressions Enter the expression to evaluate. For example, to add a number to a variable, enter
'foo+3'.
Assignments Enter the assignment statement to evaluate. For example, to assign 3 to the variable foo,
enter 'foo=3'.
The Watch window is automatically updated with the latest values at every halt event. While halted, you can modify
the values of items to view and update any aspect of the design that might interest you. For numeric values, there
is also an option to display the values in binary, octal, decimal, or hexadecimal. Several watch windows can exist at
one time, with each window focusing on different aspects of the program. Each Watch window contains the
following columns:
Name In this column you can type any valid expression recognized by the debugger.
Value The debugger evaluates the expression displayed in the Name column and places the result in this
column.
If the expression is a variable or register name, you can edit the value in this column to change the
contents of the variable or register.
You can edit and display register values for native-code applications only.
447
You can change the numeric format of the value to hexadecimal by right-clicking the Watch window and
choosing the Hexadecimal Display option from the shortcut menu.
Type This column displays the data type of the variable or expression.
Context Menus:
The following options are available if you right-click in the window:
Edit Value Edits the entrys value, same as double clicking on the Value field
Collapse Parent Collapses the entrys parent item so child nodes are hidden
Double-click an entrys Value field to change the value of the item, if not read-only.
448
See Also:
Text Editor
Registers window
It provides a means of easily seeing what data is used to make up the component. This can be helpful in tracking
down issues with custom components or figuring out why a component is not behaving as expected.
This window is generated for each component instance in a project for which you selected using the Select
Component Instance Debug Windows. Each component window lists the memory and registers for the instance, as
well as any sub-components that are used by it. Since not all components have all three of these items, only the
resources actually used will be displayed. This means some windows may only have a memory or register view.
The memory and registers windows behave exactly like the main Memory window and Registers window. The list of
sub-components are links to provide easy viewing access.
449
2. Select the component instances to view in the Components window and click OK.
The selected Component Debug Window(s) will open within the debugger framework. You can re-arrange how
these windows are displayed within the framework to suit your needs.
See Also:
Memory Window
Registers Window
450
Each instance you select will display in a different Components Window during a debug session. It presents each of
the available components in a simple tree view, which preserves the components' nesting hierarchy. It also provides
a clear indication of which components are made up of other components.
See Also:
Components Window
451
Breakpoints Window
The Breakpoints window displays all of the breakpoints that have been set in the workspace, whether they are
enabled or not. The window displays the list of breakpoints by type and location. If the processor (debug tool chain)
supports it, this window also provides additional information about the breakpoint such as the number of times it
has been hit and any condition that must be true for it to be triggered.
A breakpoint is used to cause the debugger to halt the next time its location is reached. Breakpoints can be set,
listed, disabled, or removed. Breakpoints can be set up in a number of different ways, such as specifying the line
number of a file on which a breakpoint should be set, a function in which a breakpoint must exist, or an address
when accessed.
If you set a hardware breakpoint, a red dot will appear in the Type column, as well as in the left margin of the
source/disassembly corresponding to the line in which the breakpoint is assigned. A disabled breakpoint has its
associated red dot replaced with a red circle. When a breakpoint is removed its corresponding dot/circle is removed
from the margin. For a list and description of all debugger indicators, see Debugger Indicators.
The number of breakpoints available is limited by the PSoC device. Refer to the appropriate device datasheet for
the number of breakpoints available. PSoC Creator reserves a single breakpoint to perform other operations such
as step, jump, and run-to-cursor. If the number of hardware breakpoints has been exhausted, and if you attempt to
add another, the debugger will display an information message to announce that the maximum number of
breakpoints has been reached. You will be prompted to place a software breakpoint instead. If the current action
does not require PSoC Creator to use the hardware breakpoint that was set aside, the first software breakpoint will
automatically use the available hardware breakpoint.
Note Breakpoints are hit twice when interrupts are enabled. This happens because the breakpoint gets hit, but
before the line of code is actually executed an interrupt takes over and gets processed. When the interrupt has
completed, the processor returns to the original line of code. This causes the breakpoint to be hit again.
To Open the Breakpoints Window:
Click Debug > Windows > Breakpoints.
Commands:
The Breakpoints window contains the following toolbar commands:
Icon
Command
Description
New
Delete
Enable/Disable Breakpoint
452
Icon
Command
Description
Deletes all breakpoints in the workspace instead of having to remove each one
individually. This is useful if there are multiple breakpoints set but you just want the
processor to run.
Enable/Disable All
Breakpoints
Alternately enables and disables all breakpoints in the workspace. Use this to
quickly change the state of all breakpoints instead of having to change each one
individually. This is useful if there are multiple breakpoints set but you just want the
processor to run.
Columns
To Set a Breakpoint:
1. Open the file you want to debug.
2. Click at targeted points in the left margin of the open file to set breakpoints; click again to unset them.
To Modify an Existing Breakpoint:
You can modify the breakpoint by right-clicking on it to access the following commands:
Location Opens the selected type of breakpoint dialog to modify the location.
See Also:
Address Breakpoint
File/Line Breakpoint
Function Breakpoint
Variable Watchpoints
Memory Watchpoint
Breakpoint Condition
Software Breakpoints
453
Address Breakpoint
The Address Breakpoint dialog is used to create a new breakpoint (or modify an existing one) at a specific address.
This breakpoint will be hit each time the Program Counter (PC) matches the address. It does not require any
information about the source code that was compiled to generate the program data.
When not in debug mode, you will not see address breakpoints displayed in the margin indicator of the source
editor. These types of breakpoints are only shown in the margin while in debug mode. You can see these
breakpoints in the Breakpoints window.
To Open the Dialog:
New Breakpoint
For a new breakpoint:
From the PSoC Creator Debug menu, select New Breakpoint > Address Breakpoint...
Existing Breakpoint
For an existing breakpoint, in the Breakpoints window, right-click on the breakpoint and select Location...
To Create a New Breakpoint:
Enter either a decimal or hexadecimal address to break on and click OK.
To Modify an Existing Breakpoint:
You can modify the breakpoint by right-clicking on it in the Breakpoints window to access the following menus:
See Also:
Breakpoints Window
File/Line Breakpoint
Function Breakpoint
454
Variable Watchpoints
Breakpoint Condition
File/Line Breakpoint
The File/Line Breakpoint dialog is used to create a new breakpoint (or modify an existing one) at a specific file line
of source code.
This breakpoint will be hit each time the line of code is being executed. This is the most convenient, but least
precise, means of adding a breakpoint.
To Open the Dialog:
New Breakpoint
For a new breakpoint, from the PSoC Creator Debug menu, select New Breakpoint > File/Line Breakpoint...
Existing Breakpoint
For an existing breakpoint, in the Breakpoints window, right-click on the breakpoint and select Location...
To Create a New Breakpoint:
Click in the Indicator Margin of the Code Editor at the line in which you want to create a breakpoint.
Note You can also use the dialog to enter the line number and full name of the file in which to put the breakpoint
and click OK.
To Modify an Existing Breakpoint:
You can modify the breakpoint by right-clicking on it in the Breakpoints window to access the following menus:
See Also:
Breakpoints Window
455
Address Breakpoint
Function Breakpoint
Variable Watchpoints
Breakpoint Condition
Function Breakpoint
The Function Breakpoint dialog is used to create a new breakpoint (or modify an existing one) at a specific function
in the program.
Use this to create a breakpoint that will be hit when the function is called, independent of how the code inside and
around the function is changed.
When not in debug mode, you will not see function breakpoints displayed in the margin indicator of the source
editor. These types of breakpoints are only shown in the margin while in debug mode. You can see these
breakpoints in the Breakpoints window.
Note A function breakpoint does not get displayed in the margin indicator. When the function has arguments, Keil
expects _ in front of the function name. Otherwise the function breakpoint does not work. To address this, prefix
the function name with _.
To Open the Dialog:
New Breakpoint
For a new breakpoint:
From the PSoC Creator Debug menu, select New Breakpoint > Function Breakpoint...
Existing Breakpoint
For an existing breakpoint, in the Breakpoints window, right-click on the breakpoint and select Location...
To Create a New Breakpoint:
Enter the name of a function to break on and click OK.
456
See Also:
Breakpoints Window
Address Breakpoint
File/Line Breakpoint
Variable Watchpoints
Breakpoint Condition
Variable Watchpoints
The Variable Watchpoint dialog is used to create a watchpoint (or modify an existing one) on a specific variable.
A watchpoint is used to set a breakpoint on a place in data memory as opposed to the standard breakpoint, which is
used for program memory. Instead of setting the breakpoint on a line of code, you set it on a variable in the code.
This watchpoint will be hit each time the address at which the variable is located is read, written, or accessed based
on your selection for Break on. Use it to track when specific variables/addresses are read from or written to. This
can help track down why a specific memory location does not have the expected value. Just like a standard
breakpoint, when hit, a watchpoint will cause the program to stop executing and an indicator will be displayed
showing what instruction triggered the watchpoint.
Unlike standard breakpoints that are associated with a specific instruction in code, watchpoints can be hit at any
number of instructions. It all depends on the data that is accessed by the instruction. Because of this, watchpoints
do not show any indicator in the left hand margin of the text editor. However, they are still listed in the Breakpoint
Window.
Note The number of watchpoints available depends on the device being debugged. Refer to the applicable device
datasheet for more information.
457
From the PSoC Creator Debug menu, select New Breakpoint > Variable Watchpoint...
Existing Watchpoint
For an existing watchpoint, in the Breakpoints window, right-click on the watchpoint and select Location...
To Create a New Watchpoint:
Enter the name of the variable to break on and click OK.
To Modify an Existing Breakpoint:
You can modify the breakpoint by right-clicking on it in the Breakpoints window to access the following menus:
See Also:
Breakpoints Window
Address Breakpoint
File/Line Breakpoint
Function Breakpoint
Memory Watchpoint
Breakpoint Condition
Software Breakpoints
458
Memory Watchpoint
The Memory Watchpoint dialog allows you to select the address, width, address space, and break type.
Memory watchpoints are similar to Variable Watchpoints, but as they can be set on a particular memory address
instead of a variable. Memory watchpoints are used by the Analog Device Editor to detect when switches are
opened or closed. However, memory watchpoints can be used for other things as well, such as monitoring for stack
or data corruption.
The dialog contains the following fields:
Address The address to set the breakpoint on. (Note The bottom n-bits of the address will be ignored
based on the specified Width.)
Width The number of bytes to set the breakpoint on. This is implemented by ignoring the bottom n-bits in
the address.
Break On The type of memory access for which the watchpoint should be triggered.
Address Space If the device has multiple memory spaces, this selects which one.
From the PSoC Creator Debug menu, select New Breakpoint > Memory Watchpoint...
Existing Watchpoint
For an existing watchpoint, in the Breakpoints window, right-click on the watchpoint and select Location...
To Create a New Watchpoint:
Enter a decimal or hexadecimal address to break on and click OK.
To Modify an Existing Breakpoint:
You can modify the breakpoint by right-clicking on it in the Breakpoints window to access the following menus:
459
See Also:
Breakpoints Window
Address Breakpoint
File/Line Breakpoint
Function Breakpoint
Variable Watchpoints
Breakpoint Condition
Software Breakpoints
Breakpoint Condition
The Breakpoint Condition dialog is used to add/modify a condition on a breakpoint.
This allows you to control when the debugger will actually report that the breakpoint was hit. Use it to allow code to
be executed an arbitrary number of times while the condition is not true. This provides a quicker means of
identifying problems then breaking every time and then manually evaluating the condition.
To Open the Dialog:
In the Breakpoints window, right-click on the breakpoint and select Condition...
To Set a Breakpoint Condition:
Enter a condition that must evaluate to true before the code is halted, and click OK.
For example: i>10 or a==b
See Also:
Breakpoints Window
Address Breakpoint
File/Line Breakpoint
Function Breakpoint
Variable Watchpoints
460
A breakpoint is hit when the breakpoint location is reached and the condition is satisfied. The hit count is the
number of times the breakpoint has been hit. This allows you to control when the debugger will actually report that
the breakpoint was hit. Use it to allow the code to be executed a few times before actually triggering the breakpoint
for user intervention. This is useful for quickly checking boundary conditions and finding out if code is executing
more than expected.
To Open the Dialog:
In the Breakpoints window, right-click on the breakpoint and select Hit Count...
To Set the Breakpoint Hit Count:
Enter the number of times the breakpoint can be hit before halting click OK.
Click Reset to reset the number of times the breakpoint has already been hit.
See Also:
Breakpoints Window
Address Breakpoint
File/Line Breakpoint
Function Breakpoint
Variable Watchpoints
Breakpoint Condition
Software Breakpoints
A software breakpoint is a breakpoint that is implemented on the Host PC side, once all Hardware breakpoints
supplied by the target device have been exhausted.
A software breakpoint causes PSoC Creator to single step the processor and compare the PC with the breakpoint
address. If they match PSoC Creator will report that a breakpoint has been hit. If the PC does not match the
461
breakpoint address it will continue stepping through code. Because the processor is single stepping through the
code instead of just running it will be significantly slower.
How to Use Software Breakpoints:
Once all Hardware breakpoints are exhausted for the target device, PSoC Creator will automatically use software
breakpoints for all future breakpoints. Depending on the settings in the Debugging Options dialog, the tool may
warn you about using Software breakpoints. If some of the hardware breakpoints are removed, the software
breakpoints will be converted to hardware breakpoints to improve debugging performance.
See Also:
Breakpoints Window
Debugging Options
Registers Window
The Registers window displays the core CPU registers and their values.
It provides a means of quickly viewing what is happening in core of the processor. It also allows for modifying the
value of any of the registers as you see fit to be sure the processor is doing what it is expected to do.
This window will be updated at every halt event. The values displayed in this window are displayed in hexadecimal
format by default.
Context Menus:
The following options are available if you right-click in the window:
462
See Also:
Register Details
The Register Details dialog allows you to see more detailed information about a specific register. It displays each of
the fields within the register, their access restrictions, and the value that is set for the field.
Additionally, hovering over a field brings up a tool tip describing the field and, in some cases, what specific settings
mean.
To Modify a Value:
Click on the value cell for the field you wish to modify, set the new value and clicking the Commit button.
Click the Restore button to restore the value of the register that is currently on the chip.
See Also:
Registers Window
Debugger Windows
463
Each function call that has not yet completed gets placed on the top of the stack. When the function is completed it
will get popped off. This tool is useful in seeing how code is being executed and to make sure things are happening
in the correct order. It provides an easy means of tracing exactly how the program got to executing the current line
of code.
This window displays the name of each function and may be accompanied by optional information, such as line
number, byte offset, etc. The display of this optional information can be turned on or off.
Context Menus:
The following options are available if you right-click in the window:
Switch to Frame Changes the active item, same as double clicking an item
Run to Frame Causes code to execute until the selected frame is reached
Show Module Name Shows the file that the function exists in
Show Line Number Shows the line in the function that performed the call
Show Byte Offset Shows the instruction address that the call was made from
464
See Also:
Locals Window
Locals Window
The Locals window allows you to view and modify all of the local variables in the current debug frame.
You can see the value, type, and address of any variable. This allows you to quickly see if a function is behaving as
expected and updating its variable items appropriately.
This window contains the following columns:
Name contains the names of all local variables in the current scope. Structure and array variables have a
tree control that you can use to display or hide the elements.
Value shows the value contained by each variable. By default, integer variables are represented in
hexadecimal form. You can change the representation to decimal by right-clicking the Locals window and
choosing the Decimal Display option from the shortcut menu.
Type identifies the data type of each variable listed in the Name column.
465
Context Menus:
The following options are available if you right-click in the window:
Edit Value Edits the entrys value, same as double clicking on the Value field
Collapse Parent Collapses the entrys parent item so child nodes are hidden
To Modify a Variable:
Double-click an entrys Value field to change the value of the item, if not read-only.
See Also:
Locals Window
Disassembly Window
The Disassembly window displays the basic instructions created for your source code.
Rather than forcing you to read instruction codes in binary or hexadecimal format, the instructions are
disassembled into assembly-language format. It allows you to view and enter breakpoints from combination of user
source code and compiled assembly instructions in order to see at a lower level exactly what the code is doing.
466
Using the Disassembly window, you can step through the assembly code, set breakpoints and interact with the
code using all the same capabilities you can use when debugging the C source code. Mixed mode disassembly, for
example interspersed C code, may also be displayed.
Assembly-language code consists of mnemonics, which are abbreviations for instruction names, and symbols that
represent variables, registers, and constants. Each machine-language instruction is represented by one assemblylanguage mnemonic, usually followed by one or more variables, registers, or constants. Because assembly code
relies heavily on processor registers (or, in the case of managed code, common language runtime registers), you
will often find it useful to use the Disassembly window in conjunction with the Registers window, which allows you
to examine register contents.
Context Menus:
The following options are available if you right-click in the window:
Run to Instruction Run the processor until the current address is reached
Show source lines when available Intermixes user source and assembly code
Show code bytes Shows the code data that represents the instructions
To Insert a Breakpoint:
Click in the margin next to a line of code. Click again to remove it.
See Also:
Registers Window
467
To Apply Settings:
If the settings for the communication channel have not been configured, or if they have been reconfigured by a
different application, use the Apply Settings button to apply the settings from Programmer/Debugger Options
dialog.
468
all devices
devices compatible with the selected device for the active project
devices that are an exact match of the selected device for the active project
Note To be compatible, the target device must come from the same family and must have all (or more) of the
resources as the project's device.
To Select a Device:
Devices can be connected via the MiniProg3 or kits and used within PSoC Creator. Under each MiniProg3 and kit
will be a list of devices attached to that MiniProg3 or kit.
Clock on the appropriate device from the list and click Connect to use that device when programming or
debugging.
The debugger will remember this selection for all subsequent debug sessions while PSoC Creator is opened. If you
want to select a different debug target at any time, re-open the Select Debug Target dialog.
Note The Connect command locks the selected device for exclusive use by this session of PSoC Creator.
If the chip was programmed without debugging enabled, clicking Port Acquire may be necessary for PSoC Creator
to properly read the silicon revision. Doing so will reset the device and place it in a temporary debug state. While in
this debug state code will not execute.
If after running Port Acquire, PSoC Creator still has trouble recognizing the silicon revision, PSoC Creator may be
too old to handle this version of silicon, or the board may be incorrectly wired for the current settings in PSoC
469
Creator. Verify the wiring of the board and the options selected under the Programmer/Debugger Options dialog.
For example, if the options for the MiniProg3 are set to use Reset for the Programming Mode, then the MiniProg3's
XRES pin must be connected to the PSoC's XRES pin.
Context Menus:
Each node in the displayed tree may have commands accessible via the right-click menu. You can use these
commands to configure the communication channel settings, for example.
See Also:
Device Configuration
MiniProg3
QuickProgrammer
Programmer/Debugger Options
Attach to Target
The Attach to Target dialog allows you to connect to an already programmed target device.
Use this dialog to debug a design that has been running for a while and has stopped working as expected. You can
also use it for debugging a design for which no source code is available. Unlike the standard debugging flow, this
command will not reprogram the device before opening the debugger.
470
Note Use of this feature will cause a momentary interruption in the code running on the PSoC device.
You can select a project file, a workspace file, or an elf file to use as the debug file. If you select a Project or
Workspace, it will open that item in PSoC Creator. If a project is already open in PSoC Creator, this field will be
automatically populated with the active project. This field is not required to attach the debugger to the target, but
specifying a file does allow for more options while debugging.
To Select a File:
Click [ ... ] and navigate to the Project, the Workspace, or the ELF file to select.
If a project is already open in PSoC Creator, this field will be automatically populated with the active project, and the
browse button will be disabled. You can only select a file if there is no active project.
This field is not required to attach the debugger to the target, but specifying it does allow for more options while
debugging.
To Select a Device:
Click on one of the devices listed that are attached to the computer. You may choose any item from this list to
attach to.
See Also:
471
Device Configuration
The Device Configuration dialog is used to configure PSoC Creator to identify a 3rd party device and report the
provided name instead of just the silicon ID.
This is done so the Select Debug Target dialog can list correct information about devices that are attached to a
computer.
Note While this configuration allows PSoC Creator to recognize 3rd party devices, these devices cannot be
selected for debugging. The primary use of the Device Configuration dialog is to configure the size of the Instruction
Register and Data Register for 3rd party devices attached in a JTAG chain.
From the Tools menu, select the Options > Program/Debug > Device Recognition.
From the Select Debug Target dialog, right-click on the device node and select Configure.
See Also:
MiniProg3
Debugging Options
472
MiniProg3
The MiniProg3 is used for both programming and debugging a PSoC device. It supports a number of different
transfer protocols, including:
SWD
JTAG
I2C
See Also:
Program/Debug Options
Device Configuration
QuickProgrammer
QuickProgrammer is the means by which PSoC Creator automatically invokes PSoC Programmer as needed. This
saves the time of manually launching and configuring PSoC Programmer. QuickProgrammer can be used in two
different ways.
473
See Also:
Error Handling
This section details how the debugging module will handle various errors, such as the USB cable being unplugged.
Hardware is Disconnected:
If the hardware is disconnected from the PC during a debugging session, the IDE will inform you through a dialog
box the next time you attempt to communicate with the chip.
474
There are several steps to complete your PSoC Creator project, including:
475
See Also:
Workspace Explorer
AN61290
<INSTALL_DIR>\PSoC Creator\import\gnu_cs\arm\<version>\share\doc\
<INSTALL_DIR>\PSoC Creator\import\keil\pk51\<version>\C51\hlp
Note These documents are also available directly from the PSoC Creator Help menu.
See Also:
Help Menu
http://www.cypress.com/go/psoccreator
http://www.cypress.com/go/psocprogrammer
See Also:
476
See Also:
Archiving a Workspace/Project
If the toolbar is not available, refer to the Customize dialog topic for how to add it.
See Also:
Customize
477
See Also:
System Editor
Workspace Explorer
478
See Also:
System Editor
Workspace Explorer
479
Note If you have selected the optional reset line and require in-system programming for your target system, you will
need to ensure that your programming solution (distributor, contract manufacturer, or third-party programming
vendor) supports power cycle programming modes.
See Also:
System Editor
Workspace Explorer
See Also:
Workspace Explorer
480
NVL configuration data. To learn how to do this, refer to the appropriate PSoC device programming specifications
available online:
http://www.cypress.com/go/p3_p5_trm
See Also:
See Also:
481
Reference Material
The following various documents are also included with this release
Provided by Cypress
The installed documentation is listed under Documentation on the PSoC Creator Help menu.
Clocking
Power Management
Interrupts
Cache
Pins
Register Access
System Functions
482
Reference Material
Watchdog Timer
There are different guides for different devices. Go to the System Reference Guides item on the PSoC Creator
Help menu for a list of documents and links.
Create a component/symbol
Note These chapters provide a logical grouping of related information and they present one, but not the only,
possible workflow process for creating a component.
483
Reference Material
The first chapter covers the Verilog language constructs supported in Warp.
The second chapter covers register and tri-state synthesis implemented in Warp.
The Warp synthesis compiler is a Verilog compiler for designing with PSoC devices. Warp accepts Verilog text input
and then synthesizes and optimizes the design for the target hardware. Warp then outputs a file for programming
the device. Warp operates in the background. Most users will not interact with the program directly.
See Also:
Control File
Directives
You can access these documents from the PSoC Creator Help menu.
484
10 Contact Us
Thank you for contacting us. We value your suggestions and comments to help us improve PSoC Creator.
Use any of the following methods to contact us:
Build Version [Select About from the PSoC Creator Help menu.]
O/S
485
The Register PSoC Creator dialog displays automatically at startup, unless you have already registered PSoC
Creator or indicated not to display the dialog.
You can also open this dialog from the Help menu by selecting Register...
If the registration process fails, an error message will display on the dialog.
If you cancel the registration process or if the network was unreachable after three attempts, the dialog will
display a check box that allows you to never register the product.
486
Information Gathered:
The registration process will transmit the following configuration information to Cypress and associate it with your
cypress.com account.
Memory size
If you are concerned about how we use the information gathered by our products, click the How Cypress will use
my information link to open your web browser to a page that documents the kinds of information Cypress gathers
during registration, the kinds of information gathered by the data collection system, and link to the Cypress privacy
policy page.
Information Levels:
Please select one of the following levels of information to be sent to Cypress to help improve PSoC Creator:
Level 3 level 2, plus usage and configuration information from design components
487
12 Index
Breakpoints Window
3
3rd Party IDE
362
A
Add/Edit Design
Adding
232
65, 262
Component Item
262
New Workspace
65
Build Menu
452
94, 305
Build Settings
306
304
Building
303
303
170
170
Address Breakpoint
454
211
215
464
221
Catalog Placement
266
476
Archiving
69, 477
Project
477
Workspace
69
Defining
266
Clock Editor
224
Clocks
28
Code Editor
180
313
182
Attach
470
181
Target
470
Code Example
119
Attribute
323
184
Auto
153
Code_generation
306
Auto Complete
183
289
315
Completing
475
Project
475
Component
271
Exporting
271
B
Basic Design
17
48
Breakpoint Condition
460
461
488
Index
483
Component Catalog
160
449
Component Item
262
262
309
Component Terminals
264
Debugger
437
Component Update
104
Using
437
Component/Instance
59
Debugger Indicators
Concepts
57
95, 440
163
444
226
438
228
Debugger Windows
445
Configure_Dialog_Descriptions
275
Debugging
35
Connecting_Terminal
164
Design
35
Connectors
175
Contact Us
485
Default Compiler
Control File
322
324
326
Adding
Copying
Project
Creating
Customizing
Framework
Selecting
Defining
Catalog Placement
72
Dependencies
72
Design
Debugging
149
149
345
443
426
73
73
266
266
109
35, 362, 363, 379, 390
35
Folders
75
New File
73
290
New Project
60
133
299
Export
New Schematic
158
Parameter Validators
270
Design Tutorials
Symbol
257
Design-Wide Resources
205
Symbol Parameters
268
Device Configuration
472
CSAttribute
323
Device Selector
111
Customize#Keyboard
107
Directives Editor
250
483
disable schematic
177
311
Disabled Code
188
489
Index
Disassembly Window
466
186
DMA Editor
238
119
DMA Wizard
239
Find in Files
191
244
Find Replace
189
241
Find Results
202
242
FixedAttribute
323
151
Flash Programming
426
Document Windows
79
252
Download
476
150
Drawing
170
Folders
Buses
170
E
Eclipse IDE
363
Edit Menu
75
Creating
75
Format Shape
288
Framework
149
Customizing
91
149
EEPROM Editor
254
Framework Description
76
479
82
480
Function Breakpoint
456
Enumeration Types
114
FX2LP Drivers
429
Environment Options
138
Error Handling
474
General Tasks
481
Generate Verilog
120
74
Generated Files
330
74
Generating
Existing File
Opening
Existing Project
Opening
Export
Component
Design
64
64
Project Datasheet
Getting
Started
59
71
71
7, 239
7
H
Hello World Blinky
Help Menu
8
98
115
File/Line Breakpoint
455
Files
141
IAR IDE
379
141
IAR Project
381
Reloading
153
490
Index
419
Import Component
121
186
Interrupt Editor
236
Interrupts
32
New File
Creating
New Project
Creating
New Schematic
Creating
K
Keil Vision IDE
390
Keil Compiler
359
Keyboard Shortcuts
100
New Workspace
Adding
Notice Details
Notice List Window
L
Language Support Options
135
39
73
73
60
60
158
158
65
65
124
86
O
Obsolete Device
124
217
320
Ohm Meter
Library_project
410
Opening
Lines
295
Existing File
74
318
Existing Project
64
Locals Window
465
Projects
223
Logical
25
M
Managing
28
405
476
Options Dialog
125
Output Window
85
P
Parameter Validators
Manual Placement
219
Mapper
321
Memory Watchpoint
459
Pin Editor
Memory Window
445
Pins
Creating
270
270
207
25, 235
Placer
321
429
Print Preview
140
434
Program/Debug Options
136
Modified Files
123
Program_the_Device
153
Project As
MiniProg3
Registering
My First Design
429, 473
Saving
Project Datasheet
N
Names
173
Generating
8
71
71
71
71
491
Index
Project Item
65
Replace in Files
194
Project Menu
93
Resize
295
Project Types
58
Resizeshape
297
475
Route Editing
220
Project_management
Projects
125
69, 72, 405, 419, 475, 477
Archive
477
Router
321
Completing
475
Rubber-Banding
168
Copying
72
Opening
405
Properties
141
PSoC
360
PSoC Creator
57, 326
S
Saving
Project As
Schematic
71
71
32
schematic comment
177
57
Schematic Editor
156
76
157
303
285
303
Schematic Terminals
178
418
schematic, disable
177
PSoC UDBs
326
Search Result
203
451
Select Datasheet
143
468
Understanding
PSoC Creator Framework
PSoC Creator Project
Building
Q
QuickProgrammer
473
R
Reentrant Code
360
480
Reference Material
482
479
Reference Tooltips
187
478
Register Details
463
144
486
Register_to_Register_Section
334
Selecting
Registering
429
Default Compiler
73
429
477
Registers Window
462
Setting
381
Regular Expressions
196
Steps
381
Reloading
141
Shapes
297
Files
141
286
MiniProg3
234, 235
73
492
Index
145
Types
Signal Name
146
Software Breakpoints
461
279
334
UDB Count7
282
UDB Datapath
275
273
UDB Editor
272
UDB Properties
274
Standard Toolbar
Started
Getting
Starter Designs
99
15
78
334
283
Steps
381
280
381
281
257
Understanding
Setting
Symbol
57
Creating
257
Symbol Editor
256
260
Symbol Parameters
268
152
268
Using
437
Creating
PSoC Creator
Updating
uVision Projects
57
410
410
Symbol Wizard
258
232
155
System Editor
245
175
482
293
uVision
405
uVision Projects
410
T
Target
Attach
470
Debugger
470
Updating
Terminal Name
147
Text
292
Variable Watchpoints
129
View Menu
484
To Line
204
312
Tools Menu
98
484
148
437
410
457
92
484
Watch Window
447
Welcome
Wide Clock
232
Wildcards
201
493
Index
Windows
78
Workspace/Project
Wire Labels
173
Wires
164
XTAL Configuration
Workspace
69
Archiving
69
Workspace Explorer
57
230
Z
Zooming
298
83
494