SourcePoint Intel Help
Table of Contents
- Using Help
- Contacting ASSET InterTech
- Introduction to SourcePoint
- SourcePoint Environment
- SourcePoint Overview
- SourcePoint Parent Window Introduction
- SourcePoint Icon Toolbar
- File Menu
- File Menu - Project Menu Item
- File Menu - Layout Menu Item
- File Menu - Program Menu Item
- File Menu - Macro Menu Item
- File Menu - Print Menu Items
- File Menu - Update Emulator Flash Menu Item
- File Menu - Program Target Device Menu Item
- File Menu - Other Menu Items
- Edit Menu
- View Menu
- Processor Menu
- Options Menu
- Options Menu - Preferences Menu Item
- Options Menu - Target Configuration Menu Item
- Options Menu - Load Target Configuration File Menu Item
- Options Menu - Save Target Configuration File Menu Item
- Options Menu - Emulator Configuration Menu Item
- Options Menu - Emulator Connection Menu Item
- Options Menu - Emulator Reset Menu Item
- Options Menu - Confidence Tests Menu Item
- Window Menu
- Help Menu
- How To -- SourcePoint Environment
- Add Emulator Connections
- Configure Custom Macro Icons
- Configure Autoloading Macros
- Display Text on the Icon Toolbar
- Edit Icon Groups to Customize Your Toolbars
- Modify a Defined Memory Region
- Refresh SourcePoint Windows
- Save a Program
- Start SourcePoint With Command Line Arguments
- Use the New Project Wizard
- Verify Emulator Network Connections
- SourcePoint Overview
- Breakpoints Window
- Breakpoints Window Overview
- How To - Breakpoints
- Code Window
- Command Window
- Command Window Overview
- Confidence Tests Window
- Confidence Tests Window Overview
- Descriptors Tables Window
- Descriptors Tables Window Overview
- How To - Descriptors
- Devices Window
- Devices Window Overview
- How To - Devices Window
- Log Window
- Log Window Overview
- Memory Window
- Memory Window Overview
- How To - Memory Window
- Page Translation Window
- Page Translation Windows Overview
- PCI Devices Window
- PCI Devices Window Overview
- How To - PCI Devices Window
- Registers Window
- Registers Window Overview
- How To - Registers
- Symbols Windows
- Symbols Window Overview
- How To - Symbols Window
- Trace Window
- Trace Window Overview
- How To - Trace Window
- Advanced
- Viewpoint Window
- Viewpoint Window Overview
- Watch Window
- Watch Window Overview
- How To - Watch Window
- Technical Notes
- Descriptor Cache: Revealing Hidden Registers
- UEFI Framework Debugging
- Memory Casting
- Microsoft PE Format Support in SourcePoint
- Multi-Clustering
- Python/CScripts
- OpenIPC Integration, Installation and Usage
- Registers Keyword Table
- SourcePoint Licensing
- Stepping
- Symbols Textsym Format
- Target Configuration
- Using Bookmarks
- Which Processor Is Which
- Getting Started with DbC
- SourcePoint Command Language
- Overview
- Commands and Control Variables
- aadump
- abort
- abs
- acos
- advanced
- asin
- asm
- asmmode
- atan
- atan2
- autoconfigure
- base
- bell (beep)
- bits
- break
- breakall
- cachememory
- cause
- Character Functions
- clock
- continue
- cos
- cpubreak commands
- cpuid_eax
- cpuid_ebx
- cpuid_ecx
- cpuid_edx
- createprocess
- cscfg, local_cscfg
- csr
- ctime
- cwd
- dbgbreak commands
- defaultpath
- #define
- define
- definemacro
- deviceconfigure
- devicelist
- devicescan
- disconnect
- displayflag
- do while
- dos
- dport
- drscan
- edit
- editor
- emubreak, emuremove, emudisable, emuenable
- emulatorstate
- encrypt
- error
- eval
- evalprogramsymbol
- execution point ($)
- exit
- exp
- fc
- fclose
- feof
- fgetc
- fgets
- first_jtag_device
- flist
- flush
- fopen
- for
- forward
- fprintf
- fputc
- fputs
- fread
- fseek
- ftell
- fwrite
- getc
- getchar
- getnearestprogramsymbol
- getprogramsymboladdress
- gets
- globalsourcepath
- go
- halt
- help
- homepath
- idcode
- if
- include
- invd
- irscan
- isdebugsymbol
- isem64t
- isprogramsymbol
- isrunning
- issleeping
- issmm
- itpcompatible
- jtagchain
- jtagconfigure
- jtagdeviceadd
- jtagdeviceclear
- jtagdevices
- jtagscan
- jtagtest
- keys
- last
- last_jtag_device
- left
- libcall
- license
- linear
- list, nolist
- load
- loadbreakpoints
- loadlayout
- loadproject
- loadtarget
- loadwatches
- log, nolog
- log10
- loge
- logmessage
- macropath
- Memory Access
- messagebox
- mid
- msgclose
- msgdata
- msgdelete
- msgdr
- msgdump
- msgir
- msgopen
- msgreturndatasize
- msgscan
- msr
- num_activeprocessors
- num_all_devices
- num_devices
- num_jtag_chains
- num_jtag_devices
- num_processors
- num_uncore_devices
- openipc
- pause
- physical
- port
- pow
- print cycles
- printf
- proc
- processorcontrol
- processorfamily
- processormode
- processors
- processortype
- projectpath
- putchar
- puts
- rand
- readsetting
- reconnect
- Register Access
- reload
- reloadproject
- remove
- reset
- restart
- return
- right
- runcontroltype
- safemode
- save
- savebreakpoints
- savelayout
- savewatches
- selectdirectory
- selectfile
- shell
- show
- sin
- sizeof
- sleep
- softbreak, softremove, softdisable, softenable
- sprintf
- sqrt
- srand
- step
- stop
- strcat
- strchr
- strcmp
- strcpy
- _strdate
- string [ ] (index into string)
- strlen
- _strlwr
- strncat
- strncmp
- strncpy
- strpos
- strstr
- _strtime
- strtod
- strtol
- strtoul
- _strupr
- swbreak
- switch
- swremove
- tabs
- tan
- tapdatashift
- tapstateset
- targpower
- targstatus
- taskattach
- taskbreak, taskremove, taskdisable, taskenable
- taskend
- taskgetpid
- taskstart
- tck
- time
- uncoreconfigure
- uncorescan
- #undef
- unload
- unloadproject
- upload
- use
- verify
- verifydeviceconfiguration
- verifyjtagconfiguration
- version
- viewpoint
- vpalias
- wait
- wbinvd
- while
- windowrefresh
- wport
- writesetting
- yield
- yieldflag
Target Configuration
Overview
The emulator communicates with the target through the JTAG chain. ย In order to do this, it needs to know what devices are on the JTAG chain. The collective process of discovering these target devices and configuring them for communication is referred to as "target configurationโ.
Rather than hard-coding the target configuration process in SourcePoint or the emulator, ย a target configuration macro file is used. ย This gives the user maximum flexibility to control the target configuration process. ย For example, special JTAG commands might be required to unlock a JTAG chain before the emulator can communicate with it. ย These commands can be inserted in the target configuration macro.
Simple Targets
Simple targets can use the default target configuration files provided with SourcePoint. ย
Use the New Project Wizard (File | Project | New Project) to create a new project file. ย Under "Settings basisโ select "Use default settingsโ. This creates a project file with the target configuration event macro set to run a debug procedure called Configure. ย The default version of Configure is in config-utils.mac (in the macros directory). ย For simple targets it will work unmodified. ย
Complex Targets
Examples of complex targets include targets that need special commands to unlock debug capabilities, and targets that donโt scan properly. ย On these targets, the default Configure procedure will need to be modified. ย
Targets that need to be unlocked. ย The changes required are target-dependent, but usually consist of a series of msgscan commands to send special JTAG commands to the target.
Targets that donโt scan properly. ย In this case, one or more of the scan commands (jtagscan, apscan, and/or devicescan) is omitted. ย The corresponding SourcePoint configure command is used to send the configuration to the emulator. ย The configuration typically comes from a special target configuration file created for the particular target, but it can also be manually generated (see below).
Configuration Command Overview
The following is a list of the commands and control variables used in the target configuration process. ย For more details refer to the separate command topics for each.
Configuration Commands
Test the JTAG chain. |
|
Causes the emulator to scan the JTAG chain for devices. |
|
Sends the SourcePoint JTAG configuration to the emulator. |
|
Display or define a JTAG configuration. |
|
Verifies that the SourcePoint and emulator configurations match. |
|
Causes the emulator to scan for devices. |
|
Sends the SourcePoint device configuration to the emulator. |
|
Verifies that the SourcePoint and emulator configurations match. |
|
Displays a list of all configured devices. |
|
Performs the same function as the default Configure procedure. |
|
Disconnect emulator from target (discard current configuration). |
|
Reconnect using the target configuration event macro. |
|
Causes the emulator to scan the JTAG chain(s) for uncore devices. |
|
Sends the SourcePoint uncore configuration to the emulator. |
Database Commands
Display the JTAG device database. |
|
Add a device to the JTAG database. |
|
Remove a device from the JTAG database. |
Control Variables
The number of JTAG chains. |
|
The number of JTAG devices. |
|
The number of all devices. |
|
The number of processors. |
|
The emulator connection state (0, 1 or 2; see below). |
|
The number of uncores. |
Advanced Topics
The JTAG Device Database
SourcePoint maintains a database of known JTAG devices in targets\jtag-devices.xml.
The Configuration view is used to display and edit the database. ย It is accessible by pressing the Configuration button in Options | Target Configuration | Target Devices, and then selecting JTAG Info.
The command language also supports viewing and modifying the database. ย The jtagdevices command displays the database. ย The jtagdeviceadd and jtagdeviceclear commands add and remove devices.
If you install a new version of SourcePoint, it may include a newer version of the database file. ย In this case SourcePoint merges the old and new files, so any user changes to the database are not lost.
Manually Defining the JTAG chain
If the JTAG chain cannot be scanned, and the target you are trying to connect to does not have a target configuration file, then it is possible to manually define the JTAG chain configuration. ย This can be accomplished in the JTAG Configuration tab in the Configuration view. ย All devices must already exist in the JTAG device database (the JTAG info tab).
The command language also supports defining the JTAG chain configuration. ย The jtagchain command displays or sets the devices on the JTAG chain. ย The jtagchainclear command clears the devices on the JTAG chain.
What the Configure Procedure Does
The Configure debug procedure (in macros\config-utils.mac) is the default target configuration method. It will work for most targets. Configuration consists of 2 or 3 phases.
The first phase uses the jtagscan and jtagconfigure commands to scan and configure the JTAG chain. ย The jtagscan command automatically performs a jtagtest command prior to the scan. ย After JTAG configuration is complete the emulatorstate control variable transitions from state 0 (disconnected) to state 1 (JTAG configured).
On targets with uncore devices, the next phase uses the uncorescan and uncoreconfigure commands to scan and configure all the uncore devices on the JTAG chains.
The last phase uses the devicescan and deviceconfigure commands to scan and configure devices. ย After successful device configuration, the emulatorstate control variable transitions from state 1 (JTAG configured) to state 2 (fully configured). ย The target is now ready for run control.
Manually Executing Configuration Commands and Creating a Target Configuration File
Connecting to a new kind of target for the first time can be a tricky process. The target may have hardware issues, software issues, security issues, or a whole host of other problems that cannot be anticipated.
By using a special target configuration file (manual.tc), and the command line commands listed in previous sections, it is possible for a user to manually discover the target, step by step.
This has the huge benefit of allowing the user to pinpoint exactly where in the connection process that the target is providing difficulties to the standard connection process.
The following describes the general process for manually discovering and configuring a new target for the first time. If there are external requirements by the target (security unlock, physical JTAG chain configuration, etc ) at various stages during the process, it is the userโs job to know what these requirements are, how to carry them out, and when to cause those processes to occur. It is not possible for SourcePoint to know the implementation-specific requirements of any given target, unless Arium has been previously informed of said requirements.
The emulator should be powered up and connected to the target, which should also be powered up. The user should then create a new project file with the "manual.tc" file that is included in the SourcePoint distribution. Tell SourcePoint the address of the emulator (TCP/IP or USB).
SourcePoint will connect to the emulator, and stop. No further automated configuration actions will take place on the part of SourcePoint. From this point on, all steps will be carried out manually by the user in the Command window. ย At this point, the emulator is in the disconnected from the target state (emulatorstate control variable = 0).
The user now has the option of using the jtagtest or the jtagscan command. The jtagtest command may be used to manually run any one of the six JTAG tests individually. These tests are:
1) Test for power currently on.
2) Test for reset currently asserted.
3) Determine the IR length of the JTAG chain.
4) Scan the JTAG IDโs on the JTAG chain.
5) Check the integrity of the JTAG chain.
6) Check whether the target supports Adaptive TCK.
If these tests are run one at a time via the jtagtest command, the user can determine, with very fine granularity, what an exact problem may be with the JTAG chain. ย Note: ย Enable logging with aalog=20987 to view the test results in the Log window.
The jtagscan command runs tests 1 - 5 above automatically, in a predefined order, simulating the automated test that was run in older versions of firmware. This may be done on targets whose JTAG chain the user has confidence in.
Once the jtagscan command has been run successfully, SourcePoint will have sufficient information (i.e. the list of JTAG IDโs) to proceed to the next step. This is to run the jtagconfigure command at the command line.
Once this command has been issued, the firmware in the emulator will be in the JTAG Configured state (emulatorstate control variable = 1), and will be ready to proceed to the next step.
In the case of a target with an uncore, the user should now use the uncorescan command. ย This causes the firmware to discover uncores on the JTAG chain. ย After this has been successfully completed, the uncoreconfigure command should be issued. ย This prepares the firmware for the final stage of configuration.
The user should issue the devicescan command. This causes the emulator to discover what "devices" are in the system ( i.e. processors, ETMโs, etc ). That information is reported to SourcePoint.
After this information has been discovered, the user should issue the deviceconfigure command. When this is done, the STS light on the front of the emulator should turn on. The emulator is now fully configured (emulatorstate control variable = 2)
The last stage is to allow SourcePoint to configure itself by issuing the connect command. After a short delay, SourcePoint should become connected to the emulator and display its debug windows.
SourcePoint and emulator are now fully configured and should be able to debug the target.
The project file should be saved, and a configuration macro should be created (or an existing file should be modified ) to allow SourcePoint to carry out automated connection from now on. This configuration file should include any target specific actions that are required to activate or connect to the target, in the correct locations in the macro file.