ProDG PSP VS - NET-E
ProDG PSP VS - NET-E
SN Systems Limited
Version 1.8.3
May 1, 2009
Copyright © Sony Computer Entertainment Inc. / SN Systems Ltd, 2003-2009.
"ProDG" is a registered trademark and the SN logo is a trademark of SN Systems Ltd.
"PSP" is a registered trademark of Sony Computer Entertainment Inc. "Microsoft",
"Visual Studio", "Win32" and "Windows" are registered trademarks of Microsoft
Corporation. "GNU" is a trademark of the Free Software Foundation. Other product
and company names mentioned herein may be the trademarks of their respective
owners.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 3
Contents
Contents
1: Visual Studio integration 5
Document version history 5
Overview of Visual Studio integration 5
Features 5
Known issues 6
Overview 27
7: Index 28
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 5
Visual Studio integration
Features
VSI has the following main features:
Supports the SNC C/C++ Compiler.
Includes project AppWizards for all common project types.
Toolchain command-line switches, command-line arguments for the debugger
and executable, and fileserving paths, can all be set via a configuration dialog.
Supports configuration-specific properties, e.g. different linker scripts could be
used for debug and release builds.
Full source dependency checking for C, C++ and all assemblers during the build
process.
Outputs compiler and linker errors/warnings in Visual Studio format so that
double-clicking on a build error in the output window opens the source file on
the appropriate line in the Visual Studio editor.
Use MS Intellisense features when editing C and C++ source.
Enables the ProDG Debugger to be called directly from Visual Studio via a
toolbar button or the standard debugger start key (<F5> by default) to debug
the current project.
Imports and exports Visual Studio breakpoints (including all relevant properties
and exporting conditionals) at the start/end of a debug session in the ProDG
Debugger.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 6
Visual Studio integration
Ability to open source, shown in the ProDG Debugger source pane, in the Visual
Studio Editor to enable source file editing.
Known issues
Building of projects with source files of the same name but with differing
extensions is now possible. However, the object file names need to be manually
configured. By default, Visual Studio will automatically modify object file names
for C and C++ files to stop them overwriting each other. For example, file.c and
file.cpp will be compiled to file.obj and file1.obj to prevent a link error. This
automatic naming occurs if the Object File Name field has not been explicitly
specified in place of the default entry of $(IntDir)/. However, this automatic
naming does not occur for files other than C/C++ source files. So the files file.c
and file.s will both compile to file.obj and cause a link error, as Visual Studio
does not recognise file.s as a valid source file. To work around this the Object
File Name for file.s can be explicitly named so it does not clash with any other
files in the project. For example, $(IntDir)/file1.obj would work OK.
Breakpoints added to Visual Studio from the ProDG Debugger cannot be
removed by double-clicking on them in the source window. It has to be done
from the menu or Breakpoint Manager. This is a bug in Visual Studio.
Project dependencies are not on a per-solution configuration basis. This can be
an issue with multi-platform solutions when including platform-specific project
libraries. This is a restriction of Visual Studio.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 7
Installation and configuration
The selection shown in Target dictates which particular target the settings relate to
when more than one ProDG target is available. Change this to the appropriate target
you wish to configure.
The selection in Show dictates which settings are displayed.
Include file directories – Directories that will be searched by the compiler for
included header files in your source code.
Library file directories – Directories that will be searched by the linker when
looking for included library files.
Standard libraries – The list of libraries to link with your executable project.
Note: The libraries and directories specified here will be used after those given in
the properties for your project.
To remove a directory from a list, highlight it using your mouse, and then click
the delete button above the directory display.
To change the order of the entries in the list, click the up and down arrows to
change the position of the currently selected entry.
To check the validity of the directories in the list, click on the check button.
Build Settings
This dialog controls how information is displayed during a build, as well as whether
intermediate files are left afterwards.
Generate verbose Enables verbose output during compiling. Normal verbose displays
build information the tool command lines used, " More Verbose" turns on verbose
mode (-v) for tools as well.
Show object cache Cache hits are displayed in the Output window when files being
hits for SN-DBS compiled via the SN-DBS are fetched from the object cache. "Extra
Information" displays further information about the cache.
Leave Check this option to cause the compiler to save an assembler
intermediate listing.
assembler output
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 9
Installation and configuration
This dialog contains settings that affect the way projects are built, as well as what
happens when errors are encountered. The dialog is separated into three sections,
the VSI Build System, Local Build Settings, and SN-DBS Build Settings.
VSI Build System
Use VSI build New functionality in VSI 1.7 allows the VSI to control project and
system for ProDG solution builds completely. This allows quicker dependency
projects checking and support for building multiple projects in parallel. This
feature can be turned off to revert to the functionality from the 1.6
VSI. Some build features are not available when this option is not
selected.
Stop building on When selected, a local build will stop after the first error found in a
first error when project. Otherwise the build will continue which may generate more
building locally errors. If the VSI build system is not selected other projects in the
solution may still be built if a solution build was started, however.
Run tool chain at This option will run the tool chain executables at a lower than
below normal normal priority during a build. This can make a PC more responsive
process priority during a build, especially if a large number of files are being
compiled at once.
Maximum compile This setting specifies the number of files in each project that can
processes per be compiled at the same time when building locally.
project
Maximum number This setting specifies how many projects in a Solution can be built
of projects to in parallel when building locally.
build in parallel
when building
locally
Two different parameters can be adjusted that control how many compile processes
are run concurrently. The Maximum number of processes per project to spawn
while compiling sets the number of source files in each project that can be
compiled at the same time. By default, one build process will be spawned for each
'Processor' as reported by Windows. For a PC with a single core CPU, just one build
process will be spawned by default and so all files from a project will be compiled
serially. For PCs that have more than one core or CPU, or have a 'hyperthreading'
CPU, files will be compiled concurrently by default.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 10
Installation and configuration
Advanced: This behavior can be changed by unchecking the Default check box. The
number of processes can then be explicitly specified in the Maximum compile
processes per project edit box. Depending on your particular PC hardware set up,
you may find that increasing or even decreasing the value used provides some
performance increase. But too many processes could cause disk thrashing or use up
a large amount of RAM. Please note that this option does not have any effect during
builds when using SN-DBS.
The second parameter is the Maximum number of projects to build in parallel.
This can allow more than one project to be building at any one time. The benefit
from this is that while one project may be busy accessing the hard disk producing a
library, another can continue CPU-intensive compiling. Hard disk intensive tasks
such as linking and archiving are done serially so as to minimize disk thrashing.
There are two individual values for the parallel build setting: one is for local builds,
and another for SN-DBS builds.
Stop building on This is an equivalent of the local setting, except it is used when
first error when building with SN-DBS.
building with SN-
DBS
Maximum number This setting specifies how many projects in a Solution can be built
of projects to in parallel when building with SN-DBS. This value can typically be
build in parallel higher than with local builds.
when using SN-
DBS
Rebuild ProDG Forces the VSI toolbar to be redrawn when Visual Studio is next
VSI toolbar restarted.
Capture TTY text Selects whether the TTY text output by your program when "Load
to Output and run executable file" is used, is captured to the Output window.
window on
Execute
Use v2.x of the If checked, uses ProDG Debugger v2.x. The debugger is launched
ProDG Debugger when Load ELF and Run ELF are selected from the VSI toolbar.
Disable If checked, when ProDG Debugger v2.x. is used this prevents the
breakpoint debugger from importing breakpoints set in your source code under
integration for Visual Studio.
v2.x Debugger
The debugger command line and other debugger settings can be set per project
under the Debugging page of the VSI Project Properties dialog. See "Debug/Tuner
property page" on page 18.
will display the VSI version information and help dialog. As well as giving version
information on the VSI installation, it will also list the versions of the ProDG
Debugger and Build Tools.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 12
Installation and configuration
Clicking on the Help button in the dialog will display the online help document.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 13
Working with projects
2. Select one of the project templates in the ProDG VSI PSP Projects folder:
PSP Overlay App
PSP Hardware Library
PSP Hardware PRX
3. Enter the name of your new project in the Name field.
4. In the Location field browse to the desired location for the new project file.
If the project source files are in a different location to the Visual Studio project
file, then Visual Studio will not be able to locate any included files even if they
are in the same directory as the source file. The solution (for this project
configuration) is:
For the SNC C/C++ Compiler use the VSI Project Properties dialog (see "VSI
project properties" on page 16).
5. Click OK.
By default each new project is created with debug and release project
configurations. PSP projects also include debug optimized project configurations. At
the same time, solution configurations, with the same names, are also created if
these are not already present in the Solution Configuration list:
For example, a PSP Hardware PRX is created with three project configurations:
Debug, Release and Debug Opt. If a new solution is created for the project, then
corresponding solution configurations will also be created which will build each of
the project configurations. You can use the Configuration Manager to modify each
solution configuration, so that it only builds the projects you want, using the project
configuration you specify.
Display VSI online help. See "VSI online help" on page 11.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 15
Working with projects
Display VSI Project Properties. See "VSI project properties" on page 16.
Load executable with ProDG Debugger and stop at main(). See "Integration with the
ProDG Debugger" on page 25.
Run executable with ProDG Debugger. See "Integration with the ProDG Debugger" on
page 25.
Load and run executable file. See "Loading and running executable files" on page 25.
When the VSI is building a ProDG project, this button is enabled to allow the build to
be cancelled.
Open in ProDG Displays the selected files in the currently open ProDG Debugger.
Debugger
Show File Each selected source file is run through the compiler to produce a
Preprocessed preprocessed file. The files will be compiled using the same project
settings used during a build. The generated files are then opened in
the IDE.
Show file Creates a disassembly file from the object files for the selected
Disassembly source files. The source files are compiled as necessary. The
generated files are then opened in the IDE.
ProDG VSI Displays VSI Project Properties dialog. See "VSI project properties"
Project on page 16.
Properties
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 16
Building with the SNC C/C++ Compiler
Note: You MUST view VSI project properties using the SN Systems VSI Project
Properties toolbar button (see "The ProDG VSI toolbar" on page 14). Other property
pages for the project may be accessed through standard Visual Studio menus, but
these will not necessarily show correct information.
In the left pane, select a folder to display the property pages. The left pane
displays one or more folders that provide access to property pages, depending
on the selection made in Solution Explorer. The top-level property page is
always the General page. Its content depends on whether projects or files were
selected.
3. In the right pane, set the available properties you wish to change.
4. Click Report to generate a report of the project and file properties for the
current project configuration.
A report will be displayed in the Visual Studio files view, similar to this:
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 17
Building with the SNC C/C++ Compiler
Output Directory Specifies the directory where tools such as the linker will place
all final output files that are created during the build process.
Exclude From Build Specifies whether the file should be in the build for the current
configuration.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 18
Building with the SNC C/C++ Compiler
General
Additional Specifies one or more directories to add to -I<path>
Include the include path; use semi-colon delimited
Directories list if more than one.
Preprocessor Specifies one or more preprocessor defines; -D<name=
Definitions use semi-colon delimited list if more than [value]>
one.
Force Includes Specifies one or more forced include files. -include <path>
Generate Debug Specifies if the compiler will generate -g
Information debugging information. You must also
change linker settings appropriately to
match.
Warnings Selects whether warnings and remarks are -Xdiag=0..2
issued during compilation; errors are
always displayed.
Treat Messages Enables the compiler to treat all warnings -Xquit=0..2
As Errors and remarks as errors.
Object File Specifies a name to override the default -o<filename>
Name object file name; can be file or directory
name.
Optimization
Optimization Select option for code optimization. -O0..5
Level
Pragmas Allow source code pragmas to increase the -Xflex=1
Override -Ox level of control-variables governed by the
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 20
Building with the SNC C/C++ Compiler
Code generation
GP Specify the size in bytes that limits which -G0..x
Optimization data is considered "small". Data that is this
Data Size size or less will be put into the "small data"
section.
Template Controls the instantiation of template -Xtmpl=none | used |
Instantiation function and class definitions; see local | all | weak |
documentation for further information. linkonce +noautoincl
Initialized Data Data items that do not require link-time -Xbss=0..2
Placement initialization to specific non-zero values may
be placed in either the .data or .bss section.
Binary program files are smaller if such
items are placed in .bss, but compatibility
reasons may dictate placement in .data.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 21
Building with the SNC C/C++ Compiler
Language
C/C++ Dialect Select the C/C++ dialect to govern which -Xc=mixed+gnu_ext |
language features are available during ansi | arm | cp | cfront
compilation. | knr
C/C++ Custom Specify a custom value to use for the C/C++ -Xc=<value>
Dialect Value dialect setting. This value overrides the
C/C++ Dialect property.
Enable C++ Enable exception handling in C++ code. -Xc+= exceptions
Exceptions
Enable Runtime Enable Runtime Type Information in C++ -Xc+=rtti
Type code.
Information
Default Char Sets whether the unqualified char type is -Xchar= unsigned
Unsigned treated as signed or unsigned.
Default FP Treat floating point constants without a 'F' -Xsingleconst=1
Constants as postfix as single precision float type; default
Type Float is the double type.
Built-In Defines the type the compiler should expect -Xsizet=uint | ulong |
Definition For for size_t; should match system include file's ushort
size_t Type definition.
Built-In Defines the type the compiler should expect -Xwchart=uint | ulong |
Definition For for wchar_t; should match system include ushort | uchar | int |
wchar_t Type file's definition. long | short | char |
schar
Disable AltiVec Disable the built-in functions that allow -Xaltivec=0
Intrinsics access to the AltiVec instruction set.
Precompiled headers
Create/Use Enables the creation and use of precompiled --create_pch |
Precompiled header file(s) during the build. --pch |
Headers --use_pch
Precompiled Specifies the path and name of the --create_pch=
Header File generated precompiled header file when not <header.pch>|
using automatic per file precompiled --use_pch=
headers. <header.pch>
Command line
Additional Specify additional command line options for
Options for SNC SNC not provided by the other properties;
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 22
Building with the SNC C/C++ Compiler
General
Output File Specifies the output file name. -o<file.elf>
Additional Specifies additional items to add to the link
Dependencies line; configuration specific.
Additional Specifies one or more additional paths to -L<dir>
Library search for libraries; configuration specific; use
Directories semi-colon delimited list if more than one.
Ignore All Ignore all default libraries during linking.
Default
Libraries
GP Specify the size in bytes that limits which data -Gx
Optimization is considered "small". Data that is this size or
Data Size less will be put into the "small data" section.
Debug Info and Enable debugging information stipping and -S |-s
Symbol also symbol stripping from the output
Stripping executable file.
Unused Enable the stripping of unused function code -strip-unused |
Function and and also data from the output executable file. -strip-unused-data
Data Stripping
Compress Causes redundant debug information to be -sn-compress-
Debug eliminated as your code is linked. This reduces debug
Information the size of your debug PRX/ELF files, plus
reduces link and debugger load times.
Export Library Specify the name of the Export library
generated by this project. When this project is
specified as a dependency of another, the
Export library will be linked in.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 23
Building with the SNC C/C++ Compiler
Generate Map Enable the generation of a map file for the -Map <file.map>
File output executable file; normal or full. [-sn-full-map]
Map File Name Specifies a name for the mapfile.
Link Library Specifies whether library outputs from project
Dependencies dependencies are automatically linked in.
Command line
Additional Specify additional command line options for
Options for the Linker not provided by the other
Linker properties; the options format must be valid
for PSPSNC.
The files stdafx.cpp and stdafx.h files will also be added to your projects unless you
unselect the usage of pre-compiled headers in the project wizards.
The file prxpreloads.txt is provided to contain a list of PRX modules which are
preloaded by the debugger (using the -l<filename> switch).
You now need to add your project source files to the new project using the Add
Existing Item command on the Project menu. This brings up a file browser from
which you can select a file to add. The project source files needed by the project
makefile (.cpp, .c and .s, etc.) must all be added to the project before carrying out
the build.
Building your project is carried out as usual, by invoking the Clean, Compile and
Build (etc.) commands from the Visual Studio Build menu.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 24
Building with the SNC C/C++ Compiler
Switches for the SN C/C++ Compiler can be set for the project by using the property
pages available in the VSI Project Properties dialog. See "VSI project properties" on
page 16.
The TTY text generated by your executable running will be optionally displayed in
the Output window. This is selected on the Tools > Options > ProDG VSI > General
options dialog.
Alternatively, you can use the standard Start Without Debugging menu item from
the Debug menu, or by pressing CTRL+F5.
or by clicking the Run PRX with ProDG Debugger button on the VSI toolbar:
Alternatively, you can also use the following standard Debug menu items:
Start (<F5>) for Run PRX with ProDG Debugger
Step Into (<F11>)
Step Over (<F10>) for Load PRX with ProDG Debugger and Stop at Main
Note that the active project configuration will affect your ability to start ProDG
Debugger. When you click on the Execute PRX file button, ProDG Debugger will be
launched if the project was built with one of the ProDG build configurations as the
active project configuration AND the executable file has been successfully built.
ProDG Debugger is automatically launched with the following command line
switches:
pspdbg –vs –r –e
The –vs switch enables Visual Studio compatibility features (the -vs switch is
converted automatically to -vs7). The –r and –e switches reset the target and load
the executable contained in the built project PRX file. The execute switch -x is also
added for the Run PRX... operation. See User Guide to ProDG Debugger for more
information on debugger switches.
Note that when the ProDG Debugger has been started from Visual Studio, you can
click Import on the Options dialog in the Debugger to import various color settings
to match the current settings of Visual Studio.
USER GUIDE TO PRODG FOR PSP VISUAL STUDIO .NET INTEGRATION 26
Loading and running executable files
Overview
You can build ProDG projects from the command line in a similar way as you would
build a normal Win32 project. This is done by calling the vsibuild tool, located in
the $(SN_COMMON_PATH)\VSI \bin directory, and specifying the solution file (.sln)
and other options. All text output from the build will be output to stdout.
The following example builds the solution 'MySolution' with the "PSP Debug" solution
configuration:
vsibuild "Visual Studio Projects\MySolution\MySolution.sln" "PSP Debug"
If you have a solution platform associated with the solution configuration, you
specify this as part of the configuration name, e.g.:
vsibuild "Visual Studio Projects\MySolution\MySolution.sln" "Debug|PSP"
A solution can be built using SN-DBS (Distributed Build System) by specifying the
/sn-dbs command-line switch, e.g.:
vsibuild "Visual Studio Projects\MySolution\MySolution.sln" "Debug|PSP" /sn-
dbs
To rebuild a solution, use the /rebuild switch.
Please note that vsibuild can only be used to build solution configurations that
contain ProDG, makefile, and utility project configurations. It cannot at present build
project configurations like Win32. To build these configurations, you need to use
the devenv tool provided with Visual Studio. See the Visual Studio documentation
for further information. It is possible to build ProDG projects from the command line
by using devenv as well, but this feature is provided for backwards compatibility,
and is not recommended. Using devenv has a number of limitations when building
ProDG project, for example it is not possible to use SN-DBS v2.x.
Usage:
VsiBuild <"Solution File.sln"> <"Soutions Config [|Solution Platform]">
[/project "Project"] [Additional]
7: Index
Integration with ProDG debugger v2.0 11
A Integration with the ProDG Debugger 25
B Known issues 6
Build Settings 8
L
Build Settings (Advanced) 9
Building a PRX file without symbols 24 Language 21
Building projects from the command line 27 Librarian property pages (project) 23
Building with the SNC C/C++ Compiler 16 Loading and running executable files 25
Building your ProDG project with the SNC
C/C++ Compiler 23 O
Optimization 19
C
Overview 27
Code generation 20 Overview of Visual Studio integration 5
Command line 22, 23
Command line property pages 18 P
Controlling the build process of ProDG
projects 8 Precompiled headers 21
Creating a new project 13
S
D Setting breakpoints in your project 26
Debug/Tuner property page 18 Setting default directories and libraries 7
Document version history 5 SNC C/C++ property pages (project and file)
19
SNC Linker property pages (project) 22
E
SN-DBS property page 18
Editing your source in Visual Studio 26 Solution and project configurations 14
Source file only tasks 15
F
T
Features 5
The ProDG VSI toolbar 14
G
V
General 19, 22
General property page (file) 17 Visual Studio integration 5
General property page (project) 17 VSI online help 12
General VSI settings 10 VSI project properties 16
I W
Installation and configuration 7 Working with projects 13