Home
Integrated development environment for 32bit Power Architecture
Contents
1. Warning Various registers are protected which means that a special unlock sequence is required to change the register value SPC5 UDE STK UDE can unlock these registers Use the context menu of the register name and disable the entry Write protect 3 2 8 Viewing variables Viewing and changing global static variables All global and static variables from the C C source code may be observed directly using the Watch window Open the Watch window by selecting the menu View Watch Window or the corresponding tool bar button 2 18 25 DoclD025101 Rev 2 UM1659 2 User guide Figure 14 Watch window MM Select Watch Wanables Expressions 5 Static Variables at function level gH Static Y arables all Hr All Globals Statics p j2 byTimeFlag 2 emiosChOCtr 2 Hours IntelevectorT able 2 Minutes Seconds A Swing Cir DEL to clear Case sensitive GAPG0608131528CFT The variables can be added by double clicking to lt new variable gt or using the context menu of the lt new variable gt entry via Browse Ins The browser dialog shows you all available global and static variables Click Add for adding a new variable to the watch window The variables are sorted in following groups e Global variables shows all global variables with a global scope e Static variables at file level shows only variables visible at a specific file e Static variables at function level shows only stati
2. FFFF OxOO02FFFF Ox0003F FFF OxQO05FFFF a 1 2 3 4 F 6 T a 3 1 1 Verity All GAPG0608131542CFT FLASH programming If the UDE FLASH OTP Memory Programming Tool is enabled all registered FLASH devices are installed with special filters These filters watch the download stream for address ranges met with a registered FLASH device If the filters detect that a code section is loaded which is destined for the FLASH device the code section will be marked for FLASH programming For the practical work it means that you have to load the FLASH ROM version of your program code File Load Program only After loading the program code sections the FLASH Programming Tool will open the main dialog and will offer the erasing programming and verifying of code sections 2 DocID025101 Rev 2 UM1659 User guide Figure 18 FLASH programming UDE FLASH OTP Memory Programming Tool FLASH OTP Memon Device 1 MByte OnChip PFLASH w W Enable Exit Start End Size 000000000 O00003F FF 16K 000000060 000000067 000000800 0200000607 Remove All Erase About Program Help oc m 054 on eo Pi 000004000 00001 0000 00001 CO00 Ox00020000 Ox00030000 Ox00040000 OxOO0060000 Ox00080000 Ox000C0000 O QQOQ0F FFF 0x0001EFFF O0x0001 FFFF Ox0002FFFF OsD0003PFFF OSD00bFFFF OxODO7FFFF OxDD0BFFFF OxOOOFFFFF 45K 49K 16K 64k BAR 12 124 25 25 Sw Protect Info Went Setup
3. Locals Window In this window all currently valid local variables are displayed The value of the local variable can be changed in the same way as in the Watch window 3 2 9 Trigger functions This chapter demonstrates how the Power Architecture Book E defined triggers of the SP56x derivatives can be used for debugging purposes Again the starting point is SPC5 UDE STK UDE with the application timedemo elf loaded We want to create a trigger configuration that stops program execution when a write access to the variable Buf fer 0 occurs Open the Hardware Debug Resources dialog by menu Debug Setup Trigger unit Select the rider Data Address We want use DAC1 as trigger comparator Enter the address of Buffer 0 into the address box For simplification C style expressions could be used so simple enter amp Buf fer 0 2 20 25 DoclD025101 Rev 2 UM1659 User guide Figure 16 Hardware debug resources Controller0 Core Hardware Debug Resources E200 Triggers E200 Debug Counters E200 Reserve Debug Resources for Application Instruction Address Instruction Address 2 Data Address Data Yalue Additional Address Break Mode Access Mode Address Mode Comparator Mode Extended mask User SV Read Write DACI amp Buffer 0 El iw net lw Effective Exact NoMask Enable value value A E Link ACL and 1401 toghether Ej DATZ Ox00000000 El a a a a NoMask T E Value Dx E Link DAC and 1405 toghethe
4. you to configure and install the hardware and software tools necessary to operate the SPC5 UDE STK starter kit version At the end of the instructions described in this document you will have a running environment that could be used as a starting point for further development or evaluation work This tutorial goes step by step through the necessary procedures in order to e Install the SPC5 UDE STK starter kit version e Configure the SPC5 board and connect it to the host PC e Setup a project e Debug a sample application If you need more information about the SPC5 UDE STK please contact your nearest STMicroelectronics sale s office Contact information is available on STMicroelectronics website http www st com web en support online_tech_support html Feedback The SPC5 UDE STK starter kit version is part of the SPC5 MCU s family tool chain based on the ST SPC5 Studio Integrated Development Environment Regarding any comments about SPC5 UDE STK use the website htto www st com web en support online_tech_support html You are invited to browse to the PLS Development Tools website at htto www pls mc com to get latest information about the professional and full version of Universal Debug Version UDE The PLS Development Tools company welcomes feedback on products and documentations If you have any comments suggestions or improvements about the products you are using please use the Feedback Form from website http www
5. 0608131506CFT Within the Breakpoint dialog breakpoints may be added changed of type and deleted using the corresponding buttons By clicking on the E D Enable Disable checkbox you toggle the breakpoint between active and suspended Disabled breakpoints are indicated by a red shaped circle Now start the application again The application will be executed until the first breakpoint in the execution path is reached The application will be stopped then immediately Another possibility to execute certain portions of code without setting a breakpoint explicitly is placing the cursor into the line where the application is required to halt and then select Debug Run Program to Cursor from the menu or Run to Cursor from the context menu CPU registers The CPU register window is opened by the menu View CPU Window or the corresponding tool bar button Figure 12 CPU register window CPU Window GPR Status OxFAFOFFF Ox FAFOFFE O FAFOFFF OxFAFDOFFF OxFAFOFFE OxFAFOFFF OR FAFOFFE OxzFAFOFFE OxFAFDOFFF OxFAFOFFE OzFAFOFFF ORFAFOFFE DxFAFUFFF7 OxzFAFOFFF7 OxFAFOFFF7 OxzFAFOFFF7 Startup GnuPpc iR am S OxFAFOFFF O FAFOFFF O FAFOFFF OxFAFDOFFF OxFAFOFFE OxFAFOFFE DxFAFOFFF7 DxzFAFUFFF7 OxzFAFOFFF7 OxzFAFOFFF7 OxzFAFOFFF7 DxFAFOFFF7 DxFAFUFFF7 OxzFAFOFFF7 OxzFAFOFFF7 OxzFAFOFFF7 DocID025101 Rev 2 Me Eimmedemo c 0xz40001544 OxFAFOFFE OxFAFOFEF DxFAFOFEF GAPG0608131515
6. 5 SP1 e Microsoft Windows Scripting Host V5 6 Microsoft Internet Explorer 6 0 or higher e Java Runtime Environment 6 Adobe Acrobat Reader 4 0 or higher Downloading the latest SPC5 UDE STK version The SPC5 UDE STK starter kit software is available for downloading from the following website http www pls mc com spc5 udestk Installing SPC5 UDE STK Run setup exe and follow in the installing instructions The SPC5 UDE STK starter kit version will be installed into the directory C SPC5Studio ude DocID025101 Rev 2 Kyy UM1659 Getting started 2 5 Note 2 6 2 6 1 2 6 2 License registering and activation of SPC5 UDE STK The starter kit version of SPC5 UDE STK can be used for an evaluation purposes without registration In this case the SPC5 UDE STK is restricted to a limited code size for downloading of 128 kBytes The registered version of SPC5 UDE STK unlocks the limitation of code size downloading STMicroelectronics offers licenses with a validation period of 1 year with option to extend to further 2 years Send the following information via the PLS website form at http www pls mc com spc5 udestk 1 Company data 2 Customer data 3 Host PC s MAC Media Access Control address 4 Serial number of PLS USB JTAG adapter for SPC5 see the sticker backside of the adapter 5 Activation code delivered by ST Microelectronics After that the license file will be delivered by PLS SPC5 UDESTK functional
7. CFT 17 25 User guide UM1659 Perform a few single steps to see the CPU register values changing according to the executed instructions Registers which values have been changed compared with the previous state are red highlighted to provide quick overview While the program is stopped e g between single steps you may alter the content of registers Simply click on the register s value in the CPU registers window and type in the new value of the register 3 2 7 SFR registers Special function register values are changed in the same way in the SFR register window open this window by selecting the menu View SFR Window To add a new register entry select Browse Ins from the context menu of the SFR Register window and take the SFR that you want from the list Figure 13 SFR registers SFR Yiewl CPU Window Skartup SnuPpc iRam 5 WH Akimedemo c Bit field Value on fb GHM_ACO SC PSEJEE 00 16m Hz internal RC oscillator coo SIUL_GPDIO_3 Ox00000000 I Dl The wale of the data in signal F SELCTL PDI CGM ACO SC 4 7 in signal F FDI Auxiliary Clock Source Selection Control in signal E PDI Selects the source for the given in signal f ausiliary clock 0 GAPG0608131522CFT Tooltips show the address the reset value of the current SFR and further information about the focused register Expand a SFR for viewing all available fields composing this register With a right click on the values you can change them
8. Cus UM1659 WI life augmented User manual Integrated development environment for 32bit Power Architecture derivatives Introduction Figure 1 SPC5 UDESTK starter kit version This document constituted by two main sections Getting started and User guide is related to an ST dedicate version of PLS commercial debugger product The ST version is a starter kit constituted by a software and an hardware component the software is a starter version of PLS UDE Universal Debug Engine and is defined as SPC5 UDE STK starter kit version its corresponding hardware the PLS USB JTAG adapter is named SPC5 UDESTK as per the label applied on it September 2013 DoclD025101 Rev 2 1 25 www st com Contents UM1659 Contents 1 Overview and naming convention 0 00 2c eee eee ees 5 Tel o A mer een ean dhe aay h cone eas an eee a bs we 5 2 Getting SIANCG ss con rro e EN AG oe es ca ee 6 2 1 Belore YOU stait osorcincssrrs rra rra dra 6 2 2 System requirements eee eens 6 2 3 Downloading the latest SPC5 UDE STK version 6 2 4 Installing SPC5 UDE STK eee 6 2 5 License registering and activation of SPC5 UDE STK 7 2 6 Installing hardware 0 ccc eee eens 7 2 6 1 Static electricity precautions cc ee ee 7 2 6 2 Driver installation of PLS USB JTAG adapter for SPC5 7 2 6 3 TROUBIE SHOOUNG AA cess hae ekee idas 8 2 6 4 Installing SPC5 UDESTK PLS USB JTAG
9. General Program All Verity All GAPG0608131545CFT 3 3 4 FLASH driver selection The Power Architecture SPC56 microcontroller can run in VLE mode and standard Power Architecture mode This results in different FLASH drivers You can select the suitable driver to your requirements please push the button Setup and select the driver from the list Figure 19 FLASH driver selection Select FLASH Driver Driver for MPC5b4 SPESBEL CSOFL2 PFLASHO VLE version functions v0 3 2 Driver for MPCS64 SPC56EL CSOFL2 PFLASHO non LE version functions v0 3 2 Driver Details Driver Version Transfer Buffer Address Driver Start Address Transfer Buffer Size CAC Capability Mote L Cancel Help GAPG0608131546CFT 3 4 Help and support If this getting started does not help to solve problems in detail please contact http www st com web en support online_tech_support html 2 DoclD025101 Rev 2 23 25 Revision history UM1659 4 Revision history Table 1 Document revision history IC Ga 08 Aug 2013 Initial release 17 Sep 2013 Updated Disclaimer 2 24 25 DoclD025101 Rev 2 UM1659 Please Read Carefully Information in this document is provided solely in connection with ST products STMicroelectronics NV and its subsidiaries ST reserve the right to make changes corrections modifications or improvements to this document and the products and services described herein at
10. ONS C AUTOMOTIVE APPLICATIONS OR ENVIRONMENTS AND OR D AEROSPACE APPLICATIONS OR ENVIRONMENTS WHERE ST PRODUCTS ARE NOT DESIGNED FOR SUCH USE THE PURCHASER SHALL USE PRODUCTS AT PURCHASER S SOLE RISK EVEN IF ST HAS BEEN INFORMED IN WRITING OF SUCH USAGE UNLESS A PRODUCT IS EXPRESSLY DESIGNATED BY ST AS BEING INTENDED FOR AUTOMOTIVE AUTOMOTIVE SAFETY OR MEDICAL INDUSTRY DOMAINS ACCORDING TO ST PRODUCT DESIGN SPECIFICATIONS PRODUCTS FORMALLY ESCC QML OR JAN QUALIFIED ARE DEEMED SUITABLE FOR USE IN AEROSPACE BY THE CORRESPONDING GOVERNMENTAL AGENCY Resale of ST products with provisions different from the statements and or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever any liability of ST ST and the ST logo are trademarks or registered trademarks of ST in various countries Information in this document supersedes and replaces all information previously supplied The ST logo is a registered trademark of STMicroelectronics All other names are the property of their respective owners 2013 STMicroelectronics All rights reserved STMicroelectronics group of companies Australia Belgium Brazil Canada China Czech Republic Finland France Germany Hong Kong India Israel Italy Japan Malaysia Malta Morocco Philippines Singapore Spain Sweden Switzerlan
11. Recent Workspaces Exit Alk F4 GAPGCFT0608131431CFT After creating the new workspace you will be asked to select a target hardware configuration SPC5 UDE STK UDE comes with some default target configurations of starter kits Click Default button and enable the Use a default target configuration to select a predefined configuration Create a default target configuration for Power Architecture SPC56 L Push the button Default in the Select Target Configuration dialog Enable the Use default target configuration and select the corresponding configuration to your target PowerPC STM XPC56XL Mini Module STM XPC56XL Mini Module with SPC56EL70 Lockstep mode Jtag Figure 6 Default configuration Create or use default C Create a new target configuration step by step f Use a default target configuration 5 PCS563Mm Mini Module C3 PC5644 Mini Module PCS64P Mini Module SPESE Mini Module Ej STM PC56 lt L Mini Module with SPCS6ELBO DualPorcessor mode Ej STM SPCSBAL Mini Module with SPCS6ELBO Lockstep mode tag Ej STM SPCSBAL Mini Module with 5PC5EEL 70 DualPorcessor mode STM RPCESB4L Mini Module with 5PCSBEEL 70O Lockstep mode Jtag MMU preinitialzed memon mapping 1 1 WYLE enabled FLASH programming prepared but not enabled Write Filter for BAM Module caca tap GAPGCFT0608131434CFT kyy 12 25 DoclD025101 Rev 2 UM1659 3 2 2 User guide Push OK The
12. SPC5 UDE STK UDE will now try to connect to the target system When the connection is successfully established the following message will appear in the command window Core UDEDebugServer Connection to SPC56EL70 target monitor established PowerPC Target JTAG ID 0xOAEA9041 When launching SPC5 UDE STK UDE for the second time you may use either File Open Workspace or File Recent Workspaces to select the workspace and start a new session with settings from the saved workspace If you get an error message return to the section Software Installation and make sure that all settings are correct Refer also to the Troubleshooting section to get further information If the problem persists ask the STMicroelectronics support team at htto www st com web en support online_tech_support html for qualified help Loading an executable After having SPC5 UDE STK UDE for Power Architecture SPC56L started we want to load a program that can be executed on the SPC56L discovery board Figure 7 Load a program New Workspace Ctrl M Open Workspace Cira Save Workspace As Chrl 5 Save Workspace Close Workspace Ctrl F4 ee VRBO Load Prograrn e to Disconnect Target System Y pa D Frint Setup Recent Workspaces Exit Alt F4 GAPG0608131444CFT First the GNU compiler variant of the TimeDemo example located for using in the internal RAM should be used This example is a basic demonstration and toggles th
13. UDE starter kit version e How to use the windows in SPC5 UDE STK UDE starter kit version e How to load code into the starter kit board and start it as well as furthermore principles of how to debug an existing application We recommend you to go through this tutorial step by step This example is shown under Windows XP and using the SPC56L Discovery starter kit board offered by STMicroelectronics Starting with SPC5 UDE STK UDE The SPC5 UDE STK UDE comes with a set of example programs demonstrating the features of SPC5 UDE STK UDE The example program prepared for GNU Compiler and SPC56 starter kit boards is located in C SPC5Studio ude samples PowerPC SPC56 L timedemo Once the operating system is up and running double click on the icon SPC5 UDE STK on the desktop Alternatively SPC5 UDE STK UDE may be launched also via Start Programs SPC5 UDE STK UDE Visual Platform This will start the desktop of SPC5 UDE STK UDE development system The next step is creating a new workspace An SPC5 UDE STK UDE workspace saves all configurations and settings of SPC5 UDE STK UDE desktop windows and their content path and name of loaded files The file extension is wsx Click New Workspace from the File menu and choose a new file name from the file selection box e g SPC56 L wsp DoclD025101 Rev 2 11 25 User guide UM1659 Figure 5 New workspace New Workspace Ctrl M Open Workspace Ctra Print Setup
14. UM1659 Programming of the memory device is done by the Memory Device Driver which is a small application executed by the target MCU MemTool uses functions provided by the SPC5 UDE STK UDE target interface to load and run this driver application SPC5 UDE STK UDE observes the download channel and activates the FLASH programming handling when it detects write accesses to the FLASH memory range The FLASH memory settings are done already when you use the default target configuration Enabling the FLASH programming The UDE MemTool is an Add In of SPC5 UDE STK UDE starter kit version and must be activated This is done via the Add In Manager menu Config Add in Components Enable the entry UDE FLASH OTP Memory Programming Tool When the UDE FLASH OTP Memory Programming Tool is enable a new menu entry is created in UDE MemTool menu Tools FLASH programming Open this dialog and the main front end of MemTool will be opened Choose the FLASH device and try to enable it If all settings were correct a list of FLASH sectors will displayed as shown below Figure 17 Enabling the FLASH programming 2 UDE FLASH OTP Memory Programming Tool FLASH OTP Memon Device PFLASH 2 MByte OnChip PFLASH W Enable Start Ox 00000000 Ox 00004000 OxOO00e000 OxOO00C000 00007 0000 00007 4000 00001 e000 40001 CODO 000020000 000030000 000040000 End Ox00003F FF Ox0000 FFF OxQO00BFFF OxOOO0FFFF Ox0001 3FFF 00007 7FFF 00001 BFFF 00001
15. USB cable the first time Connect the SPC5 UDESTK PLS USB JTAG adapter for SPC5 to the PC host system using the mini USB cable The Windows system will find a new hardware device on your system DoclD025101 Rev 2 7 25 Getting started UM1659 called SPC5 UDESTK PLS USB JTAG adapter for SPC5 in the Universal serial bus controllers group Figure 2 Universal serial bus controller S Device Manager Fie Action View Help Hee fm HM 4 Computer Se Disk drives E Display adapters 4 DYDICD ROM drives y Floppy disk controllers q Floppy disk drives 23 Human Interface Devices Y IDE ATA ATAPI controllers a IEEE 1394 Bus host controllers gp Keyboards y Mice and other pointing devices E Monitors Eg Network adapters Ports COM amp LPT de Processors gt SCSI and RAID controllers Sound video and game controllers Gee Storage volumes System devices Universal Serial Bus controllers ALi PCT to USE Open Host Controller PLS USB IT 46 Adapter For SPCSsexx Standard Enhanced PCI to USB Host Controller USE Mass Storage Device USB Root Hub GAPGCFT0608131153CFT 2 6 3 Trouble shooting If the previous step fails you have to install the driver software manually 1 Try to run the driver installing setup first at C SPC5Studio ude driver JtagUsbDriver InstallUsbJtagDriver bat Alternatively you can browse the driver directly when Windows is ask
16. adapter for SPC5 9 2 6 5 Technical details of SPC5 UDESTK PLS USB JTAG adapter 9 2 6 6 LED status indication 0 0 ccc eee es 10 3 USOU tasa DNA MAKAKA eee sca ra ra NUNO NA 11 3 1 SPC5 Studio and SPC5 UDE STK UDE integration 11 3 2 A first example with SPC5S6L Discovery 0 00 eee 11 3 2 1 Starting with SPC5 UDE STK UDE 0 00000 11 3 2 2 Loading an executable 0 0 ce eee 13 3 2 3 Project management cc eee ee ee 14 3 2 4 Running and stepping through the application 15 3 2 5 Setting breakpoints 0 cc ee eee 16 3 2 6 CPU registers 0 ce ee eee eens 17 3 2 7 OPI PP O o on RI 18 3 2 8 Viewing variables ee eens 18 3 2 9 INMOUSFIIACUOAS a a ace a ac AA hh e BE Ke 20 3 2 10 Leaving the project cee eee 21 3 3 Programming FLASH memories 0 000 eee eee ee eee es 21 3 3 1 BASIC CONCEPT csee kaa ane a ew oh dene a Erico Wh eek dc da dico e 21 3 3 2 Enabling the FLASH programming 0 0 0c eee eee eee 22 9 25 DocID025101 Rev 2 ky UM1659 Contents 3 3 3 FLASH programming a 22 3 3 4 FLASH driver selection 0 000 cee eee 23 3 4 Help ANO SUPPON inciso BAHAG NGANGA OOO HE EEN da a KAN WAL KA 23 4 Revision history cmc 0 ABAKA MAAN BATE A cane cen weds 24 Kyy DocID025101 Rev 2 3 25 List of figures UM1659 List of figures Figure 1 Figure 2 F
17. am timedemo c cvgdrive timer c Jcygdrivetdihi Functions cfg_CSn_BR chg_CSn_OR cfg EBI cfg EBI mod cfg mpe5500ccd cfg _PBRIDGE cfg PCR cfg PCR ADDR cfg PCR CTRL cfg PER DATA cfg ABAR chg_ CLES dummy emiosChOISR enablelrg initEMIOS inikINTC initlrqWectors initSwIrg4 main PA Core Symbols ft an ff an ne ff e ff fa ne nmn El PCP CP OP PCP OP ee GAPG0608131447CFT By double clicking on one of the source files the selected file will be brought into the Program window by double clicking on one of the procedures the selected procedure is displayed UM1659 User guide After loading the program code the Program window shows following content In the Program window a yellow arrow indicates the current instruction pointer position Figure 9 Example of program code Wi ktimedemo GnuPpc timedemo c joxaooo0eDs ln 31 gt x nt main void int RetYal OQ unsigned char 1 byTimeFlag OQ interrupt install handler l timer handler TIMER_INTERRUPT_NUMBER timer init interrupt enable all led initl while 0 RetYalj 4 1f byTimeFlag 1 si byTimeFlag OQ led toggle fi Buffer 1 lt 10 1 if 0 1 X10 4 F update timer if 5 Seconds f Seconds OQ 1f 59 Minutes Minutes D if 23 Hours Hours O else 4 ng GAPG0608131450CFT Warning Af
18. any time without notice All ST products are sold pursuant to ST s terms and conditions of sale Purchasers are solely responsible for the choice selection and use of the ST products and services described herein and ST assumes no liability whatsoever relating to the choice selection or use of the ST products and services described herein No license express or implied by estoppel or otherwise to any intellectual property rights is granted under this document If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT ST PRODUCTS ARE NOT DESIGNED OR AUTHORIZED FOR USE IN A SAFETY CRITICAL APPLICATIONS SUCH AS LIFE SUPPORTING ACTIVE IMPLANTED DEVICES OR SYSTEMS WITH PRODUCT FUNCTIONAL SAFETY REQUIREMENTS B AERONAUTIC APPLICATI
19. c variables visible at a specific function e Static variables all shows all static variables which are not global variables e All global static variables shows all global and static variables If the variable is expandable i e it is a pointer or an array clicking on the sign in front of the variable s name will expand it This means that the location where the pointer points to or the content of the elements of the array will be displayed Expanding is possible for more than one level Variable values can be changed easily by double clicking in the value area or pressing lt F2 gt and typing in the new value Watch tips Furthermore SPC5 UDE STK UDE offers so called Watch tips which show you the content of simple variables in the Program window Highlight i e the Buffer variable from the main function by a double click move the mouse pointer over and the content will be displayed in a watch tip after a short waiting time DoclD025101 Rev 2 19 25 User guide UM1659 Figure 15 Watch tips Watch Yiew l Wil Skarkup GnuPpc iRam 5 WH AGnuPpcttimedemo c Hours Minutes Seconds 0 EE E eff E Mame Butter Location 04000558 E Tupe unsigned char 10 Bu Scope global Buffer 4 Eutter 5 Buther E Butfer 7 Buffer 8 Buffer 3 new variable GAPG0608131532CFT Viewing and changing local variables Viewing local variables is provided by the Locals window that can be reached via the menu View
20. d United Kingdom United States of America www st com Kyy DoclD025101 Rev 2 25 25
21. e LED on the SPC5L Discovery only The example is located to the internal SRAM of the SPC56 L at memory address 0x4000 0000 Select from the SPC5 UDE STK menu Load Program in the File menu bar browse to C SPC5Studio ude samples PowerPC SPC56 L timedemo GnuPpc iRam timedemo elf In the workbench the Program window appears showing the source code of the main function of the ample application When clicking with the right hand mouse button into the DoclD025101 Rev 2 13 25 User guide UM1659 program window a context button appears to switch between source code only and source assembly code display via the Mixed Mode entry 3 2 3 Project management A docked window at the left hand side of the SPC5 UDE STK UDE desktop houses the Explore Symbols tab where the application s source files and their inside procedures are shown after unfolding the markers If no workspace window is shown you can make it visible via the menu Window Project Workspace The SPC5 UDE STK UDE project contains source files C C functions address sections and user defined breakpoints Figure 8 Project management Core Symbols O 4 xX interru F mpc5567 h cygdrive F type_defs h cygdriwe Source Files crtn s cygdriwe cl gn cresavres 5 cvgdrive eabi 5 eygdrivelclgn ecrti 5 cygdrivel cl gn intc su handlers 5 lc Intclsrvectors c ycvge mp5500 asmcfg 5 o mp5500 ccdcfg c hc mpo5500 SRAM load mp5500 ecptn c cy 5tartup GnuPpc iR
22. igure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 Figure 15 Figure 16 Figure 17 Figure 18 Figure 19 4 25 SPC5 UDESTK starter kit version eens 1 Universal serial bus controller eee eee eens 8 SPC56 L discovery kit with installed SPC5 UDESTK PLS USB JTAG adapter 9 SPC5 UDESTK PLS USB JTAG adapter drawing 0 eee eee 10 New WONESDACE idad Geb he oe BO He e hs E Sk e a 12 Default configuration 2 ce eee eee eee eee ena 12 OAC AD OO seen ngnce Seeuregeue eee eee eee UE 13 Project Management 14 Example of program code a 15 Belo Men APA AA goals dio id Some we iaa des 16 Selina DreaKPOIN S sas aaa Ka AKA ADA e a aa ea ee eo oma 17 CPU register window o o oo ooooo eee eee eee eens 17 OPT LEONE 2542 cee scutes NABUGAS LA MMA HUNG BOUL RE LA SOE re Rear eee Bate eee 18 WAG WIPO OW e ses csv a BG ate a Beck ee drone AG hea Mew Aah a ke Ges 19 WACK UDSs 26 a hue ohiad PE KK MA SHEA deed Pee hee eee Ones Bee eu a LA 20 Hardware debug resources ee eee eee eee 21 Enabling the FLASH programming a 22 FLASH progra MMING eres do cie de kupini ace eee wh GN ak la de ha Mee dw acd 23 FLASH driver selection 0 0 a 23 2 DocID025101 Rev 2 UM1659 Note 1 1 Overview and naming convention Overview and naming convention This document will help
23. in the adapter into convenient mini USB connectors and target connectors only ky DocID025101 Rev 2 9 25 Getting started UM1659 Figure 4 SPC5 UDESTK PLS USB JTAG adapter drawing LED area Mini USB connector o Anti inversion JTAG socket notch connector to target with anti inversion notch GAPG0608131426CFT 2 6 6 LED status indication The green LED indicates the target s lO voltage on the target connector the yellow LED indicates the target connect state the red LED indicates the target running state to the user 2 10 25 DoclD025101 Rev 2 UM1659 3 3 1 3 2 3 2 1 User guide User guide SPC5 Studio and SPC5 UDE STK UDE integration SPC5 Studio is a development environment containing compiler tools editor and debug visualization and based on the eclipse platform The SPC5 UDE STK starter kit version can be integrated into the SPC5 Studio as debug plug in Beside of this the SPC UDE STK UDE starter kit version can be used as stand alone debug environment In this context it is called UDE Universal Debug Engine The following chapter shows features of the UDE Universal Debug Engine in a stand alone example A first example with SPC56L Discovery We assume that you now have successfully installed the SPC5 Studio the SPC5 UDE STK UDE starter kit version and the PLS USB JTAG adapter for SPC5 In this section you will learn about e How to start SPC5 UDE STK
24. ing for that 1 Connect the SPC5 UDESTK PLS USB JTAG Adapter for SPC5 with your PC using the mini USB cable The Windows system will find a new hardware device on your system called PLS USB JTAG adapter for SPC5 in the universal serial bus controllers group and you will be prompted to install a new device driver 2 Click Next to continue 3 Click Search for a suitable driver and click Next 2 8 25 DoclD025101 Rev 2 UM1659 Getting started 4 Click Specify a location click Next and browse for the driver file C SPC5Studio ude driver JtagUsbDriver Driver plsusbjtag inf driver 5 Click Next and Finish 2 6 4 Installing SPC5 UDESTK PLS USB JTAG adapter for SPC5 The hardware installation of Universal Access Device is done within the following steps 1 Connect the SPC5 UDESTK PLS USB JTAG adapter for SPC5 with an USB port of the host PC by the mini USB cable 2 Plug the SPC5 UDESTK PLS USB JTAG adapter for SPC5 into the 14 pin JTAG debug connector of the SPC5 starter kit board 3 Plug in the power supply of the starter kit board 4 Start your computer system and login with administrator rights Figure 3 SPC56 L discovery kit with installed SPC5 UDESTK PLS USB JTAG adapter GAPG0608131411CFT 2 6 5 Technical details of SPC5 UDESTK PLS USB JTAG adapter The SPC5 UDESTK PLS USB JTAG adapter for SPC5 is the adapter between the USB interface on the Host PC and the JTAG interface on the starter kit board Plug
25. ity is guaranteed only for ST evaluation boards Visualization functions at runtime and script support are not supported features Installing hardware Static electricity precautions Electrostatic Discharge ESD can damage a sensitive electronic component Under several conditions static electricity and ground potential differences between the host PC the SPC5 UDESTK PLS USB JTAG adapter for SPC5 and the user s target hardware can build up high voltages over 10000 V 10 kV in some cases The electrostatic discharge of this build up voltage results in fast high current waveforms and fast magnetic H field or electrostatic E field disturbances The discharge into the electronic components and circuitry can damage or destroy hardware components resulting in failures and reduced reliability To protect your hardware against damage from static electricity and ground potential discharge you should follow some basic precautions 1 Please ensure that the static electricity and ground potentials between the SPC5 UDESTK PLS USB JTAG Adapter for SPC5 the host PC and the starter kit board are balanced 2 Establish the target connection and power on the systems Driver installation of PLS USB JTAG adapter for SPC5 If the previous steps are done successfully the SPC5 UDE STK starter kit version installed the hardware driver components automatically when the SPC5 UDESTK PLS USB JTAG adapter for SPC5 is connecting to the host PC via the mini
26. pls mc com send an email to sales pls mc com DoclD025101 Rev 2 5 25 Getting started UM1659 2 2 1 2 2 2 3 2 4 6 25 Getting started Before you start To execute this getting started it is necessary to have a e PC equipped with USB port e Operating system Windows 8 Windows 7 Windows Vista Windows XP SP3 e A connection to the Internet during installation for downloading and license activation e Administrator or power user s rights to install the required programs e One ofthe ST SPC56 boards equipped with a SPC56xx microcontroller Discovery board Discovery board Premium Evaluation board The full list of supported boards is available on ST WEB in the Automotive MCUs page in the Resources Hardware area which direct URL is http www st com stonline stappl oroductcatalog app 7page partNumberSearchPage amp leveli d FM20988parentid 16758resourcetype HW e Power supply for the starter kit board e Amini USB cable e ASPC5 UDESTK PLS USB JTAG adapter for SPC5 with a 14 pin JTAG connector System requirements To run SPC5 UDE STK starter kit version at least the following minimum system configuration is required e Microsoft Windows compatible PC e 1 GHz or faster 32 bit x86 or 64 bit x64 processor e 1 GByte RAM 32 bit or 2 GByte RAM 64 bit 1 GByte available hard disk space e Operating system Windows XP Windows Vista Windows 7 Windows 8 e Microsoft NET Framework 3
27. r caret Heb GAPG0608131537CFT Enable User and SV Supervisor as Break Mode select Write Access mode Effective address and Exact comparator Start the application The application stops when the fist write to Buffer 0 occurs You will find the message Core UDEDebugServer halted by trigger event inside of the command view 3 2 10 Leaving the project To leave the current Project select File Close Workspace from the SPC5 UDE STK UDE Desktop menu The workspace with all settings will be saved automatically If you want to save the current project under a different project name select Save Workspace As from File menu In the file selection box the new workspace name must be selected and confirmed 3 3 Programming FLASH memories 3 3 1 Basic concept UDE MemTtTool a part of SPC5 UDE STK UDE is intended to handle on chip and external memory devices that do not permit direct and random write accesses unlike a RAM device permits Typically on chip FLASH OTP memory devices and external FLASH are of this type A target may contain several on chip and external memory devices that can all be handled by MemTool At a given time only one device is activated For each memory device a Memory Device Handler inside UDE MemTool handles all accesses to the corresponding device These Memory device handlers may be activated and deactivated individually 2 DoclD025101 Rev 2 21 25 User guide 3 3 2 3 3 3 22 25
28. ter downloading a program executable the instruction pointer is set to the entry point of the program Usually the entry point is located at the start up code That is why the default C C Program window above does not show an instruction pointer To force the view of the current instruction pointer use the context menu Show Next Statement or the main menu Show Show IP 3 2 4 Running and stepping through the application After the application has been loaded successfully you may open now the menu Debug to run or step through the example procedures 2 DoclD025101 Rev 2 15 25 User guide UM1659 Figure 10 Debug menu Toggle debugger Ctrl F Start Program Execution F5 Step over Subroutine Fa Step into Subroutine F Run Program to Cursor Reset target Ctrl FY Restart Program Execution F7 Breakpoints Setup trigger unit GAPG0608131504CFT The icons from the Debug menu are also located in the tool bar covering the same functionality Short cuts are available too Click now onto the Start Program Execution entry or button and watch the LED on the SPC56 L Discovery kit board flashing the TimeDemo code for UDE When clicking onto Break Program Execution the application is halted and the current instruction pointer position code line is displayed You may also step through the application by using Step over Subroutine steps with freely executing subroutines in one step or Step into Subroutine with following f
29. unction calls and executing subroutines instruction by instruction Warning For debugging the C C parts of the example program only the start up code must be executed first For this make a Step over Subroutine from the Debug menu of UDE After that the IP will be shown at the main function the start up code has been executed The application can be reloaded with Restart Program Execution If the program is running already it will be started immediately after the reload terminates 3 2 5 Setting breakpoints Now we assumed that a loaded application is error free and ready for running However for debugging purposes single step executions and breakpoints have to be performed to watch program behavior and processor status Now we want to set a breakpoint in the timedemo program To do this click with the mouse on a line in a procedure and then click on the simple Hand symbol in the tool bar A red filled dot appears in the line indicating that the breakpoint has been successfully set Alternatively you may also select the menu Debug Breakpoints or the Hand symbol in the tool bar marked with D to open the Breakpoints dialog 16 25 DocID025101 Rev 2 Kyy UM1659 3 2 6 2 Figure 11 Setting breakpoints Breakpoints ED Location Curr Lo S Selected breakpoint f Software Hardware O Software Loop Counter Goal Condition Macro Oof4 hardware breakpoints used User guide GAPG
Download Pdf Manuals
Related Search
Related Contents
Imprimantes et impression Guide de l`utilisateur InFocus LP1200 User's Manual Copyright © All rights reserved.
Failed to retrieve file