Home
M3T-PDxxSIM I/O DLL Kit User`s Manual
Contents
1. i 4 4 i y y O 2 i Can t access a specified address Gets an error number when an error occurred in the immediately preceding function that was executed This function allows to get information on what error occurred when one of the following functions was called and its returned value was false RequestGetMemory function RequestPutMemory function RequestGetRegister function e RequestPutRegister function e RequestInterrupt function Use example unsigned long data char str 5 if RequestGetM emory 0x800 4 data FALSE 1 sprintf str Yd RequestE rrorNumY MessageBox NULL str Error number MB OK Display error number to message box 16 PDxxSIM I O DLL Kit The following shows an example of how to write the above functions The shaded sections in this example are the template part of the above functions that are implemented in the iofunc cpp file void N otifyPostWriteM emory unsigned long address int length unsigned long data if address 0x3e0 RequestGetRegister REG_PC amp val Get PC Value RequestPutM 0 800 4 val Store PC value 0x800 address else if address 1 RequestP utRegister REG_RO_F data Store value in bankO RO register Request nterrupt 21 7 Generation of timer AO interrupt return 17 PDxxSIM I O DLL Kit 8 Specifying Target Program Symbols in the DLL
2. our customers Old Company Name in Catalogs and Other Documents On April 1 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry 2 NE S AS 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is
3. PDxxSIM I O DLL Kit e Notifies after data was written from memory Function name void NotifyPostWriteMemory unsigned long address int length unsigned long data Parameter Return value Functions unsigned long address Memory address int length Data length of memory data 1 1 byte 2 2 byte 3 3 byte 4 4 byte unsigned long data Memory data value None Notifies the write address data length and data value after data was written from the target program to memory PDxxSIM I O DLL Kit The following shows an example of how to write the above functions The shaded sections in this example are the template part of the above functions that are implemented in the iofunc cpp file void N otifyStepCycle int cycle unsigned longtabsrData ta0Data ta0icData if sCountFlag FALSE Check on count beginning flag return RequestGetMemory TABSR 1 amp tabsrData if tabsrData amp 0x01 0x01 Check on count beginning flag sCountCyde cycle RequestGetM emory TAO 2 amp ta0Data if SCountCycle gt ta0Data 1 Count down of counter RequestGetM emory TAOI C 1 amp ta0icData Requestl nterrupt TAOI NT ta0icData amp 0 7 Generation of timer AO interrupt sCountCyde 0 return void NotifyPreE xecutionP C unsigned long address return void NotifyPostWriteM emory unsigned long address int length if address TABSR if data
4. Module SymbolWindow Initializes nitializeM DI ChildF rame Create CreateM DIChildF rame IsEnableToOpend sEnableToOpenMDI ChildF rame GetOptionM enul D GetOptionM enul D Append 1 Make sure the number for the section name of the added section Window9 that you set follows those of other windows To remove the registered symbol window restore the contents of PD308SIMDLL DEF that you modified 18 PDxxSIM I O DLL Kit 2 Inthe symbol window output symbol information to a file Below shows a process 1 Start PD308SIM and when it has started up choose Add In Windows gt Symbol Window from the Optional Windows menu to open the symbol window Symbol Window 2 Download the target program into PD308SIM After downloading click the Create Symbol List button in the toolbar of the symbol window and select the file to which to output the symbol information Note Of the output symbol information the information on local symbols is that of module files whose scopes are set in PD308SIM The term scope refers to the effective range of local symbols local labels To output information on the local symbols local labels included in other module files change scope settings in PD308SIM For details see the description of the scope command in PD308SIM Help the online help for PD308SIM 19 PDxxSIM I O DLL Kit 3 When symbol information is output to a file the symbol informa
5. However this file is nonexistent if you have never started PD308SIM since you installed it In that case this file needs to be newly created using an editor 3 In the sim308 ini file create a DLLNAME section and write an I O DLL filename after IODLL with the extension dll removed as shown below Example When an I O DLL file name is Sample dll DLLNAME IODLL Sample 4 When you start PD308SIM the I O DLL is loaded If you do not use the I O DLL delete the description of the DLLNAME section that you created in the sim308 ini file before starting PD308SIM DLLNAME lt Delete IODLL Sample Delete PDxxSIM I O DLL Kit 5 Method for Debugging the DLL This chapter describes how to debug the I O DLL you ve created To debug the I O DLL in VC you need to change settings of the I O DLL project The following shows the contents of changes you need to make by using the case of debugging an I O DLL for PD3008SIM as an example To debug I O DLLs for other simulator models change the model name 308 described here with any desired model name e g 30 or 32R 1 2 Following the procedure described the preceding section register the I O DLL to make it usable Choose Setting from the Project menu of VC Set the Output file name column of the category General on the Link tab so that the I O DLL output destination is the directory C MTOOL PD308SIM Outp
6. This chapter describes how to specify target program symbols in the I O DLL For the symbols defined in the target program to be specified the DLL it is necessary that the symbol information be loaded into the DLL using a symbol window which is an extension window of PDxxSIM The following explains the procedure for specifying target program symbols in the 1 DLL by using PD308SIM an example To use I O DLLs for other simulator models change the model name 308 described here with any desired model e g 30 or 32R 1 SS 3907 Register a symbol window PD308SIM In the symbol window output symbol information to a file Load the output file into the I O DLL to register the symbol information Specify a symbol in the DLL Each step 15 detailed below 1 1 2 3 Register symbol window to PD308SIM Follow the procedure described below to register a symbol window to PD308SIM Copy the symbol window DLL file SymbolWindow dll from the SymbolWindow Pd308sim directory of CC YMTOOLYXlIodll into C MTOOL PD308SIM Open the PD308SIMDLL DEF file existing in C MTOOL PD308SIM by using an editor and increment the WindowCount counts for the GENERAL section GENERAL ProductN ame P D308SIM WindowCount 9 gt WindowCount 10 Append the following contents to PD308SIMDLL DEF Contents Window9 Title Symbol Window 50000
7. but Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers o
8. amp 0x01 0x01 Check on count beginning flag sCountF lag TRUE 10 PDxxSIM I O DLL Kit 7 Functions that Get Information from simxx exe This chapter describes specifications of the functions that get information on the simulator engine side from the I O DLL These functions are implemented on the simxx exe side The I O DLL calls these functions to get information from the simulator engine Use these functions to write codes for simulation within the functions implemented in the I O DLL project s source file iofunc iofunc cpp Function name Abstract RequestGetMemory Gets memory data from the specified address RequestPutMemory Sets memory data at the specified address RequestGetRegister Gets a value from the specified register RequestPutRegister Sets a value in the specified register RequestInterrupt Generates a specified interrupt RequestInterruptStatus Gets the status of generated interrupts RequestTotalCycle Inspects a total number of current execution cycles RequestInstructionNum Inspects a total number of currently executed instructions RequestStop Causes the target program to stop running RequestErrorNum Gets an error number when an error occurred in the immediately preceding function that was executed Below shows a specification of the function Gets memory data Function name int RequestGetMemory unsigend long address int lengt
9. function to delete the symbol information to free up memory space Delete of symbol information Function name Parameter Return value Functions void FreeSymbolList void None None Delete the symbol information to free up memory space 21 PDxxSIM I O DLL Kit Below shows a use example void NotifyR eset void t When reset load symbol information to register RegistrationSymbolL ist d sample test sym return void NotifyE nd void Delete the symbol information loaded into the DLL when exiting PDxxSIM FreeSymbolL ist return Note The RegistrationSymbolList function registers only the symbol information included in one symbol file If this function is called twice or more it deletes the previous symbol information to free up memory space before registering new symbol information If the same symbol file is specified the function inspects the file s timestamp and only when it has been updated re registers the symbol information 22 PDxxSIM I O DLL Kit 4 Specify a symbol in the I O DLL Below shows a process e To convert the symbol to a value in the I O DLL use the ChangeSymtToVal function Below shows specification of the function Convert value of the symbol Function name BOOL ConvertSymToVal const char pszSym unsigned long ulAddr Parameter const char pszSym unsigned long ulAddr int nType Symbol
10. granted hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document
11. vec Vector number Vector address PD308SIM PD30SIM Vector number PD32RSIM EIT vector entry Only 0x00000080 Return value int happen Generation status of interrupt TRUE Generated Vector number are stored in vec FALSE Un generated Vec is indeterminate Functions Gets the status of generated interrupts 14 PDxxSIM I O DLL Kit Inspects a total number of execution cycles Function name void RequestTotalCycle unsigned long cycle Parameter unsigned long cycle A total number of execution cycles Return value None Functions Inspects a total number of current execution cycles Inspects total number of executed instructions Function name void RequestInstructionNum unsigned long inst Parameter unsigned long inst A total number of currently executed instructions Return value None Functions Inspects a total number of currently executed instructions Causes the target program to stop running Function name void RequestStop void Parameter None Return value None Functions Causes the target program to stop running 15 PDxxSIM I O DLL Kit Gets error information Function name int RequestErrorNum void Parameter None Return value int errNum Error number Functions 000 No error Address value is out of range Can t read write because there are no memory at that area Can t get enough memory 200 02 100 200 Specified vector out of range
12. INFORMATION TO THE 1 0 DLL rere 7 7 FUNCTIONS THAT GET INFORMATION FROM SIMXX EXE 11 8 SPECIFYING TARGET PROGRAM SYMBOLS IN THE l O DLL 18 9 NOTES 5 24 Contents MEMO PDxxSIM I O DLL Kit 1 Abstract DLL means a Dynamic Link Library DLL that operates in conjunction with the simulator engine of the Simulator Debugger PDxxSIM xx denotes the model name such as 308 or 30 The Simulator Debugger when properly set up can load an I O DLL and can operate it synchronously with the timing at which the program executes one instruction read writes to memory or generates an interrupt This allows to debug the target program by simulating the operation of the microcomputer s input output ports or internal peripheral functions This also makes data input output and other linked operations with external tools possible Any desired I O DLL can be created using C C languages Microsoft Visual C a Windows application development environment available on the market is needed to create I O DLLs 2 Configuration The I O DLL accesses the simulator engine simxx exe xx denotes the model name such as 308 or 30 to obtain information on memory or register values etc In turn simxx exe notifies the I O DLL of vario
13. PDxxSIM simulator debuggers For the simulator debuggers and their versions which can be run in conjunction with the PDxxSIM I O DLL kit refer to the release notes for the PDxxSIM I O DLL kit in which they are detailed Rights to use The rights to use the PDxxSIM I O DLL kit come under the provisions of the Software License Agreement for the M3T PDxxSIM simulator debuggers used Please also be aware that the PDxxSIM I O DLL kit can only be used in developing your product and cannot be used for any other purpose Technical support Please note that technical support for the PDxxSIM I O DLL kit can be obtained by visiting our homepage URL http www renesas com en tools at which latest information is available lt Contents 1 AABS TRA C tenere ere merde debere be Ee e E re ER ree washaway 1 2 CONFIGURATION 1 3 METHOD FOR CREATING THE I O DLL eere 2 3 1 METHOD FOR USING THE IODLLTEMPLATE 1 nnne nn nnn nnne 2 3 2 METHOD FOR CREATING THE NEW I O DLL eene nnne nnnnnn nnn nnne enhn nnns nnne 3 4 METHOD FOR USING THE I O DELS oU Y EC E ea eR OCDE e 5 5 METHOD FOR DEBUGGING THE nennen nnne rn nnn 6 6 FUNCTIONS THAT SEND
14. d by the B flag 0 to 1 REG RxL Low order 8 bits of the Rx register indicated by the B flag x 2 0 to 1 Ax register indicated by the B flag x 0 to 1 REG FB FB register indicated by the B flag REG USP USP register REG ISP ISP register REG SB SB register indicated by the B flag Description example To get the RO register value in bank 0 RequestGetRegister REG RO F amp reg Value unsigned long regValue Register value storage area 13 PDxxSIM I O DLL Kit Return value int status TRUE Succeeded FALSE Error Functions Gets a value from the specified register Sets a register value Function name int RequestPutRegister int regNo unsigned long regValue Parameter int regNo Register number unsigned long reg Value Register value Return value int status TRUE Succeeded FALSE Error Functions Sets a value in the specified register Generates a interrupt Function name int RequestInterrupt unsigned long vec int ipl Parameter unsigned long vec Vector number Vector address PD308SIM PD30SIM Vector number PD32RSIM EIT vector entry Only 0x00000080 int ipl Priority For PD32RSIM specify 0 because there is no interrupt priority Return value int status TRUE Succeeded FALSE Error Functions Generates a specified interrupt Gets the status of generated interrupts Function name int RequestInterruptStatus unsigned long vec Parameter unsigned long
15. der certain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas El
16. e may contain technical inaccuracies or typographical errors Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage liability or other loss rising from these inaccuracies or errors Please also pay attention to information published by Renesas Technology Corporation and Renesas Solutions Corporation by various means including the Renesas home page http www renesas com When using any or all of the information contained in these materials including product data diagrams charts programs and algorithms please be sure to evaluate all information as a total system before making a final decision on the applicability of the information and products Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage liability or other loss resulting from the information contained herein Renesas Technology semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake Please contact Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor when considering the use of a product contained herein for any specific purposes such as apparatus or systems for transportation vehicular medical aerospace nuclear or undersea repeater use The prior written approval of Renesas Technology Corporation and Renesas Solu
17. ectronics products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics 1 lt C 7 D me lt D D PDxxSIM I O DLL Kit User s Manual Renesas Electronics Rev 1 00 2003 05 www renesas co Active X Microsoft MS DOS Visual Basic Visual C Windows Windows either registered trademarks trademarks of Microsoft Corporation in the United States and other countries IBM andAT are registered trademarks of International Business Machines Corporation Intel and Pentium are registered trademarks of Intel Corporation Adobe Acrobat and Acrobat Reader are trademarks of Adobe Systems Incorporated All other brand and product names are trademarks registered trademarks or service marks of their respective holders Keep safety first in your circuit designs Renesas Technology Corporation and Renesas Solutions Corporation put the maximum effort into making semiconductor products better and more reliable but there is always the possibility that trouble may occur with them Trouble with semiconductors may lead to personal injury fire or property damage Remember to give due consideration to safety when making your circuit designs wi
18. ecuting Return value None Functions Notifies the current PC value immediately before executing an instruction Notifies the reset Function name void NotifyReset void Parameter None Return value None Functions Notifies that the target program was reset PDxxSIM I O DLL Kit e Notifies the start of simulator engine Function name void NotifyStart void Parameter None Return value None Functions Notifies that the simulator engine was started e Notifies the terminate of simulator engine Function name void NotifyEnd void Parameter None Return value None Functions Notifies that the simulator engine was terminated e Notifies the generate of interrupt Function name void NotifyInterrupt unsigned long vec Parameter unsigned long vec Vector number Vector address PD308SIM PD30SIM Vector number PD32RSIM EIT vector entry Only 0x00000080 Return value None Functions Notifies the vector number vector address for an interrupt when that interrupt was generated e Notifies immediately before reading from memory Function name void NotifyPreReadMemory unsigned long address int length Parameter unsigned long address Memory address int length Data length of memory data 1 1 byte 2 2 byte 3 3 byte 4 4 byte Return value None Functions Notifies the read address and data length immediately before reading from memory when a memory read from the target program occurred
19. ength amp data RequestPutM emory address length data O Notes 1 Changes of values input output to or from memory using the I O DLL cannot be referenced using the GUI output virtual port input output or I O script facilities of PDxxSIM 2 Only one I O DLL can be specified in PDxxSIM You cannot specify multiple DLLs 24 PDxxSIM I O DLL Kit User s Manual Rev 1 00 May 1 2003 REJ10J0063 0100Z COPYRIGHT 2003 RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED PDxxSIM I O DLL Kit User s Manual 2 1 Renesas Electronics Corporation 1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan REJ10J0063 0100Z
20. ffice equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions un
21. h unsigend long data Parameter unsigned long address Memory address int length Data length of memory data 1 1 byte 2 2 byte 3 3 byte 4 4 byte unsigned long data Memory data storage area Return value int status TRUE Succeeded FALSE Error Functions Gets memory data from the specified address The read access information performed by this function is not reflected in the virtual port input and I O script facilities 11 PDxxSIM I O DLL Kit Sets memory data Function name int RequestPutMemory unsigend long address int length unsigend long data Parameter unsigned long address Memory address int length Data length of memory data 1 1 byte 2 2 byte 3 3 byte 4 4 byte unsigned long data Memory data Return value int status TRUE Succeeded FALSE Error Functions Sets memory data at the specified address The write access information performed by this function is not reflected in the GUI output virtual port output and I O script facilities 12 PDxxSIM I O DLL Kit Gets register value Function name int RequestGetRegister int regNo unsigned long regValue Parameter int regNo Register number For register numbers see the header file iofunc iofunc h that is included in the DLL sample program Register numbers are defined in this file Example Definition for PD308SIM REG Rx F BankO Rx registers x 0 to 3 REG RxH High order 8 bits of the Rx register indicate
22. he model name 308 described here with any desired model name e g 30 or 32 1 Choose Open Workspace from the File menu of VC Open the project file IodllTemplate dsp for the IodllTemplate project which is stored in a directory under the directory in which the I O DLL package is installed hereafter referred to as C XMTOOLYIodll SamplesXPdxxsimYIodllTemplate Choose Setting from the Project menu of Check path settings for the I O DLL library files sim308 lib and IodlIExpLib d lib which are specified in the Object library modules column of the category General on the Link tab The file locations must be specified using absolute or relative paths These library files are stored in the Library directory of C MTOOL lodll If settings are made for Win32 Debug specify IodllExpLibd lib Objectlibrary modules oA ALibrary Sim308 lib sLibraryModllE xpLibd lib If settings are made for Win32 Release specify IodlIExpLib lib Object library modules AAA ALibrarysSim308 lib 4 4 LibrarylodllE xpLib lib Choose Setting from the Project menu of VC Change the I O DLL filename TodllTemplate dll which is specified in the Output file name column of the category General on the Link tab to another filename you want extension dlI so that the I O DLL output destination is the directory in which you installed PD308SIM hereaf
23. ld you like in your DLL Automation Windows Sockets Would you like to generate source file comments Yes please No thank you Cancel PDxxSIM I O DLL Kit Choose Setting from the Project menu of VC and enter the settings described below Select the C C tab and add a definition IODLL_EXPORTS to the Preprocessor definitions column of the category General Preprocessor definitions _WINDLL _AFXDLL _MBCS _USRDLLIODLL_EXPORTS Select the Link tab and specify the I O DLL library files sim308 lib and IodlIExpLib d lib using absolute or relative paths in the Object library modules column of the category General These library files are stored in the Library directory of C CXMTOOLXlIodll If settings are made for Win32 Debug specify IodlIExpLibd lib Dbject library modules JAA Library Sim308 lib Library M odllE pLibd lib If settings are made for Win32 Release specify IodlIExpLib lib Object library modules S Library Sim308 Iib ALibraryMadllE pLib lib gt Choose Setting from the Project menu of VC Set the Output file name column of the category General on the Link tab so that the I O DLL output destination is the directory C MTOOL PD308SIM Output file name C AMTOOL PD308SIM sample dll Copy iofunc cpp and iofunc h from the iofunc directory of the IodlITemplate project into a
24. name Pointer in which the converted symbol value is stored int nType Symbol types which are given priority when searched SYMBOL Symbol TYPE_LABEL Label Return value BOOL status TRUE Succeeded FALSE A symbol isn t found Functions This function searches for the corresponding value for the symbol and stores the found value in ulAddr The table below shows what search priority will be assigned to each symbol type when specified by nType priority level TYPE_SYMBOL TYPE_LABEL level 1 Local symbol Local label level 2 Global symbol Global label level 3 Local label Local symbol level 4 Global label Global symbol Attention For the symbol name to be specified for the pszSym parameter of the ConvertSymToVal function be sure to use one that is displayed in the symbol window For example if the symbol name displayed in the symbol window is prefixed by an underbar as in the case of _strl the symbol name specified for the pszSym parameter must also be prefixed by an underbar 23 PDxxSIM I O DLL Kit Below shows a use example void NotifyPreReadM emory unsigned long address int length unsigned long s_addr unsigned long data When the address 0x3e0 is read store the value of the symbol strl 0x3e0 if address 0x3e0 return if ConvertSymToVal str1 65 addr TYPE LABEL FALSE return RequestGetM emory s addr l
25. ny directory of the new project you ve created and add them to the project following the procedure described below Choose Add To Project Files from the Project menu of select iofunc cpp from the ensuing list and click OK Open infunc h and change the main header file specification for the application included in it to the new main header filename you ve created Example include YXIodlI Template h gt include sample h Open iofunc cpp then write the code for simulation When you build an I O DLL sample dll is created under the directory C MTOOL PD308SIM PDxxSIM I O DLL Kit 4 Method for Using the DLL This chapter describes how to use an I O DLL in the PDxxSIM after loading it Before you can use an I O DLL you must first register it to simxx exe If simxx exe has an I O DLL registered in it when you start it loads the registered I O DLL before starting simulation The following explains how to use an I O DLL after registering it to the PDxxSIM by using PD308SIM as an example To use I O DLLs for other simulator models change the model name 308 described here with any desired model name e g 30 or 32 1 the I O DLL file dll file you want to use into C MTOOL PD308SIM 2 Register the I O DLL to simxx exe To do this write the I O DLL filename in sim308 exe s environment setup file sim308 ini The sim308 ini file exists in C MTOOL PD308SIM
26. s it sends information to the I O DLL Make sure codes for simulation are written in these functions Function name Abstract NotifyStepCycle Notifies the number of execution cycles each time an instruction is executed NotifyPreExecutionPC Notifies the current PC value immediately before executing an instruction NotifyReset Notifies that the target program was reset NotifyStart Notifies that the simulator engine was started NotifyEnd Notifies that the simulator engine was terminated NotifyInterrupt Notifies the vector number vector address for an interrupt when that interrupt was generated NotifyPreReadMemory Notifies the read address and data length immediately before reading from memory when a memory read from the target program occurred NotifyPostWriteMemory Notifies the write address data length and data value after data was written from the target program to memory Below shows a specification of the function Notifies the number of execution cycles an instruction is executed Function name void NotifyStepCycle int cycle Parameter int cycle number of the executed cycles Return value None Functions Notifies the number of execution cycles each time an instruction is executed Notifies the current PC value before executing an instruction Function name void NotifyPreExecutionPC unsigned long address Parameter unsigned long address PC value before ex
27. ter referred to as CCYMTOOLXPD308SIM Output file name CAMTOOL PD 308SIM sample dll Open infunc iofunc cpp then write the code for simulation The infunc iofunc cpp has implemented in it the functions called from sim308 exe Use a function that accesses sim308 exe in the desired function as you write the code for simulation When you build an I O DLL sample dll is created under the directory C MTOOL PD308SIM 2 PDxxSIM I O DLL Kit 3 2 Method for Creating the new DLL To create a new I O DLL without using the IodlITemplate project follow the procedure described below 1 Choose New from the File menu of VC Then create a new project with settings shown below Select MFC AppWizard dll on the Projects tab Set any project name and location Example sample project Choose Create new workspace Check Win32 in the Platforms Click the OK gt Close Project name sample Location sample Ef Create new workspace Add to current workspace Dependency of s win32 Application Win32 Console Application Win32 Dynamic Link Library E Win32 Static Library MFC AppWizard Step 1 of 1 Terris katt lle hat type of DLL would you like to create e Edit View Insert Build Help C Regular DLL with MFC statically linked 277556 Regular DLL using shared MFC DLL Extension DLL using shared DLL TODO What features wou
28. th appropriate measures such as i placement of substitutive auxiliary circuits ii use of nonflammable material or iii prevention against any malfunction or mishap Notes regarding these materials These materials are intended as a reference to assist our customers in the selection of the Renesas Technology product best suited to the customer s application they do not convey any license under any intellectual property rights or any other rights belonging to Renesas Technology Corporation Renesas Solutions Corporation or a third party Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage or infringement of any third party s rights originating in the use of any product data diagrams charts programs algorithms or circuit application examples contained in these materials All information contained in these materials including product data diagrams charts programs and algorithms represents information on products at the time of publication of these materials and are subject to change by Renesas Technology Corporation and Renesas Solutions Corporation without notice due to product improvements or other reasons It is therefore recommended that customers contact Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor for the latest product information before purchasing a product listed herein The information described her
29. tion is displayed in the symbol window F Symbol Window E Ore Sea About G SYMBOL 58 00000400 LABEL calloc DFDUADG G LABEL _ pool 0000040 LABEL 00000416 G_LABEL start D FDD TE G_LABEL _str1 00000420 G_LABEL free U0FDU430 LABEL _str2 00000430 e following are displayed in the contents Symbol type Symbol name Symbol address Symbol types are displayed in order of SYMBOL global symbols 1 SYMBOL local symbols G LABEL global labels and L LABEL local labels No symbol types are displayed unless they exist in the target program search for symbols click the Search Symbol button in the toolbar and enter the symbol name you want to search e Ifthe target program is downloaded again the symbol information being displayed in the symbol window is updated In this case symbol information is written over the file to which symbol information was previously output To change symbol information output files click the Create Symbol List button and specify a symbol file again Note Once a symbol information output file is selected i e symbol information is displayed in the symbol window the symbol information is automatically updated the next time you download the target program If you download the target program while no symbol information is being displayed in the symbol window no symbol information is updated Therefore click the Create S
30. tions Corporation is necessary to reprint or reproduce in whole or in part these materials these products or technologies are subject to the Japanese export control restrictions they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved destination Any diversion or reexport contrary to the export control laws and regulations of Japan and or the country of destination is prohibited Please contact Renesas Technology Corporation or Renesas Solutions Corporation for further details on these materials or the products contained therein For inquiries about the contents of this document or product fill in the text file the installer generates in the following directory and email to your local distributor SUPPORT Product name SUPPORT TXT Renesas Tools Homepage __http www renesas com en tools Preface The PDxxSIM I O DLL kit is provided for the purpose of extending the functions of the M3T PDxxSIM simulator debuggers Microsoft Visual C a Windows application development environment available on the market is needed to create I O DLLs This user s manual shows the basic information necessary to use the PDxxSIM I O DLL kit For details about the language specifications of and the method for using Visual C refer to the user s manual included with your product or online help Supported simulator debuggers The PDxxSIM I O DLL kit cannot be used in all of the M3T
31. us information including memory read write information and the number of cycles in which the program executed each instruction The simulator debugger and the I O DLL are configured in the manner shown below PDxxSIM Notifies the information to DLL from simxx exe The number of cycles of the pdxxsim exe executed instruction Simulator debugger The timing of resetting e R W information of memory etc simxx exe I O DLL Simulator engine Create Puts gets the information to simxx exe from I O DLL e Puts gets the memory value the register value The Interrupt generation The verification of the interrupt generation conditions e The stopping of execution of the target program etc PDxxSIM I O DLL Kit 3 Method for Creating the DLL This chapter describes how to create I O DLLs using Microsoft Visual C 6 0 hereafter abbreviated VC For details on how to use VC see the VC user s manual or help An I O DLL be created by making use of the I O DLL sample project IodlITemplate which is included with the I O DLL kit or newly from scratch The IodlITemplate project is a VC template project provided for creating I O DLLs 3 1 Method for Using the IodllTemplate project The following explains how to create I O DLLs from the IodllTemplate project by using an I O DLL for PD308SIM as an example To create I O DLLs for other simulator models change t
32. ut file name CAMTOOL PD 3085SIM sample dll Choose Setting from the Project menu of VC Set up the Executable for debug session column on the Debug tab so that the simulator engine executable file sim308 exe stored in C MTOOL PD308SIM becomes the debug time executable file Executable for debug session CAMTOOLNPD3085IMsim308 exe gt After you finished setting up choose Start Debug Go from the Build menu of VC to start debugging The dialog box shown below will appear Because the I O DLL can be debugged click OK to continue Microsoft Developer Studio C MTOOLSPD30851M sim308 exe does not contain debugging information Press OK to continue Do not prompt in the future Cancel debug the I O DLL start PD308SIM after the simulator engine sim308 exe has started up After sim308 exe started up it is registered displayed in the Windows system tray So you can see that sim308 exe is up and running before you start PD308SIM For details the debugging function of VC see the VC user s manual or help PDxxSIM I O DLL Kit 6 Functions that Send Information to the DLL This chapter describes specifications of the functions that send information on the simulator engine side to the I O DLL These functions are implemented in the I O DLL project s source file iofunc iofunc cpp The simulator engine simxx exe calls these functions a
33. ymbol List button to output symbol information 20 PDxxSIM I O DLL Kit 3 Load the output file into the DLL to register the symbol information Below shows a process e To register the symbol information to the I O DLL use the RegistrationSymbolList and FreeSymbolList functions Below shows a specification of the function Registration of symbol information Function name Parameter Return value Functions BOOL RegistrationSymbolList const char pszFile const char pszFile Symbol file name Specify the file with absolute path Can t use a network pathname BOOL status TRUE Succeeded FALSE Error An error dialog is displayed if an error occurs Below show the contents of the error Error message Contents A symbol file can t open The symbol file cannot be opened Check whether the specified symbol file is correct and whether it exists Not enough memory to The symbol file cannot be opened for lack of open a symbol file memory Check whether sufficient memory is available The format of the symbol The symbol file has an invalid format Create file is wrong a symbol file correctly again This function loads the created symbol file into the symbol window to register the symbol information The symbol information registered by this function is retained in memory Therefore whenever the symbol information becomes unnecessary call the FreeSymbolList
Download Pdf Manuals
Related Search
Related Contents
"取扱説明書" - Service Philips AJ3011 Clock Radio MTX Audio TA3404 User's Manual Model: Pinotage Powermatic POWERMAT PMR-PPC1EU_IB User's Manual Sony DEV-50 Notes Copyright © All rights reserved.
Failed to retrieve file