The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

Custom Builder Emulator Debugger PD79 User's Manual Rev. 1.0


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



CB79 V.1.00
Custom Builder Emulator Debugger PD79
User's Manual
Rev. 1.00 2003 REJ10J0091-0100Z
Active Microsoft, MS-DOS, Visual Basic, Visual C++, Windows Windows either registered trademarks trademarks Microsoft Corporation United States other countries. Keep safety first your circuit designs! Renesas Technology Corporation Renesas Solutions Corporation maximum effort into making semiconductor products better more reliable, there always possibility that trouble occur with them. Trouble with semiconductors lead personal injury, fire property damage. Remember give consideration safety when making your circuit designs, with appropriate measures such placement substitutive, auxiliary circuits, (ii) nonflammable material (iii) prevention against malfunction mishap. Notes regarding these materials These materials intended reference assist customers selection Renesas Technology product best suited customer's application; they convey license under intellectual property rights, other rights, belonging Renesas Technology Corporation, Renesas Solutions Corporation third party. Renesas Technology Corporation Renesas Solutions Corporation assume responsibility damage, infringement third-party's rights, originating product data, diagrams, charts, programs, algorithms, circuit application examples contained these materials. information contained these materials, including product data, diagrams, charts, programs algorithms represents information products time publication these materials, subject change Renesas Technology Corporation Renesas Solutions Corporation without notice product improvements other reasons. therefore recommended that customers contact Renesas Technology Corporation, Renesas Solutions Corporation authorized Renesas Technology product distributor latest product information before purchasing product listed herein. information described here contain technical inaccuracies typographical errors. Renesas Technology Corporation Renesas Solutions Corporation assume responsibility damage, liability, other loss rising from these inaccuracies errors. Please also attention information published Renesas Technology Corporation Renesas Solutions Corporation various means, including Renesas home page (http://www.renesas.com). When using information contained these materials, including product data, diagrams, charts, programs, algorithms, please sure evaluate information total system before making final decision applicability information products. Renesas Technology Corporation Renesas Solutions Corporation assume responsibility damage, liability other loss resulting from information contained herein. Renesas Technology semiconductors designed manufactured device system that used under circumstances which human life potentially stake. Please contact Renesas Technology Corporation, Renesas Solutions Corporation authorized Renesas Technology product distributor when considering product contained herein specific purposes, such apparatus systems transportation, vehicular, medical, aerospace, nuclear, undersea repeater use. prior written approval Renesas Technology Corporation Renesas Solutions Corporation necessary reprint reproduce whole part these materials. these products technologies subject Japanese export control restrictions, they must exported under license from Japanese government cannot imported into country other than approved destination. diversion reexport contrary export control laws regulations Japan and/or country destination prohibited. Please contact Renesas Technology Corporation Renesas Solutions Corporation further details these materials products contained therein. inquiries about contents this document product, fill text file installer generates following directory email your local distributor. Renesas Tools Homepage http://www.renesas.com/en/tools
Overview
1.1. Setting CB79 1.2. Features CB79 1.2.1. Same user interface available with PD79.1 1.2.2. Development environment where programming, building, debugging integrated.1 1.2.3. Creation custom command custom window programs.1 1.2.4. PD79's Register, Memory, Dump, Script Windows.1
Function Each Window
2.1. CB79 Window 2.1.1. Menu Bar.3 2.1.2. Tool Bar.4 2.2. Project Window 2.2.1. Menu Bar.5 2.3. Message Window 2.3.1. Menu Bar.5 2.4. Editor Window 2.4.1. Menu Bar.6 2.5. Local Window 2.5.1. Menu Bar.6 2.6. Global Window 2.6.1. Menu Bar.6
Method Creating Program
3.1. Creating Custom Command Program 3.1.1. Creating Project Custom Command Program.7 3.1.2. Creating Source File.9 3.1.3. Source File Project.12 3.1.4. Building Project.12 3.1.5. Execution Example Custom Command Program.14 3.2. Creating Custom Window Program 3.2.1. Creating Project Custom Window Program.15 3.2.2. Editing Automatically Created Framework Source File.17 3.2.3. Execution Example Custom Window Program.18 3.3. Using Setup ialog 3.3.1. Project Setup Area.19 3.3.2. Source File Setup Area.20 3.3.3. Include File Library File Search Path Setup Area.21 3.3.4. Library Setup Area.22 3.4. Using Breakpoint Dialog 3.4.1. File name setup/display area.24 3.4.2. Line number setup/display area.24 3.4.3. Breakpoint list area.24 3.4.4. Enter button.24 3.4.5. Cancel button.24 3.4.6. button.24 3.4.7. Delete button.24 3.4.8. Enable button.24 3.4.9. Disable button.25 3.4.10. Jump button.25
Programming Language Specifications
Reference
5.1. Standard Functions (stdlib.lib) 5.1.1. malloc: Allocate memory from heap area.27 5.1.2. free: Release area allocated malloc() function.27 5.1.3. strlen: length character string.28 5.1.4. strcat: Concatenate character strings.28 5.1.5. strcmp: Compare character strings.28 5.1.6. strcpy: Copy character string.28 5.1.7. strtoi: Convert character string into value.29 5.1.8. gets: Input character string (from Script Window).29 5.1.9. exit: Terminate program execution.29 5.1.10. fopen: Open file.30 5.1.11. fclose: Close file.30 5.1.12. fseek: Move file pointer.30 5.1.13. fgetc: Input character (from file).30 5.1.14. fputc: Output character file).30 5.1.15. fgets: Input character string (from file).31 5.1.16. fputs: Output character string file).31 5.1.17. printf: Output characters with format Script Window).31 5.1.18. sprintf: Output characters with format memory).31 5.1.19. fprintf: Output characters with format file).32 5.2. System Call Functions Debugger Operation (system.lib) 5.2.1. _cpu_go: Execute program free-run mode.35 5.2.2. _cpu_gb: Execute program with break.35 5.2.3. _cpu_stop: Stop program execution.35 5.2.4. _cpu_reset: Reset target CPU.36 5.2.5. _cpu_src_step: Execute program source line time.36 5.2.6. _cpu_step: Execute program instruction time.36 5.2.7. _cpu_src_over: Execute program source line time including subroutines.36 5.2.8. _cpu_over: Execute program instruction time including subroutines.37 5.2.9. _cpu_src_return: Return from current calling routine source line time.37 5.2.10. _cpu_return: Return from current calling routine instruction time.37 5.2.11. _cpu_wait: Wait until program execution stops.37 5.2.12. _reg_get_reg: register value.38 5.2.13. _reg_put_reg: register value.38 5.2.14. _reg_get_pc: program counter value.38 5.2.15. _reg_put_pc: program counter value.39 5.2.16. _reg_clear_cache: Clear register cache.39 5.2.17. _mem_get: memory value.39 5.2.18. _mem_put: memory value.39 5.2.19. _mem_get_endian: memory value with endian attached.40 5.2.20. _mem_put_endian: memory value with endian attached.40 5.2.21. _mem_fill: Fill memory.41 5.2.22. _mem_move: Transfer memory block.41 5.2.23. _mem_clear_cache: Clear memory cache.41 5.2.24. _break_set: Set/enable software break.42 5.2.25. _break_get: settings software breaks.42 5.2.26. _break_reset: Clear software break.42 5.2.27. _break_reset_all: Clear software breaks.43 5.2.28. _break_disable: Disable software break.43 5.2.29. _break_disable_all: Disable software breaks.43 5.2.30. _break_enable_all: Enable software breaks.43 5.2.31. _break_search: attribute software break settings.44 5.2.32. _rram_clear: Clear monitor memory.44
5.2.33. 5.2.34. 5.2.35. 5.2.36. 5.2.37. 5.2.38. 5.2.39. 5.2.40. 5.2.41. 5.2.42. 5.2.43. 5.2.44. 5.2.45. 5.2.46. 5.2.47. 5.2.48. 5.2.49. 5.2.50. 5.2.51. 5.2.52. 5.2.53. 5.2.54. 5.2.55. 5.2.56. 5.2.57. 5.2.58. 5.2.59. 5.2.60. 5.2.61. 5.2.62. 5.2.63. 5.2.64. 5.2.65. 5.2.66. 5.2.67. 5.2.68. 5.2.69. 5.2.70. 5.2.71. 5.2.72. 5.2.73. 5.2.74. 5.2.75. 5.2.76. 5.2.77. 5.2.78. 5.2.79. 5.2.80. 5.2.81. 5.2.82. 5.2.83. 5.2.84. 5.2.85. 5.2.86.
_rram_get_area: monitor area.44 _rram_set_area: monitor area.44 _rram_get_size: size monitor area.45 _rram_get_data: monitor data.45 _info_check_run: Check execution status.45 _info_service: information service contents.46 _info_cpu: information.46 _info_get_map: information.47 _info_check_map: Check mapped area.47 _info_get_suffix: load file extension.47 _info_set_suffix: load file extension.48 _info_ispc4700h: Identify connected emulator.48 _scope_set_obj: scope object file name.48 _scope_set_addr: scope address.48 _sym_add_sym: Enter symbols.49 _sym_val2sym: symbol value.49 _sym_sym2val: value symbol.50 _sym_add_bit: Enter symbols.50 _sym_val2bit: symbol address number.50 _sym_bit2val: address number symbol.51 _line_addr2line: source line address.51 _line_line2addr: address source line.51 _src_get_name: list source file names.51 _obj_get_name: list object file names.51 _obj_addr2obj: object file name address.52 _func_get_name: list function names.52 _exp_eval: Evaluate assembler expression.53 _com_send: Transfer sequence bytes emulator.54 _com_receive: Receive sequence bytes from emulator.54 _scri_echo_on: Turn output script window.54 _scri_echo_off: Turn output script window.54 _c_exp_eval: Evaluate C-language expression.55 _get_shared_mem: shared variable.56 _set_shared_mem: shared variable.56 _delete_shared_mem: Delete shared variable.57 _get_err_msg: PD79's error message statement.57 _get_tick_count: elapsed time since Windows startup.57 _get_time: current system date time.58 _disp_src_line: Change contents displayed program window.58 _rtt_get_range: data range.59 _rtt_get_disasm: disassembled analysis result data.59 _rtt_get_bus: bus-mode display character string data.60 _rtt_check_isfetch: Check fetch cycle data.60 _rtt_get_data: data.61 _rtt_clear_cache: Clear real-time trace (RTT) cache.61 _cv_get_data: coverage data.62 _cv_set_data: coverage data.63 _cv_get_base: base address coverage range.63 _cv_set_base: base address coverage range.63 _cv_clear_data: Clear coverage data.64 _cv_clear_cache: Clear coverage cache.64 _syscom: Execute PD79's script command.64 _doscom: Execute command.64 List Emulator Errors.65
5.3. System Call Functions Window Operation (winlib.lib) 5.3.1. _win_printf: Output text with format included.67 5.3.2. _win_puts: Output character string custom window.67 5.3.3. _win_set_cursor: cursor position.67 5.3.4. _win_set_color: text color.68 5.3.5. _win_set_bkcolor: background color.69 5.3.6. _win_column2dot: Convert cursor coordinates into pixel coordinates.69 5.3.7. _draw_text_out: Output character string custom window.70 5.3.8. _draw_set_color: text color.70 5.3.9. _draw_set_bkcolor: background color.71 5.3.10. _draw_set_bkmode: background mode.71 5.3.11. _draw_set_font: font.72 5.3.12. _draw_get_char_size: font size.72 5.3.13. _draw_line: Draw line.73 5.3.14. _draw_fill_rect: Fill rectangle.74 5.3.15. _draw_frame_rect: Draw rectangle.75 5.3.16. _draw_invert_rect: Reverse rectangle color.75 5.3.17. _draw_arc: Draw ellipse.76 5.3.18. _draw_pie: Draw sector.77 5.3.19. _win_redraw: Redraw custom window.78 5.3.20. _win_redraw_clear: Redraw custom window.78 5.3.21. _win_redraw_item: Redraw control item.78 5.3.22. _win_show_window: Show/hide control item.78 5.3.23. _win_set_window_title: title custom window.78 5.3.24. _win_enable_window: Enable/disable control item.78 5.3.25. _win_button_create: Create button.79 5.3.26. _win_button_set_text: Change button text.79 5.3.27. _win_hscroll_range: scroll range horizontal scroll bar.79 5.3.28. _win_hscroll_pos: position horizontal scroll box.79 5.3.29. _win_vscroll_range: scroll range vertical scroll bar.80 5.3.30. _win_vscroll_pos: position vertical scroll box.80 5.3.31. _win_statusbar_create: Create status bar.80 5.3.32. _win_statusbar_set_pane: items status bar.81 5.3.33. _win_statusbar_set_text: text status bar.81 5.3.34. _win_dialog: Create input dialog box.81 5.3.35. _win_message_box: Create message box.82 5.3.36. _win_filedialog: Create file selection dialog box.83 5.3.37. _win_set_window_pos: position custom window.85 5.3.38. _win_set_window_size: size custom window.85 5.3.39. _win_timer_set: system timer.86 5.3.40. _win_timer_kill: Reset system timer.86 5.4. Handle Functions Custom Window 5.4.1. Specifications Data Passed Handle Functions.88 5.4.2. OnChar Handle Function.88 5.4.3. OnCommand Handle Function.89 5.4.4. OnCreate Handle Function.89 5.4.5. OnDestroy Handle Function.89 5.4.6. OnDraw Handle Function.89 5.4.7. OnEvent Handle Function.90 5.4.8. OnHScroll Handle Function.91 5.4.9. OnKeyDown Handle Function.92 5.4.10. OnKeyUp Handle Function.95 5.4.11. OnLButtonDblClk Handle Function.96 5.4.12. OnLButtonDown Handle Function.96
5.4.13. 5.4.14. 5.4.15. 5.4.16. 5.4.17. 5.4.18. 5.4.19. 5.4.20.
OnLButtonUp Handle Function.97 OnMouseMove Handle Function.97 OnRButtonDblClk Handle Function.98 OnRButtonDown Handle Function.98 OnRButtonUp Handle Function.99 OnSize Handle Function.100 OnTimer Handle Function.100 OnVScroll Handle Function.101
Overview
1.1. Setting CB79
CB79 same PD79. procedure setting PD79 detailed "Setup/Functional Outline" part PD79 V.2.00 User's Manual.
1.2. Features CB79
CB79 provides environment using PD79's customize function create exclusive script commands (hereafter called "custom command program") exclusive windows (hereafter called "custom window program"). custom command custom window programs thus created CB79 entered PD79 expand functions. following shows features CB79: same user interface available with PD79 supported. development environment where programming, building, debugging integrated provided. Creation custom command custom window programs supported. PD79's Register, Memory, Dump, Script Windows supported.
Each feature detailed sections below. 1.2.1. Same user interface available with CB79 uses same graphical interface design PD79, making possible CB79 easily same PD79. 1.2.2. CB79 allows control series operations from creating source files building debugging them. windows supported CB79 include Project, Message, Editor, Local, Global Windows. Each these windows allows manage projects, display build result other status, edit source file, display local global symbols. 1.2.3. CB79 allows type program going create specified from dialog that opened when creating project. this select custom command custom window program created. 1.2.4. Among windows available with PD79, CB79 supports Register, Memory, Dump, Script Windows. These windows used when creating custom command custom window programs. Note: macro script commands cannot used Script Window.
Function Each Window
Figure shows window structure CB79.
CB79 Window
Project Window
Local Window
Message Window
Editor Window
Global Window
Figure Window structure CB79 outline features functions each window CB79 explained below.
2.1. CB79 Window
CB79 Window main window CB79. This what opens first when start CB79. 2.1.1. Tables below show menu structure CB79 Window. Table Structure Menu (CB79 Window) (1/2) Menu item [F]ile Items pull-down menu [N]ew [S]ource/Header. [P]roject. [O]pen. [S]ave Save [A]s. [C]lose E[x]it [E]dit C[u]t [C]opy [P]aste [F]ind [E]nviron [I]nit. [E]mem. [P]ath. [D]ebug [G]o [C]ome [S]tep [O]ver Retur[n] [A]nimate [B]reak Point. Break Point [S]et [L]ist. [R]eset [S]top B[u]ild R[e]Build [O]ption Changed window that focus. (Refer sections that follow.) clear breakpoint. Open Break dialog box. Reset program. Stop program execution. Built current project. Rebuild current project. Create source/header file. Create project. Open source/project. Save source file. Save file after assigning name. Close source file. Terminate CB79. Delete specified range. Copy specified range clipboard. Paste text from clipboard into position. Search specified character string. Open Init dialog box. Open Emem dialog box. Open Path dialog box. Execute command. Execute Come command. Execute Step command. Execute Over command. Execute Return command. Execute Animate command. Open Break dialog box. Function
Table Structure Menu (CB79 Window) (2/2) Menu item [W]indow Items pull-down menu [C]ascade [T]ile [A]rrange Icon [R]egister Window M[e]mory Window [D]ump Window Scr[i]pt Window [H]elp [I]ndex [A]bout. 2.1.2. Table shows tool structure CB79 Window. Table Structure Tool (CB79 Window) Button Function Execute command Execute Come command Execute Step command Execute Over command Execute Return command Stop program execution Set/clear breakpoint Reset program Open Break dialog Build project Rebuild project Corresponding menu [Debug]->[Go] [Debug] ->[Come] [Debug] ->[Step] [Debug] ->[Over] [Debug] ->[Return] [Debug] [Stop] [Debug] [Break Point] [Set] [Debug] [Reset] [Debug] [Break Point.] [Debug] [Build] [Debug] [ReBuild] Function Display windows another. Display windows side side. Line icons. Open PD79's Register Window. Open PD79's Memory Window. Open PD79's Dump Window. Open PD79's Script Window. Open table contents online help. Display version CB79.
2.2. Project Window
This window used manage source files custom command custom window programs created CB79. source file displayed this window opened Editor Window example, double-clicking mouse button. 2.2.1. Table shows menu structure Option menu Project Window. Table Menu Structure Option Menu (Project Window) Menu item [O]ption Items pull-down menu [S]et [A]dd File. [D]el File Function Open Setup dialog box. source file project. Delete source file from project.
2.3. Message Window
This window used display compile link error when building project other messages during debugging. These messages initialized when start building project. When compile error displayed, point line error double- single-click mouse button select Then choose [Option] [Jump] from menu display corresponding source file Editor Window, with cursor moved line error. 2.3.1. Table shows menu structure Option menu Message Window. Table Menu Structure Option Menu (Message Window) Menu item [O]ption Items pull-down menu [J]ump Function Display lines error.
2.4. Editor Window
This window used edit source file. Multiple instances this window opened time, with source file name displayed title each window. Editor Window provides versatile editing functions, allowing input delete characters, paste from clipboard, load save file. During debugging, furthermore, breakpoint line shown next execution line shown blue. breakpoint line next execution line overlap, they displayed yellow. 2.4.1. Option menu Editor Window does have submenu.
2.5. Local Window
This window used display local variables their values function that corresponds program counter during debugging. This window opened when start debugging program closed when finish debugging. 2.5.1. Option menu Local Window does have submenu.
2.6. Global Window
This window used display global variables their values during debugging. This window opened when start debugging program closed when finish debugging. 2.6.1. Option menu Global Window does have submenu.
Method Creating Program
This section explains CB79 create custom command custom window program using simple program example.
3.1. Creating Custom Command Program
following shows procedure creating custom command program using CB79. Create project custom command program. Write source file. source file project. Build project. Debug correct source file necessary. Repeat steps until program operates properly.
table below shows specifications custom command program created this section. Program name Parameter Function m_reset None Display program counter value before reset. Reset target MCU. Display program counter value after reset. 3.1.1. Choose [File]->[New]->[Project.] from CB79 Window menu. dialog shown below will appear.
Figure Target Select dialog Choose "Custom Command" press "OK" button. file selection dialog will open, input project name press "Save" button. file name extension omitted.) diagram below shows example where "m_reset" input name sample custom command program created this section.
Figure Dialog selecting project name created Project Window showing created project file name project setup dialog opened.
Figure Setup dialog
Figure Project Window Setup dialog opened from Option menu Project Window change settings time want. this example, only press "Cancel" button Setup dialog leave intact. details Setup dialog box, refer Section 3.3, "Using Setup Dialog Box" page Thus, with above, project file named "m_reset.prj" created.
3.1.2. Choose [File]->[New]->[Source/Header.] from CB79 Window menu. Editor Window shown below will appear.
Figure Blank Editor Window Move focus this Editor Window choose [File]->[Save As.] from CB79 Window menu bring Save dialog box. When this dialog opens, input file name press "Save" button. Specify ".m" source file name extension.
Figure Save dialog name have input Save dialog displayed title Editor Window.
Figure Editor Window with name shown title
Write custom command source program this Editor Window.
Figure Editor Window with source program written details about programming language specifications, refer Section
Programming Language Specifications" page details about library function specifications, refer Section "Reference" page asterisk file name title indicates that changes have been made this file. Thus, with above, custom command source file named "m_reset.m" created.
3.1.3. build source file created preceding section, need project. Choose [Option]->[Add File.] from Project Window menu bring "Add source" dialog box. When this dialog opens, choose file name want added project press "Open" button. source file name thus added displayed Project Window.
Figure "Add Source" dialog
Figure Project Window with source file added Thus, with above, source file "m_reset.m" added project. also source files project using Setup dialog box. details Setup dialog box, refer Section 3.3, "Using Setup Dialog Box" page 3.1.4. operation create custom command program custom window program file processing source files added project referred "build" "rebuild." difference between "build" "rebuild" that among source files added project, only those which have been modified since program file created previously processed former, whereas source files added project processed latter. execute Build, choose [Debug]->[Build] from Window menu press Build button tool bar. execute Rebuild, choose [Debug]->[ReBuild] from Window menu press Rebuild button tool bar.
Figure Message Window when succeeded building Thus, with above, custom command program file generated CB79 providing that error found source program settings Setup dialog box. this example, include file library file search paths remain default value (current directory) because only pressed "Cancel" button Setup dialog that opened when creating project. Therefore, project built following process described above, message will displayed Message Window indicating that include files cannot opened.
Figure Message Window when error occurred when building this case, click error message line displayed Message Window then choose [Option]->[Jump] double-click error message line. corresponding source line will displayed Editor Window, with cursor moved that line. example here, Build operation successfully executed setting include file library file search paths properly. details Setup dialog box, refer Section 3.3, "Using Setup Dialog Box" page
3.1.5. following shows execution example m_reset command program that created example above. execute command program, press button CB79 Window tool bar.
Figure Execution example custom command program "m_reset.p" this example, will that address before reset 40404H address after reset F0000H. Output from custom command programs into Script Window. Therefore, Script Window open, there means verifying output from custom command programs.
3.2. Creating Custom Window Program
following shows procedure creating custom window program using CB79. Create project custom window program. Edit framework source file generated CB79. Build project. Debug correct source file necessary. Repeat steps until program operates properly.
table below shows specifications custom window program created this section. Program name Function dump1000 Dump bytes beginning with address 1000H.
3.2.1. Choose [File]->[New]->[Project.] from CB79 Window menu. dialog shown below will appear.
Figure Target Select dialog Choose "Custom Window" press "OK" button. file selection dialog will open, input project name press "Save" button. file name extension omitted.) diagram below shows example where "dump1000" input name sample custom window program created this section.
Figure Dialog selecting project name created When dialog prompting your confirmation whether create framework shown below appears, enter "Yes".
Figure Dialog confirmation framework generation enter "No" here, CB79 does automatically create framework. Project Window showing created project file name project setup dialog opened.
Figure Setup dialog
Figure Project Window Setup dialog opened from Option menu Project Window change settings time want. this example, only press "Cancel" button Setup dialog leave intact. details Setup dialog box, refer Section 3.3, "Using Setup Dialog Box" page When creating project custom window program, framework source file automatically generated CB79. this example, file "dump1000.m" automatically generated. Programming custom window program accomplished editing this framework source file. Thus, with above, project file "dump1000.prj" framework source file "dump1000.m" created.
3.2.2. framework source file automatically created CB79 contains description handle functions that correspond window events. details about handle functions, refer Section 5.4, "Handle Functions Custom Window" page handle functions treated example here: OnDraw OnEvent. OnDraw function called when area hidden some other window need displayed. OnEvent function called when change debugger status required such when target's memory value been modified. When OnDraw function called, dump1000 gets bytes memory values starting from address 1000H convert them into character strings display window. write this series processing, edit internal statements OnDraw function. Furthermore, when OnEvent function called, dump1000 calls OnDraw function update window display. Note: delete functions written framework source file. Loss function this file makes impossible build project correctly. There limit functions that added file. diagram below shows Editor Window displaying OnDraw function that been edited "dump1000" custom window program.
Figure Editor Window displaying OnDraw function dump1000 method building project custom window program same used custom command programs. Refer Section 3.1.4, "Building Project" page
3.2.3. following shows execution example dump1000 window program that created example above. execute window program, press button CB79 Window tool bar.
Figure Execution example custom window program "dump1000.p" this example, will that bytes beginning with address 1000H displayed dump form. When area hidden some other window need displayed, custom window program calls OnDraw function; when debugger status need updated such when target memory contents have been changed, calls OnEvent function. Therefore, dump1000 custom window program display automatically updated when hidden part displayed target memory contents changed.
3.3. Using Setup Dialog
Setup dialog provided setting project. This dialog opened choosing [Option]->[Set up.] from CB79 Window menu double-clicking project file name displayed Project Window. Project setup area Library setup area
Source file setup area
Include file library file search path setup area
Figure Structure Setup dialog 3.3.1. This area comprised following three fields: Project type setup/display field Target file name setup/display field
Runtime parameter setup/display field Figure Structure project setup field
3.3.1.1.Project Type Setup/Display Field following project types here. Custom Command Custom Window Create custom command program. Create custom window program
project type have displayed this field startup routines libraries that will combined during building selected depending project type choose program created. change project type only affects selection startup routines libraries that will combined during building. 3.3.1.2.Target File Name Setup/Display Field program file name here that want created when building. file name have displayed this field. 3.3.1.3.Runtime Parameter Setup/Display Field This field appears when specified "Custom Command" project type. parameters this field that want passed when debugging custom command program. parameters here passed arguments "argc" "argv" main() function following manner: argc argv Number parameters Pointer array address that contains pointers areas where character strings specified parameters stored parameters have displayed this field. 3.3.2. This area comprised following five fields: File name setup/display field Refer button
file display/delete file select field button Delete button Figure Structure source file setup area
3.3.2.1.File Name Setup/Display Field source file name this field that want added project. source file here added project press "Add" button source file name displayed file display/delete file select field. source file names added project listed press "Add" button. 3.3.2.2.Add File Display/Delete File Select Field source file names added project listed this field. unnecessary source file deleted from project selecting file name this field clicking with mouse pressing "Delete" button. 3.3.2.3.Refer Button source file names added project listed this field. unnecessary source file deleted from project selecting file name this field clicking with mouse pressing "Delete" button. 3.3.2.4.Add Button This button adds source file that entered file name setup/display field project. When source file, CB79 checks file exists. specified source file does exist already been added project, file added. 3.3.2.5.Delete Button This button deletes source file from project that have selected clicking with mouse file display/delete file select field. file deleted unless there source file selected. 3.3.3. This area comprised following four fields: Include file search path setup/display field Default include path setup button
Library file search path setup/display field
Default library path setup button
Figure Structure include file library file search path setup area
3.3.3.1.Include File Search Path Setup/Display Field directory this field that want searched file when inclusion file specified #include source file. Normally, specify directory where system include files stored. system include files installed directory that located below directory where CB79 installed. include file search path have displayed this field. 3.3.3.2.Default Include Path Setup Button This button sets directory that include file search path setup/display field default path used CB79 when creating project. When create project with CB79 after setting default path with this button, directory have used include file search path. 3.3.3.3.Library File Search Path Setup/Display Field directory this field that want searched library file linked when building project. Normally, specify directory where system library files stored. system library files installed directory that located below directory where CB79 installed. library file search path have displayed this field. 3.3.3.4.Default Library Path Setup Button This button sets directory that library file search path setup/display field default path used CB79 when creating project. When create project with CB79 after setting default path with this button, directory have used library file search path. 3.3.4. This area comprised following five fields: Library name setup/display field Refer button
library display/delete library select field button Delete button Figure Structure library setup area
3.3.4.1.Library Name Setup/Display Field this field, library file name that added project system library that want linked when building project. library file here added project press "Add" button library file name displayed library display/delete library select field. library file names added project listed press "Add" button. 3.3.4.2.Add Library Display/Delete Library Select Field library file names added project listed this field. unnecessary library file deleted from project selecting file name this field clicking with mouse pressing "Delete" button. 3.3.4.3.Refer Button This button allows library file project without having input file name from keyboard. When press "Refer" button, file selection dialog opens. library file name choose this dialog input library name setup/display field. proceed press "Add" button project. 3.3.4.4.Add Button This button adds library file that entered library name setup/display field project. When library file, CB79 checks file exists. specified library file does exist already been added project (including system libraries), file added. 3.3.4.5.Delete Button This button deletes library file from project that have selected clicking with mouse library display/delete library select field. file deleted unless there library file selected.
3.4. Using Breakpoint Dialog
breakpoint dialog allows make various breakpoint settings. Choose CB79 menus [Debug] [Break Point.] press break dialog open button tool bar. File name setup/display area Line number setup/display area Enter button
Cancel button button Delete button Enable button Disable button
Breakpoint list display area
Jump button
Figure Structure breakpoint dialog 3.4.1. Specify file name which want breakpoints full path. 3.4.2. Specify line number file where want breakpoint. 3.4.3. This area lists breakpoints that currently set. When choose breakpoint listed this area, file name selected breakpoint file name setup/display area, line number line number setup/display area. symbols list area indicate whether breakpoints enabled disabled, which followed display line numbers then file names. 3.4.4. When press this button, breakpoint information you've changed from breakpoint dialog registered system before closing dialog box. 3.4.5. When press this button, breakpoint information you've changed from breakpoint dialog canceled dialog closed without saving anything. 3.4.6. this button register breakpoint shown file name setup/display line number setup/display areas breakpoint list area. 3.4.7. This button deletes breakpoint you've selected breakpoint list area. button when want delete breakpoints collectively. 3.4.8. This button enables breakpoint you've selected breakpoint list area. button when want enable breakpoints collectively.
3.4.9. Disable button This button disables breakpoint you've selected breakpoint list area. button when want disable breakpoints collectively. 3.4.10. This button moves editor window cursor position indicated breakpoint you've selected breakpoint list area.
Programming Language Specifications
programming language which programs written CB79 subset language, subject following restrictions compared general language. Types struct, union, enum nonexistent. Variables that involve initialization cannot declared. Example: static storage class nonexistent. storage class specifier that used extern only. types that used char, int, pointer, array only. Example: char 1Byte 4Byte 4Byte
char *str; 4Byte Types char signed types signed unsigned specifiers cannot used). Parameter lists cannot written prototype declaration functions. Example: Example: func( Although parameter types checked when calling function, type function's return value checked. Variables cannot declared intra-function local block. Example: func() preprocessor cannot expand macros accompanied parameters. define expressions. Example: #define #define FUNC(A) Error label Error Error foo(int); foo2(char *str); Error Error
Arguments function definitions written manner similar ANSI standards.
preprocessor pseudo-instruction allows only specified operand.
Reference
5.1. Standard Functions (stdlib.lib)
stdlib.lib provides standard functions that used custom command custom window programs. prototype declaration each function written stdlib.h. Function name malloc free strlen strcat strcmp strcpy strtoi gets exit fopen fclose fseek fgetc fputc fgets fputs printf sprintf fprintf Description Allocate memory from heap area. Release area allocated malloc. length character string. Concatenate character strings. Compare character strings. Copy character string. Convert character string into value. Input character string (from Script Window). Terminate program execution. Open file. Close file. Move file pointer. Input character (from file). Output character file). Input character string (from file). Output character string file). Output characters with format Script Window). Output characters with format memory). Output characters with format file).
5.1.1. Function name: Parameter: Returned value: Description: char *malloc(int size) size char NULL Number allocated bytes Allocated area Error
This function allocates area "size" bytes from heap area returns beginning address area. returns NULL there area that allocated.
5.1.2. Function name: Parameter: char Returned value: Description: free(char Area released Succeeded Error
This function releases area allocated malloc() function.
5.1.3. Function name: Parameter: char Returned value: Description: strlen(char Character string Character string length character string
This function returns length
5.1.4. Function name: Parameter: char Returned value: Description: char *strcat(char *s1, char *s2) char char Character string which added Character string added Character string which added
This function concatenates character string returns
5.1.5. Function name: Parameter: char Returned value: strcmp(char *s1, char *s2) char Negative number Description: Character string Character string
Positive number
This function compares character string character string returns positive number negative number
5.1.6. strcpy: Function name: Parameter: char Returned value: Description: char *strcpy(char *s1, char *s2) char char Destination Source Destination
This function copies character string including returns
5.1.7. strtoi: Function name: Parameter:char strtoi(char *str, radix, *value) *str Returned value: Description: TURE FALSE radix *value Succeeded Error Character string Conversion radix Converted value
This function converts character string specified into numeric value value whose radix specified "radix". conversion succeeded, converted value stored *value. values listed below specified "radix". Value radix Description begins with converted hexadecimal value; begins with converted octal value. Otherwise, converted decimal value. converted octal value. converted decimal value. converted hexadecimal value.
5.1.8. gets: Function name: Parameter: char Returned value: Description: char *gets(char char NULL Destination which stored Destination which stored Error
This function reads line from input area Script Window stores new-line character line replaced with return value stored NULL returned error occurred.
5.1.9. exit: Function name: Parameter: Returned value: Description: exit(int stat) stat Program's return value Always
This function terminates program execution returns control PD79. stat operation assumed have been processed normally. stat error assumed error message bearing number that macro_err displayed Script Window.
5.1.10. Open file Function name: Parameter: char Returned value: Description: fopen(char *filename, char *attr) *filename File name char NULL *attr File descpritor Error Open mode
This function opens file specified filename mode specified attr. succeeded, return value file descpriptor.
5.1.11. fclose: Close file Function name: Parameter: Returned value: Description: 5.1.12. Function name: Parameter: fseek(int pos, org) Returned value: Description: TRUE FALSE File descriptor Succeeded Error Distance file pointer moved Base point fclose(int TRUE FALSE File descriptor Succeeded Error
This function closes file specified
This function moves current position file specified which file written read. distance movement specified offset from base point Beginning file; Current position; file).
5.1.13. fgetc: Function name: Parameter:int Returned value: Description: fgetc(int FALSE File descriptor read value Error
This function reads byte from file pointer's current position file specified
5.1.14. fputc: Function name: Parameter: char Returned value: Description: fputc(char TURE FALSE Output character Succeeded Error File descriptor
This function outputs byte specified file pointer's current position file specified
5.1.15. fgets: Function name: Parameter: char fgets (char *str, *str Returned value: Description: char NULL Area which store input character string Error Maximum number characters input File descriptor
Area which store input character string
This function reads line from file pointer's current position file specified stores area specified str.
5.1.16. fputs: Function name: Parameter: char Returned value: Description: fputs (char *str, *str TURE FALSE Area which store output character string Succeeded Error File descriptor
This function outputs character string stored area specified file pointer's current position file specified
5.1.17. printf: Function name: Parameter: char Returned value: Description: printf(char *format, *format Format Variable parameter Number characters output Error
Positive number Negative number
This function outputs characters Script Window after converting them under control "format". return value indicates number characters written window. negative number returned error occurred.
5.1.18. sprintf: Function name: Parameter: char sprintf(char char *format, char Returned value: Description: Output address *format Format Number characters output Error Variable parameter
Positive number Negative number
This function outputs characters address specified after converting them under control "format". added output. return value indicates number characters written memory (not including negative number returned error occurred.
5.1.19. fprintf: Function name: Parameter: fprintf(int char *format, char Returned value: Description: File descriptor *format Format Number characters output Error Variable parameter
Positive number Negative number
This function outputs characters file specified after converting them under control "format". return value indicates number characters written file. negative number returned error occurred.
5.2. System Call Functions Debugger Operation (system.lib)
system.lib provides system call functions that used custom command custom window programs. prototype declaration each function written system.h. Function name _cpu_go _cpu_gb _cpu_stop _cpu_reset _cpu_src_step _cpu_step _cpu_src_over _cpu_over _cpu_src_return _cpu_return _cpu_wait _reg_get_reg _reg_put_reg _reg_get_pc _reg_put_pc _reg_clear_cache _mem_get _mem_put _mem_get_endian _mem_put_endian _mem_fill _mem_move _mem_clear_cache _break_set _break_get _break_reset _break_reset_all _break_disable _break_disable_all _break_enable_all _break_search _rram_clear _rram_get_area _rram_set_area _rram_get_size _rram_get_data _info_check_run _info_service Description Execute program free-run mode Execute program with break Stop program execution Reset target Execute program source line time Execute program instruction time Execute program source line time including subroutines Execute program instruction time including subroutines Return from current calling routine source line time Return from current calling routine instruction time Wait until program execution stops register value register value program counter value program counter value Clear register cache memory value memory value memory value with endian attached memory value with endian attached Fill memory Transfer memory block Clear memory cache Set/enable software break settings software breaks Clear software break Clear software breaks Disable software break Disable software breaks Enable software breaks attribute software break settings Clear monitor memory monitor area monitor area size monitor area monitor data Check execution status information service contents
Function name _info_cpu _info_get_map _info_check_map _info_get_suffix _info_set_suffix _scope_set_obj _scope_set_addr _sym_addr_sym _sym_val2sym _sym_sym2val _sym_addr_bit _sym_val2bit _sym_bit2val _line_addr2line _line_line2addr _src_get_name _obj_get_name _obj_addr2obj _func_get_name _exp_eval _com_send _com_receive _scri_echo_on _scri_echo_off _c_exp_eval _get_shared_mem _set_shared_mem _delete_shared_mem _get_err_msg _get_tick_count _get_time _disp_src_line _rtt_get_range _rtt_get_disasm _rtt_get_bus _rtt_check_isfetch _rtt_get_data _rtt_clear_cache _cv_get_data _cv_set_data _cv_get_base _cv_set_base
Description information information Check mapped area load file extension load file extension scope object file name scope address Enter symbols symbol value value symbol Enter symbols symbol address number address number symbol source line address address source line list source file names list object file names object file name address list function names Evaluate assembler expression Transfer sequence bytes emulator Receive sequence bytes from emulator Turn output script window Turn output script window Evaluate C-language expression shared variable shared variable Delete shared variable PD79's error message statement elapsed time since Windows startup current system date time Change contents displayed program window data range disassembled analysis result data bus-mode display character string data Check fetch cycle data data Clear real-time trace (RTT) cache coverage data coverage data base address coverage range base address coverage range
Function name _cv_clear_data _cv_clear_cache _syscom _doscom
Description Clear coverage data Clear coverage cache Execute PD79's script command Execute command
error occurs, error number written "Error" item global variable macro_err. details about emulator errors, refer Section 5.2.86, "List Emulator Errors" page custom command programs, FALSE returned from main() function, error message corresponding error number that macro_err displayed Script Window (for PD79) Error dialog (for CB79). 5.2.1. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE mode. ER_IN1_RUNNING Other 5.2.2. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error _cpu_gb() Already being executed Emulator error Succeeded Error _cpu_go()
This function starts executing target program from current free-run
This function starts executing target program from current with breaks included. ER_IN1_RUNNING Other Already being executed Emulator error
5.2.3. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error _cpu_stop()
This function stops execution target program. Emulator error
5.2.4. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error Cannot reset because executing program. Other Emulator error _cpu_reset()
This function reset target CPU. ER_IN1_RUNNING
5.2.5. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error _cpu_src_step()
This function starts executing target program, source line time, beginning with current ER_IN1_RUNNING ER_IN1_CANCEL Other Already being executed Execution suspended Emulator error
5.2.6. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error _cpu_step()
This function starts executing target program, instruction time, beginning with current ER_IN1_RUNNING ER_IN1_CANCEL Other Already being executed Execution suspended Emulator error
5.2.7. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error _cpu_src_over()
This function starts executing target program, source line time including subroutines, beginning with current ER_IN1_RUNNING ER_IN1_CANCEL Other Already being executed Execution suspended Emulator error
5.2.8. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error _cpu_over()
This function starts executing target program, instuction time including subroutines, beginning with current ER_IN1_RUNNING ER_IN1_CANCEL Other Already being executed Execution suspended Emulator error
5.2.9. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error _cpu_src_return()
This function causes program execution return from current calling routine, source line time. ER_IN1_RUNNING ER_IN1_CANCEL Other Already being executed Execution suspended Emulator error
5.2.10. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error _cpu_return()
This function causes program execution return from current calling routine, instruction time. ER_IN1_RUNNING ER_IN1_CANCEL Other Already being executed Execution suspended Emulator error
5.2.11. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error _cpu_wait()
This function stops execution custom command custom window program until target program stops. Emulator error
5.2.12. Function name: Parameter:int Returned value: Description: _reg_get_reg(int *reg, regno) *reg TRUE FALSE Register value regno Succeeded Error Register number
This function gets value register specified regno. 7900 series, regno defined follows: regno IN1_REG_A IN1_REG_B IN1_REG_X IN1_REG_Y IN1_REG_S IN1_REG_DT IN1_REG_PG IN1_REG_PC IN1_REG_PC16 IN1_REG_DPR0 IN1_REG_DPR1 IN1_REG_DPR2 IN1_REG_DPR3 IN1_REG_PS Register register register register register register register register Program counter register register register DPR0 register DPR1 register DPR2 register DPR3 register register
Error:
Emulator error
5.2.13. Function name: Parameter: Returned value: Description: Error: _reg_put_reg(int reg, regno) TRUE FALSE Register value Succeeded Error
This function sets value register specified regno. definition regno here same _reg_get_reg() function. Data range invalid. Emulator error
ER_IN1_DATA_OUTRANGE Other
5.2.14. Function name: Parameter: Returned value: Description: Error: _reg_get_pc(int *pc) value TRUE FALSE Succeeded Error Program counter register register)
This function gets program counter register register) value. Emulator error
5.2.15. Function name: Parameter: Returned value: Description: Error: _reg_put_pc(int value TRUE FALSE value. ER_IN1_ADDR_OUTRANGE Other 5.2.16. Function name: Parameter: None Returned value: Description: TRUE Return value always TRUE. This function clears register cache. _reg_clear_cache() Address range invalid Emulator error Succeeded Error Program counter register register)
This function sets program counter register register)
5.2.17. Function name: Parameter: _mem_get(int addr, size, char *data) addr char Returned value: Description: Error: TRUE FALSE Address size *data Succeeded Error Address range invalid. Cannot obtained because program executing. Other 5.2.18. Function name: Parameter: _mem_put(int addr, size, char *data) addr char Returned value: Description: Error: TRUE FALSE Address size *data Succeeded Error Address range invalid. Cannot because program executing. Other Emulator error Number bytes data Emulator error Number bytes obtained Location where obtained data stored
This function stores "size" bytes data from addr into "data". ER_IN1_ADDR_OUTRANGE ER_IN1_RUNNING
This function sets data data from addr into "size" bytes memory. ER_IN1_ADDR_OUTRANGE ER_IN1_RUNNING
5.2.19. Function name: Parameter: _mem_get_endian(int addr, num, size, *data) addr Returned value: Description: Error: TRUE FALSE Address size *data Succeeded Error Number data entries Size data entry Location where obtained data stored
This function stores entries data data size "size" bytes from addr into data[] according endian. Numerals specified "size". ER_IN1_ADDR_OUTRANGE ER_IN1_DATA_RANGE ER_IN1_RUNNING Address range invalid. "size" Cannot obtained because program executing. Other Emulator error
5.2.20. Function name: Parameter: _mem_put_endian(int addr, num, size, *data) addr Returned value: Description: Error: TRUE FALSE Address size *data Succeeded Error Number data entries Size data entry data
This function sets entries data data size "size" bytes from data[] into memory locations beginning with addr according endian ER_IN1_ADDR_OUTRANGE ER_IN1_DATA_RANGE ER_IN1_RUNNING Other Address range invalid. "size" Cannot because program executing. Emulator error
5.2.21. _mem_fill: Function name: Parameter: _mem_fill(int start, end, data, size) start Returned value: Description: Error: TRUE FALSE Start address data size Succeeded Error address Filled data Size data entry
This function fills memory area from "start" "end" with data data data size "size" bytes. ER_IN1_ADDR_OUTRANGE ER_IN1_DATA_RANGE ER_IN1_RUNNING Other Address range invalid. "size" Cannot filled because program executing. Emulator error
5.2.22. Function name: Parameter: _mem_move(int start, end, top) start Returned value: Description: Error: TRUE FALSE with top. ER_IN1_ADDR_OUTRANGE ER_IN1_RUNNING Address range invalid. Cannot tramsferd because program executing. Other 5.2.23. Function name: Parameter: None Returned value: Description: TRUE Return value always TRUE. This function clears cache buffer module that gets cached memory. _mem_clear_cache() Emulator error Start address Succeeded Error address Beginning address destination transfer
This function transfers data addresses from start area beginning
5.2.24. Function name: Parameter: Returned value: Description: _break_set(int addr) addr TRUE FALSE address Succeeded Error
This function sets software breakpoint "addr". This function also used re-enable breakpoint that been disabled _break_disable() _break_disable_all()
Error:
ER_IN1_ADDR_OUTRANGE ER_IN1_RUNNING ER_IN1_BP_FULL Other
Address range invalid. Cannot because program executing. Breakpoints full. Emulator error
5.2.25. Function name: Parameter: _break_get(int *addr, *attr, mode) *addr Address *attr mode Setup attribute Search start mode
IN1_FIRST First breakpoint IN1_NEXT Second following breakpoints Returned value: Description: TRUE FALSE Succeeded Error
This function stores breakpoint address *addr. breakpoint setup attributes shown below stored *attr. IN1_ENABLE_SBRK IN1_DISABLE_SBRK Enabled Disabled Cannot obtained because program executing. ER_IN1_BP_NOTFOUND Other breakpoint found. Emulator error
Error:
ER_IN1_RUNNING
5.2.26. Function name: Parameter: Returned value: Description: Error: _break_reset(int addr) addr TRUE FALSE Address Succeeded Error Address range invalid. Cannot cleard because program executing. ER_IN1_BP_NOTFOUND Other breakpoint found. Emulator error
This function clears breakpoint addr. ER_IN1_ADDR_OUTRANGE ER_IN1_RUNNING
5.2.27. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error Cannot cleard because program executing. Other 5.2.28. _break_disable: Function name: Parameter: Returned value: Description: Error: _break_disable(int addr) addr TRUE FALSE Address Succeeded Error Address range invalid. Cannot disabled because ER_IN1_BP_NOTFOUND Other 5.2.29. _break_disable_all: Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error Cannot disabled because program executing. Other 5.2.30. _break_enable_all: Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error Cannot enabled because program executing. Other Emulator error _break_enable_all() Emulator error _break_disable_all() breakpoint found. Emulator error program executing. Emulator error _break_reset_all()
This function clears breakpoints. ER_IN1_RUNNING
This function disables breakpoint addr. ER_IN1_ADDR_OUTRANGE ER_IN1_RUNNING
This function disables breakpoints set. ER_IN1_RUNNING
This function enables breakpoints set. ER_IN1_RUNNING
5.2.31. Function name: Parameter: Returned value: Description: _break_search(int addr, *attr) addr TRUE FALSE Address *attr Succeeded Error Setup attribute
This function gets setup attribute breakpoint addr. following breakpoint setup attributes stored *attr. IN1_ENABLE_SBRK IN1_DISABLE_SBRK Enabled Disabled Cannot obtained because program executing. ER_IN1_BP_NOTFOUND Other breakpoint found. Emulator error
Error:
ER_IN1_RUNNING
5.2.32. Function name: Parameter: None Returned value: Description: Error: TRUE FALSE Succeeded Error Cannot cleard because program executing. Other 5.2.33. Function name: Parameter: Returned value: Description: Error: _rram_get_area(int *addr) *addr TRUE FALSE Beginning address Succeeded Error Emulator error _rram_clear()
This function initializes access states monitor memory. ER_IN1_RUNNING
This function stores beginning address monitor memory *addr. Emulator error
5.2.34. Function name: Parameter: Returned value: Description: Error: _rram_set_area(int addr) addr TRUE FALSE Beginning address Succeeded Error Address range invalid. Cannot because program Other executing. Emulator error
This function sets beginning address monitor area addr. ER_IN1_ADDR_OUTRANGE ER_IN1_RUNNING
5.2.35. Function name: Parameter: Returned value: Description: _rram_get_size(int *size) *size TRUE size monitor area Return value always TRUE.
This function sets size monitor area *size.
5.2.36. Function name: Parameter: _rram_get_data(int addr, size, char *data, char *attr) addr char char Returned value: Description: TRUE FALSE Beginning address size *data *attr Succeeded Error Number bytes Data Access state
This function gets "size" bytes data (*data) beginning with addr access state (*attr) from monitor. access states shown below stored *attr. IN1_RRAM_READ IN1_RRAM_WRITE IN1_RRAM_NONE Read Write access Address range invalid. Emulator error
Error:
ER_IN1_ADDR_OUTRANGE Other
5.2.37. Function name: Parameter: Returned value: Description: _info_check_run(int *status) *status TRUE FALSE Execution state Succeeded Error
This function stores execution state target program *status. following execution status stored *status. IN1_RUN_CPU IN1_STOP_CPU Under execution Idle
Error:
Emulator error
5.2.38. Function name: Parameter: _info_service(int flag, *status) flag Service content *status TRUE FALSE Returned value: Description: TRUE Availability support Supported supported
Return value always TRUE.
This function gets information service contents supported PD79. flag, specify following service contents. IN1_SUPPORT_BITSYM IN1_SUPPORT_C IN1_SUPPORT_RAMMONITOR IN1_SUPPORT_RTT IN1_SUPPORT_CV IN1_SUPPORT_PROTCT IN1_SUPPORT_EVENT Support symbol Support C-language debugging Support real-time monitor function Support real-time trace Support coverage measurement Support protected break Support hardware event
5.2.39. Function name: Parameter: _info_cpu(int flag, *status) flag Content information *status information endian Little endian Value corresponding flag Returned value: Description: TRUE Return value always TRUE. This function gets information target CPU. "flag", specify following information. IN1_ADDRSIZE IN1_MAXADDR IN1_ADDRCOLM IN1_ENDIAN IN1_HWORD_SIZE IN1_WORD_SIZE IN1_DWORD_SIZE IN1_LWORD_SIZE IN1_MAXDATA IN1_MAXSTACK IN1_MAX_OBJ Number bytes required storing address value Maximum value address Number digits with which address values displayed hexadecimal Endian target Length bytes half-word Length bytes word Length bytes double-word Length bytes long-word Maximum value data Maximum value stack Maximum length bytes instruction IN1_BIG_ENDIAN Other
IN1_LITTLE_ENDIAN
5.2.40. Function name: Parameter: _info_get_map(int *start, *end, mode) *start Start address *end mode address Search start mode IN1_FIRST First IN1_NEXT Second following maps Returned value: Description: Error: TRUE FALSE Succeeded Error
This function gets information. start addresses mapped area stored *start *end, respectively. IN1_MAP_END more
5.2.41. Function name: Parameter: _info_check_map(int start, end, *status, *erradr) start Returned value: Description: TRUE FALSE Start address *status *erraddr Succeeded Error address Check result Error address
This function checks address range from "start" mapped area. address range from "start" "end" entirely mapped area, TRUE stored *status. address range from "start" "end" contains unmapped area, FALSE stored *status address first unmapped area found searching from start stored erraddr.
Error:
ER_IN1_ADDR_OUTRANGE Other
Address range invalid. Emulator error
5.2.42. _info_get_suffix: Function name: Parameter: char Returned value: Description: _info_get_suffix(char *suffix, mode) *suffix TRUE Obtained extension mode Mode Return value always TRUE.
This function gets file suffix that added file selection dialog when downloading target program mode specified "mode". mode, specify following attributes. IN1_LOAD IN1_SYM IN1_ROM Symbol program files Symbol file Program file
5.2.43. _info_set_suffix: Function name: Parameter: char Returned value: Description: _info_set_suffix(char *suffix, mode) *suffix TRUE Extension mode Mode Return value always TRUE.
This function sets file suffix that added file selection dialog when downloading target program mode specified "mode". "mode", specify following attributes. IN1_LOAD IN1_SYM IN1_ROM Symbol program files Symbol file Program file
5.2.44. Function name: Parameter:None Returned value: Description: TRUE FALSE Connected emulator PC4700H PC4701HS Connected emulator above. _info_ispc4700h()
This function gets information type emulator that connected emulation system. coverage measurement real-time trace functions only used with PC4700H PC4701HS. Therefore, when using functions that begin with _cv_ _rtt_, need check that connected emulator PC4700H PC4701HS.
5.2.45. Function name: Parameter: char Returned value: Description: Error: _scope_set_obj(char *name) *name TRUE FALSE Object file name Succeeded Error scope found that corresponds specified object file name. 5.2.46. Function name: Parameter: Returned value: Description: Error: _scope_set_addr(int addr) addr TRUE FALSE Address Succeeded Error Address range invalid.
This function sets current scope object file name. ER_SCOPE_NOTFOUND
This function sets current scope address. ER_IN1_ADDR_OUTRANGE
5.2.47. Function name: Parameter: _sym_add_sym(int mode, char *name, value) mode char Returned value: Description: TRUE FALSE Search mode *name value Succeeded Error Symbol Value
This function enters symbol label) "name" global symbol label). For"mode", specify following types. LOAD_SYMBOL LOAD_LABEL Symbol first Label first Character string contains character that cannot used symbol label. ER_LOAD_MULTIDEFINE global symbol label) same name already exists.
Error:
ER_LOAD_ILLEGAL_CHAR
5.2.48. Function name: Parameter: _sym_val2sym(int mode, value, char *symbol) mode char Returned value: Description: TRUE FALSE Search mode value *symbol Succeeded Corresponding symbol could found. Value Area which symbol stored
This function searches symbol character string that corresponds value "value" stores "symbol". "mode", specify priorities search shown below. LOAD_SYMBOL LOAD_LABEL Searched symbol first Local symbol (within scope) Global symbol Local label (within scope) Global label Local symbol (outside scope) Local label (outside scope) Symbol first Label first Searched label first Local label (within scope) Global label Local symbol (within scope) Global symbol Local label (outside scope) Local symbol (outside scope)
table below shows priorities search each mode.
5.2.49. Function name: Parameter: _sym_sym2val(int mode, char *symbol, *value) mode char Returned value: Description: TRUE FALSE Search mode *symbol *value Succeeded Symbol could found. Symbol Value
This function searches value that corresponds symbol character string "symbol" stores "*value". specified mode here same _sym_val2sym().
Error:
ER_LOAD_SYMBOL_NOTFOUND
Symbol cannot found.
5.2.50. _bit Function name: Parameter: char _sym_add_bit(char *bitsym, addr, bit) *bitsym Returned value: Description: Error: TRUE FALSE Symbol addr Succeeded Error Character string contains character that cannot used symbol. ER_LOAD_MULTIDEFINE global symbol same name already exists. ER_LOAD_ADDR_OUTRANGE ER_LOAD_BIT_OUTRANGE Address range invalid. number range invalid. 5.2.51. val2bit Function name: Parameter: _sym_val2bit(int addr, bit, char *bitsym) addr char Returned value: Description: TRUE FALSE Address *bitsym Succeeded Corresponding symbol could found. number Area which symbol stored Address number
This function enters symbol _bitsym_ global symbol. ER_LOAD_ILLEGAL_CHAR
This function searches symbol character string that corresponds _address_ _bit_ stores _*bitsym_.
5.2.52. bit2val: Function name: Parameter: char _sym_bit2val(char *bitsym, *addr, *bit) *bitsym Returned value: Description: Error: TRUE FALSE symbol *addr *bit Succeeded symbol could found. Address number
This function searches address number that corresponds symbol character string _bitsym_ stores _*addr_ _*bit_. ER_LOAD_SYMBOL_NOTFOUND symbol cannot found.
5.2.53. _line_addr2line: Function name: Parameter: _sym_addr2line(int addr, *line, char *filename) addr char Returned value: Description: Error: TRUE FALSE *line Succeeded Source line information cannot found. Address Line number *filename Area where file name stored
This function gets line number (*line) that corresponds address addr file name (filename). ER_LOAD_FILE_NOTFOUND File cannot found. Source information cannot found. ER_LOAD_SRCINF_NOTFOUND
5.2.54. _line_line2addr: Function name: Parameter: char _sym_line2addr(char *filename, line, *addr) *filename File name Returned value: Description: Error: TRUE FALSE (filename). ER_LOAD_LINE_NOTFOUND Line information cannot found. 5.2.55. Function name: Parameter: char _src_get_name(char *objname, char *srcname, mode) *objname Object file name char *srcname Area where source file name stored mode Search start mode LOAD_FIRST First source file name LOAD_NEXT Second following source file names Returned value: Description: TRUE FALSE Succeeded Source file name cannot found. line *addr Succeeded Source line information cannot found. Line number Address
This function gets address (*addr) that corresponds line (line) file
This function gets list source file names object file "objname". NULL specified object, list source file names object files obtained.
5.2.56. Function name: Parameter: char _obj_get_name(char *objname, mode) *objname Area where object file name
stored mode Search start mode LOAD_FIRST First source file name LOAD_NEXT Second following source file names Returned value: Description: TRUE FALSE Succeeded Object file name cannot found.
This function gets list object file names.
5.2.57. Function name: Parameter: _obj_addr2obj(int addr, char *objname) addr char Returned value: Description: TRUE FALSE Address *objname Area where object file name stored Succeeded Corresponding object file name cannot found.
This function gets object file name objname that contains address addr.
5.2.58. Function name: Parameter: char _func_get_name(char *objname, char *funcname, mode) *objname Object file name char *funcname Area where function name stored mode Search start mode LOAD_FIRST First function name LOAD_NEXT Second following function names Returned value: Description: TRUE FALSE Succeeded Function name cannot found.
This function gets list function names object file objname. NULL specified objname, FALSE returned.
5.2.59. Function name: Parameter: char _exp_eval(char *exp, radix, mode, *value) *exp Returned value: Description: TRUE FALSE Assembler expression radix mode *value Succeeded Error Radix Priorities which symbols (labels) evaluated Area where analysis result stored
This function evaluates assembler expression (exp) stores evaluation result *value. radix, specify radices constants shown below. EXP_DEC EXP_HEX EXP_DEFAULT EXP_SYMBOL EXP_LABEL Decimal Hexadecimal Value RADIX command used Symbol first Label first Syntax error Divide-by-0 error Left parenthesis missing Incorrect size specifier Character string terminated ER_EXP_LINE ER_EXP_VALUE ER_EXP_UNDEF_SYMBOL ER_EXP_PREFIX Incorrect line number specified Incorrect constant value specified Symbol defined Incorrect radix constant specified Constant value range ER_EXP_UNDEF_MACRO ER_EXP_ILLEGAL_MACRO ER_EXP_OUTOF_MACRO Macro constant defined Register name used macro variable name Limit number macro constants exceeded
"mode", specify priorities symbol (label) evaluation shown below.
Error:
ER_EXP_SYNTAX ER_EXP_ZERO ER_EXP_LPAR ER_EXP_SIZE ER_EXP_STRING
ER_EXP_OVER
5.2.60. Function name: Parameter: char Returned value: Description: Error: _com_send(char *data, size) *data TRUE FALSE Sequence bytes size Succeeded Error Number bytes transferred
This function transfers "size" bytes byte sequence specified data. Emulator error
5.2.61. Function name: Parameter: char Returned value: Description: Error _com_receive(char *data, size) *data TRUE FALSE Sequence bytes size Succeeded Error Number bytes received
This function receives "size" bytes data stores them data. size bytes data cannot received, FALSE returned. Emulator error
5.2.62. Function name: Parameter: None Returned value: Description: TRUE Return value always TRUE. This function turns output Script Window default, Script Window enabled output. 5.2.63. Function name: Parameter: None Returned value: Description: TRUE Return value always TRUE. This function turns output Script Window off. _scri_echo_off() _scri_echo_on()
5.2.64. Function name: Parameter: char _c_exp_eval(char *exp, *value1, *value2, char *type, char *str, char *misc) *exp char char char Returned value: Description: TRUE FALSE C-language expression *value1 *value2 *type *str *misc Succeeded Error Analysis result Analysis result Character string showing type analysis result Character string showing analysis result Character string showing added information analysis result
This function analyzes C-language expression specified current scope. analysis result 64-bit value, with low-order bits stored *value1 high-order bits stored *value2. type name analysis result stored "type" analysis result stored after being converted into character string. analysis result that indicates ordinary value such function, addition information stored misc. information stored "type", str, misc output display using printf() function same possible with script command "print".
Error:
ER_CEXP_NOT_FOUND ER_CEXP_SYNTAX_ERROR ER_CEXP_NO_SCOPE ER_CEXP_NO_SYMBOL ER_CEXP_NO_FUNC ER_CEXP_RIGHT_WRONG ER_CEXP_DEF_TYPE ER_CEXP_CANT_ASSIGN ER_CEXP_NO_TYPE ER_CEXP_CANT_FLOAT ER_CEXP_CANT_P_TO_P ER_CEXP_CANT_SUB_P ER_CEXP_CANT_P ER_CEXP_0_DIV ER_CEXP_UNKNOWN_OP ER_CEXP_BROKEN_TYPE ER_CEXP_LEFT_POINT
Symbol cannot found. Syntax error. Scope cannot found. Symbol cannot found. Function cannot found. Right-side expression inappropriate. Copying different type structure (union) inhibited. Cannot substituted. Type cannot found. Floating-point operation supported. Specified operation cannot performed between pointer types. Specified operation cannot performed pointer type. Subtraction pointer variable cannot performed. Divide-by-0 attempted. Invalid operator used. Type information broken. Left-side value must pointer variable.
ER_CEXP_LEFT_STRUCT ER_CEXP_NO_MEMBER
Left-side value must structure (union) type. Member cannot found. structure (union) type.
ER_CEXP_LEFT_STRUCT_REF Left-side value must refarence ER_CEXP_LEFT_WRONG ER_CEXP_VAL_NUM ER_CEXP_CANT_MIN ER_CEXP_CANT_REF ER_CEXP_LEFT_ARRAY ER_CEXP_RIGHT_NUM ER_CEXP_NOT_POINT ER_CEXP_CANT_CAST_REG ER_CEXP_CANT_CAST ER_CEXP_CAST_NOT_SUPPORT Left-side value inappropriate. Operand must numeric value. Specified operand cannot signinverted. Address value cannot obtained. Array variable inappropriate. Element numbers array inappropriate. Operand address. Cast operation variables supported. Specified type cast inappropriate. Cast operation specified type supported. 5.2.65. Function name: Parameter:char Returned value: Description: _get_shared_mem(char *name, char *value) *name char TRUE FALSE Name shared variable *value Succeeded Shared variable cannot found. Value shared variable
This function searches shared variable specified "name" stores value (character string) value. shared variable means variable that used common custom command custom window programs. name value shared variable character string used similar manner environment variables found several operation systems. name value shared variable used bytes.
5.2.66. shared variable Function name: Parameter:char Returned value: Description: _set_shared_mem(char *name, char *value) *name char TRUE Name shared variable *value Value shared variable Return value always TRUE.
This function sets shared variable specified "name" value specified "value". value shared variable that already been set, previously value changed value specified value. shared variable defined, variable area allocated.
5.2.67. Function name: Parameter:char Returned value: Description: _delete_shared_mem(char *name) *name TRUE Name shared variable Return value always TRUE.
This function deletes shared variable that specified "name". shared variable defined, nothing performed.
5.2.68. Function name: Parameter:int Returned value: _get_err_msg(int err_no, char *msg) err_no char TRUE FALSE Description: *msg Succeeded Error Error message statement corresponding error number cannot found. This function gets PD79's error message statement that corresponds error number specified err_no. 5.2.69. Function name: Parameter:None Returned value: Description: Elapsed time since Windows startup This function gets elapsed time since Windows started _get_tick_count() Error number Error message statement
5.2.70. Function name: _get_time(int *year, *month, *dayOfWeek, *day, *hour, *minute, *secont, *milliseconds) Parameter:int *year Returned value: Description: TRUE *month *dayOfWeek *day *hour *minute *second *milliseconds Location where current year stored Location where current month (112) stored Location where current week (e.g., Sunday stored Location where current (1-31) stored Location where current time hours (1-24) stored Location where current time minutes (0-59) stored Location where current time seconds (0-59) stored Location where current time milliseconds (0-999) stored Return value always TRUE. This function gets current date time system stores them locations specified each parameter. NULL specified parameter, information corresponding that parameter stored. 5.2.71. _disp_src_line Function name: disp_src_line(int lineno, char *filename, addr) Parameter: lineno Line number char *filename File name addr Address Returned value: TRUE Succeeded FALSE Error Description: This function updates contents displayed PD79's program window. selected line selected (specified lineno filename) displayed program window source mode. selected line selected source file cannot displayed, file displayed disassemble mode beginning with address specified "addr".
5.2.72. Function name: Parameter: Returned value: Description: Error: _rtt_get_range(int *s_cycle, *e_cycle) *s_cycle TRUE FALSE referenced. ER_IN2_NONE_RTT Referencible trace data cannot found. Other Emulator error Start cycle *e_cycle Succeeded Error cycle
This function gets range trace data from start cycles data that
5.2.73. disassembled analysis result data Function name: Parameter: _rtt_get_disasm(int *cycle, *next_cycle, char *buffer, *count) *cycle char *next_cycle *buffer Analysis start/analysis result cycle analysis result cycle(*cycle) Area where character string representing analysis result stored Returned value: Description: *count TRUE FALSE Succeeded Error Number instructions fetched (always
This function searches fetch cycle beginning with cycle specified *cycle and, when found, stores fetch cycle *cycle disassembles instruction before storing buffer. next cycle (*cycle stored *next_cycle.
Error:
ER_IN2_NONE_RTT ER_IN2_CYCLE_OUTRANGE Other
Referencible trace data cannot found. Specified cycle value range. Emulator error
5.2.74. Function name: Parameter: Returned value: Description: Error: _rtt_get_bus(int cycle, char *buffer) cycle char TRUE FALSE Cycle *buffer Succeeded Error Area where character string stored
This function converts trace data cycle specified cycle into character string display purpose stores result buffer. ER_IN2_NONE_RTT ER_IN2_CYCLE_OUTRANGE Other Referencible trace data cannot found. Specified cycle value range. Emulator error
5.2.75. Function name: Parameter: _rtt_check_isfetch(int cycle, *addr1, *addr2, *count) cycle Return value: Description: Error: TRUE FALSE Check cycle *addr1 *addr2 *count Succeeded Error Fetch address Fetch address 2(Not Used) Number instructions fetched
This function checks cycle specified cycle fetch cycle. fetch cycle, stored *count. fetch cycle, stored *count. ER_IN2_NONE_RTT ER_IN2_CYCLE_OUTRANGE Other Referencible trace data cannot found. Specified cycle value range. Emulator error
5.2.76. Function name: _rtt_get_data(int cycle, *addr, *data, *state, *ext, *dn, *ms, *us) Parameter: cycle Returned value: Description: TRUE FALSE Cycle *addr *data *state *ext Succeeded Error Value address Value data Value status signal Value external trigger signal Number bytes occupying queue buffer (always Hours Minutes Seconds Milliseconds Microseconds
This function gets data cycle specified cycle. value address that data stored *addr *data, respectively. status signals shown below stored *state. status, high-order
BHE*
BUS16*
DMAC
INTACK*
SYNC
status, low-order SYNC
(The asterisk above table denotes that signal active low.) external trigger input value stored *ext. time hours, minutes, seconds, milliseconds, microseconds since program execution started stored *ms, *us, respectively. Error: ER_IN2_NONE_RTT ER_IN2_CYCLE_OUTRANGE Other 5.2.77. Function name: Parameter: None Returned value: Description: TRUE Return value always TRUE. This function clears real-time trace (RTT) cache. _rtt_clear_cache() Referencible trace data cannot found. Specified cycle value range. Emulator error
5.2.78. Function name: Parameter:int _cv_get_data(int saddr, eaddr, *rsaddr, *readdr, char *data) saddr char Returned value: Description: TRUE FALSE Start address data obtained eaddr *rsaddr *readdr *data Succeeded Error address data obtained Start address data actually obtained address data actually obtained Coverage data obtained
This function stores coverage data that includes address range specified s_addr e_addr area specified "data". However, since data bytes addresses from each 8-byte alignment stored byte "data", happen that greater range data than addresses specified s_addr e_addr actually stored. example, addresses from specified, data addresses from actually stored. start addresses actually obtained data stored *rs_addr *re_addr, respectively. Note that values stored *rs_addr *re_addr obtained calculation using formula below. *rs_addr s_addr *re_addr e_addr "data", specify array greater than e_addr s_addr format coverage data stored byte "data" follows: (Upper row: offset; Lower row: address offset)
example, s_addr 0x400, coverage results addresses offset amount corresponding each stored "data[0]" shown below. (Upper row: offset; Lower row: Address)
Consequently, memory accessed every other byte beginning with s_addr, coverage data stored shown below. (Upper row: offset; Lower row: Coverage measurement result)
data stored data[0] 01010101B, i.e., 0x55. Error: ER_IN2_ADDR_OUTRANGE ER_IN2_RUNNING Specified address range. Cannot obtained because program executing. Other Emulator error
5.2.79. Function name: Parameter:int _cv_set_data(int s_addr, e_addr, char *data) s_addr char Returned value: Description: TRUE FALSE e_addr *data Succeeded Error start address address coverage data
This function sets coverage data stored area specified "data" range addresses specified s_addr e_addr. However, since coverage data stored byte "data" bytes addresses, specify values s_addr e_addr increments bytes. format "data" same _cv_get_data() function described above.
Error:
ER_IN2_ADDR_OUTRANGE ER_IN2_RUNNING Other
Specified address range. Cannot because program executing. Emulator error
5.2.80. Function name: Parameter:int Returned value: Description: _cv_get_base(int *base) *base TRUE Base address obtained Return value always TRUE.
This function stores base address coverage range *base.
5.2.81. Function name: Parameter:int Returned value: Description: _cv_set_base(int base) base TRUE FALSE base address Succeeded Error
This function sets base address coverage range specified "base" after clearing coverage data. base address specified increments range 0x00000 0xfffff. address value greater than 0xc0000 specified, rounded 0xc0000.
Error:
ER_IN2_RUNNING Other
Cannot because program executing. Emulator error
5.2.82. Function name: Parameter:None Returned value: Description: Error: TRUE FALSE Succeeded Error Cannot cleared because program executing. Other 5.2.83. Function name: Parameter: None Returned value: Description: TRUE Return value always TRUE. This function clears coverage cache. _cv_clear_cache() Emulator error _cv_clear_data()
This function clears coverage data. ER_IN2_RUNNING
5.2.84. Function name: Parameter:char Returned value: Description: _syscom(char *command) *command Character string PD79 script command TRUE FALSE Succeeded Error
This function executes character string specified "command" script command PD79. script command that dumps range addresses from 1000H 1FFFH, example, specify this function follows: _syscom("DumpByte 1000, 1FFF");
5.2.85. Function name: Parameter:char Returned value: Description: _doscom(char *command) *command Character string command TRUE FALSE Succeeded Error
This function executes character string specified "command" command. command that redirects output result file after specifying option command DOS, specify this function follows: _doscom("DIR TMP");
5.2.86. table below lists error numbers that stored global variable macro_err when system call function returns FALSE. Error number ER_IN2_MCU_RESET ER_IN2_ERROR_2 ER_IN2_ERROR_3 ER_IN2_ERROR_4 ER_IN2_ERROR_5 ER_IN2_ERROR_6 ER_IN2_ERROR_7 ER_IN2_ARG_ERROR ER_IN2_ERROR_9 ER_IN2_ERROR_A ER_IN2_ERROR_B ER_IN2_MCU_DISRESET ER_IN2_MCU_POF ER_IN2_ERROR_E ER_IN2_ERROR_F ER_IN2_ERROR_G ER_IN2_ERROR_H ER_IN2_ERROR_I ER_IN2_ERROR_J ER_IN2_MCU_CLKOFF ER_IN2_ERROR_L ER_IN2_ERROR_M ER_IN2_ERROR_N ER_IN2_MCU_NOSOURCE ER_IN2_MCU_RUN ER_IN2_ERROR_Q ER_IN2_ERROR_R ER_IN2_ERROR_S ER_IN2_ERROR_T ER_IN2_ERROR_U ER_IN2_ERROR_V ER_IN2_ERROR_W ER_IN2_ERROR_X ER_IN2_ERROR_Y Description Target reset. Checksum error found received data Specified data does exist. Target program executing. Target program idle. Measurement already been stopped. Measurement already being executed. Argument error. Measurement completed. trace data found specified cycle. Trace data nonexistent. Target cannot reset. power turned off. Time measurement counter overflowed. state cleared forcibly resetting. Number points exceeds valid range. break set. source line information loaded. Trigger mode soft output. Target clock turned off. Exception processing detected during single-stepping. Function range setting. Error writing EEPROM. Target power turned off. Target execution error. specified command code executable processor mode target system disagreements. specified bank isn't defined expansion memory bank duplicated specified area includes debugging monitor memory area specified area includes debugging monitor work area Flash deletion error occurred. Flash verify error occurred.
Specification area includes internal (flash) area.
5.3. System Call Functions Window Operation (winlib.lib)
winlib.lib provides window-operating functions that used custom window programs. prototype declaration each function written winlib.h. Function name _win_printf _win_puts _win_set_cursor _win_set_color _win_set_bkcolor _win_column2dot _draw_text_out _draw_set_color _draw_set_bkcolor _draw_set_bkmode _draw_set_font _draw_get_char_size _draw_line _draw_fill_rect _draw_frame_rect _draw_invert_rect _draw_arc _draw_pie _win_redraw _win_redraw_clear _win_redraw_item _win_show_window _win_set_window_title _win_enable_window _win_button_create _win_button_set_text _win_hscroll_range _win_hscroll_pos _win_vscroll_range _win_vscroll_pos _win_statusbar_create _win_statusbar_set_pane _win_statusbar_set_text _win_dialog _win_message_box _win_filedialog _win_set_window_pos _win_set_window_size _win_timer_set _win_timer_kill Description Output text with format included Output character string custom window cursor position text color background color Convert cursor coordinates into pixel coordinates Output character string custom window text color background color background mode font font size Draw line Fill rectangle Draw rectangle Reverse rectangle color Draw ellipse Draw sector Redraw custom window Redraw custom window Redraw control item Show/hide control item title custom window Enable/disable control item Create button Change button text scroll range horizontal scroll position horizontal scroll scroll range vertical scroll position vertical scroll Create status items status text status Create input dialog Create message Create file selection dialog position custom window size custom window system timer Reset system timer
5.3.1. _win_printf: Function name: Parameter:char Returned value: Description: _win_printf(char *format *forma Format Variable parameter Number characters output
This function outputs characters cursor position custom window after converting them under control "format" using text color specified _win_set_color() function background color specified _win_set_bkcolor() function. cursor position immediately following last character that output. cursor position desired place using _win_set_cursor() function. Note that only character font FIXED_SYS used.
5.3.2. Function name: Parameter: char Returned value: Description: _win_puts(char *str) *str TRUE Output character string Return value always TRUE.
This function outputs character string specified cursor position customer window using text color specified _win_set_color() function background color specified _win_set_bkcolor() function. cursor position immediately following last character that output. cursor position desired place using _win_set_cursor() function. Note that only character font FIXED_SYS used.
5.3.3. Function name: Parameter:int Returned value: Description: _win_set_cursor(int TRUE Specified column cursor Specified column cursor Return value always TRUE.
This function moves cursor position specified cursor position defined with origin upper left corner client area custom window, columns increasing from there right columns increasing from there bottom. character output column.
5.3.4. _win _win_set_color(int color) Parameter:int Returned value: Description: color Text color Previous text color
This function sets color specified "color" text. text color specified this function used when character string output using _win_printf() _win_puts() functions. "color", specify color constants listed below. Color constant COLOR_BLACK COLOR_BLUE COLOR_GREEN COLOR_CYAN COLOR_RED COLOR_MAGENDA COLOR_YELLOW COLOR_WHITE COLOR_GRAY COLOR_DKBLUE COLOR_DKGREEN COLOR_DKCYAN COLOR_DKRED COLOR_DKMAGENDA COLOR_DKYELLOW COLOR_LTGRAY Color Black Blue Green blue Purple Yellow White Gray Dark blue Dark green Dark blue Dark Dark purple Dark yellow Light gray
5.3.5. Function name: Parameter: Returned value: Description: _win_set_bkcolor(int color) color Background color text Previous background color
This function sets color specified "color" current background. text color specified this function used when character string output using _win_printf() _win_puts() functions. "color", specify color constants listed below. Color constant COLOR_BLACK COLOR_BLUE COLOR_GREEN COLOR_CYAN COLOR_RED COLOR_MAGENDA COLOR_YELLOW COLOR_WHITE COLOR_GRAY COLOR_DKBLUE COLOR_DKGREEN COLOR_DKCYAN COLOR_DKRED COLOR_DKMAGENDA COLOR_DKYELLOW COLOR_LTGRAY Color Black Blue Green blue Purple Yellow White Gray Dark blue Dark green Dark blue Dark Dark purple Dark yellow Light gray
5.3.6. Function name: Parameter:int _win_column2dot(int xcol, ycol, *xpix, *ypix) xcol Returned value: Description: TRUE column ycol *xpix *ypix column pixel coordinate column position pixel coordinate column position
Return value always TRUE.
This function converts cursor coordinates specified xcol ycol into pixel coordinates stores them *xpix *ypix.
5.3.7. Function name: Parameter:int _draw_text_out(int char *str) char Returned value: Description: TRUE Logical coordinate start point text *str Logical coordinate start point text Pointer character string drawn
Return value always TRUE.
Using currently selected font, this function writes character string specified position using text color specified _draw_set_color() function background color specified _draw_set_bkcolor() function.
5.3.8. Function name: Parameter:int Returned value: Description: _draw_set_color(int color) color Text color Previous text color
This function sets color specified "color" text. text color specified this function used when character string output using _draw_text_out() function. "color", specify color constants listed below. Color constant COLOR_BLACK COLOR_BLUE COLOR_GREEN COLOR_CYAN COLOR_RED COLOR_MAGENDA COLOR_YELLOW COLOR_WHITE COLOR_GRAY COLOR_DKBLUE COLOR_DKGREEN COLOR_DKCYAN COLOR_DKRED COLOR_DKMAGENDA COLOR_DKYELLOW COLOR_LTGRAY Color Black Blue Green blue Purple Yellow White Gray Dark blue Dark green Dark blue Dark Dark purple Dark yellow Light gray
5.3.9. Function name: Parameter: Returned value: Description: _draw_set_bkcolor(int color) color Background color text Previous background color
This function sets color specified "color" current background. background color specified this function used when character string output using _draw_text_out() function. "color", specify color constants listed below. Color constant COLOR_BLACK COLOR_BLUE COLOR_GREEN COLOR_CYAN COLOR_RED COLOR_MAGENDA COLOR_YELLOW COLOR_WHITE COLOR_GRAY COLOR_DKBLUE COLOR_DKGREEN COLOR_DKCYAN COLOR_DKRED COLOR_DKMAGENDA COLOR_DKYELLOW COLOR_LTGRAY Color Black Blue Green blue Purple Yellow White Gray Dark blue Dark green Dark blue Dark Dark purple Dark yellow Light gray
background mode "Fill" mode, system fills space between stylespecified lines, space between brushed hatch lines, background character cells with background color. 5.3.10. Function name: _draw_set_bkmode(int flag) Parameter:int Returned value: Description: flag TRUE mode Return value always TRUE.
This function sets background mode. Specify whether want area filled with background color before drawing text. TRUE specified flag, background filled with current background color (default). FALSE specified flag, background changed before drawing text.
5.3.11. Function name: Parameter:int Returned value: Description: _draw_set_font(int size, font) size TRUE Font size font Font constant Return value always TRUE.
This function specifies size style current drawing font. "font", specify some following font constants combined with Font constant FONT_FIXED_SYS FONT_MINTYO FONT_GOTHIC FONT_TIMESNEWROMAN FONT_CENTURY FONT_ARIAL FONT_BOLD FONT_ITALIC Font style "FixedSys" mincho" Gothic"" "Times Roman" "Century" "Arial" Bold Italic
5.3.12. Function name: Parameter:int _draw_get_char_size(int *pWidth, *pHeight) *pWidth Returned value: Description: TRUE being set. *pHeight Location where character width stored Location where character height stored Return value always TRUE. This function gets size font character currently
5.3.13. Function name: Parameter: _draw_line(int color) Returned value: Description: TRUE Starting coordinate line color Starting coordinate line Ending coordinate line coordinate line Color line
Return value always TRUE.
This function draws line with specified color between specified coordinate points. "color" specify color constants shown below. Color constant COLOR_BLACK COLOR_BLUE COLOR_GREEN COLOR_CYAN COLOR_RED COLOR_MAGENDA COLOR_YELLOW COLOR_WHITE COLOR_GRAY COLOR_DKBLUE COLOR_DKGREEN COLOR_DKCYAN COLOR_DKRED COLOR_DKMAGENDA COLOR_DKYELLOW COLOR_LTGRAY Color Black Blue Green blue Purple Yellow White Gray Dark blue Dark green Dark blue Dark Dark purple Dark yellow Light gray
5.3.14. Fill rectangle Function name: Parameter: _draw_fill_rect(int color) Returned value: Description: TRUE Upper left coordinate rectangle color Upper left coordinate rectangle Lower right coordinate rectangle Lower right coordinate rectangle Color with which fill
Return value always TRUE.
This function draws rectangle filled with specified color with upper left lower right corners specified coordinates. "color" specify color constants shown below. Color constant COLOR_BLACK COLOR_BLUE COLOR_GREEN COLOR_CYAN COLOR_RED COLOR_MAGENDA COLOR_YELLOW COLOR_WHITE COLOR_GRAY COLOR_DKBLUE COLOR_DKGREEN COLOR_DKCYAN COLOR_DKRED COLOR_DKMAGENDA COLOR_DKYELLOW COLOR_LTGRAY Color Black Blue Green blue Purple Yellow White Gray Dark blue Dark green Dark blue Dark Dark purple Dark yellow Light gray
5.3.15. Function name: Parameter: _draw_frame_rect(int color) Returned value: Description: TRUE Upper left coordinate rectangle color Upper left coordinate rectangle Lower right coordinate rectangle Lower right coordinate rectangle Color rectangle
Return value always TRUE.
This function draws lines form rectangle filled with specified color with upper left lower right corners specified coordinates. color specify color constants shown below. Color constant COLOR_BLACK COLOR_BLUE COLOR_GREEN COLOR_CYAN COLOR_RED COLOR_MAGENDA COLOR_YELLOW COLOR_WHITE COLOR_GRAY COLOR_DKBLUE COLOR_DKGREEN COLOR_DKCYAN COLOR_DKRED COLOR_DKMAGENDA COLOR_DKYELLOW COLOR_LTGRAY Color Black Blue Green blue Purple Yellow White Gray Dark blue Dark green Dark blue Dark Dark purple Dark yellow Light gray
5.3.16. Function name: Parameter: _draw_invert_rect(int Returned value: Description: TRUE Upper left coordinate rectangle Upper left coordinate rectangle Lower right coordinate rectangle Lower right coordinate rectangle
Return value always TRUE.
This function reverses color rectangle with upper left lower right corners specified coordinates.
5.3.17. Function name: Parameter:int _draw_arc(int color) Returned value: Description: TRUE FALSE Upper left coordinate boundary rectangle (logical unit) color Succeeded Error Upper left coordinate boundary rectangle (logical unit) Lower right coordinate boundary rectangle (logical unit) Lower right coordinate boundary rectangle (logical unit) coordinate starting point draw (logical unit) coordinate starting point draw (logical unit) coordinate ending point draw (logical unit) coordinate ending point draw (logical unit) Color
This function draws ellipse. Specify coordinates boundary rectangle (x1, (x2, starting point (x3, ending point (x4, arc. starting ending points need line arc. line that links specified starting point center boundary rectangle calculated starting point calculated from ending point calculated same way. "color" specify color constants shown below. Color constant COLOR_BLACK COLOR_BLUE COLOR_GREEN COLOR_CYAN COLOR_RED COLOR_MAGENDA COLOR_YELLOW COLOR_WHITE COLOR_GRAY COLOR_DKBLUE COLOR_DKGREEN COLOR_DKCYAN COLOR_DKRED COLOR_DKMAGENDA COLOR_DKYELLOW COLOR_LTGRAY Color Black Blue Green blue Purple Yellow White Gray Dark blue Dark green Dark blue Dark Dark purple Dark yellow Light gray
5.3.18. Function name: Parameter:int _draw_pie(int framecolor, paintcolor) Returned value: Description: TRUE FALSE Upper left coordinate boundary rectangle (logical unit) Upper left coordinate boundary rectangle (logical unit) Lower right coordinate boundary rectangle (logical unit) Lower right coordinate boundary rectangle (logical unit) coordinate starting point draw sector (logical unit) coordinate starting point draw sector (logical unit) coordinate ending point draw sector (logical unit) coordinate ending point draw sector (logical unit) framecolor Color framing line sector paintcolor Color with which fill sector Succeeded Error
This function draws sector. Define circumferential circle sector boundary rectangle ellipse (x1, (x2, y2). framecolor paintcolor, specify following color constants. Color constant COLOR_BLACK COLOR_BLUE COLOR_GREEN COLOR_CYAN COLOR_RED COLOR_MAGENDA COLOR_YELLOW COLOR_WHITE COLOR_GRAY COLOR_DKBLUE COLOR_DKGREEN COLOR_DKCYAN COLOR_DKRED COLOR_DKMAGENDA COLOR_DKYELLOW COLOR_LTGRAY Color Black Blue Green blue Purple Yellow White Gray Dark blue Dark green Dark blue Dark Dark purple Dark yellow Light gray
5.3.19. Function name: Parameter: None Returned value: Description: TRUE Return value always TRUE. This function redraws custom window without erasing display. _win_redraw()
5.3.20. Function name: Parameter: None Returned value: Description: TRUE Return value always TRUE. This function redraws custom window after erasing display. _win_redraw_clear()
5.3.21. Function name: Parameter:int Returned value: Description: _win_redraw_item(int handle) handle TRUE Handle control item Return value always TRUE.
This function redraws control item specified "handle" (e.g., button).
5.3.22. Function name: Parameter: Returned value: Description: _win_show_window(int handle, flag) handle TRUE Handle control item flag TRUE: Displayed FALSE: displayed Return value always TRUE.
This function specifies whether display control item specified "handle" (e.g., button). specified control item displayed when TRUE specified "flag" displayed when FALSE specified.
5.3.23. Function name: Parameter:char Returned value: Description: _win_set_window_title(char *title) *title TRUE window. 5.3.24. Enable/disable control item Function name: Parameter:int Returned value: Description: _win_enable_window(int handle, flag) handle TRUE Handle control item flag TRUE: Enabled FALSE: Disabled Return value always TRUE. Window title Return value always TRUE.
This function sets character string specified "title" title custom
This function specifies state control item specified "handle" (e.g., button). specified control item enabled when TRUE specified "flag" disabled when FALSE specified. When disabled, control item displayed gray.
5.3.25. Function name: Parameter: _win_button_create(int x1,int y1,int x2,int char *str,int char Returned value: Description: Upper left coordinate button *str Upper left coordinate button Lower right coordinate button Lower right coordinate button Button control text Button control
Handle button
This function creates button area specified that displays text specified surface. control specified "id" sent message handler argument OnCommand() handle function when button clicked.
5.3.26. Function name: Parameter:int Returned value: Description: _win_button_set_text(int handle. char *text) handle char TRUE FALSE Handle button *text Succeeded Error Button control text
This function changes text displayed button specified "handle" that specified text.
5.3.27. scroll range horizontal scroll Function name: Parameter:int _win_hscroll_range(int min, max) Returned value: Description: TRUE Minimum scroll position horizontal scroll Maximum scroll position horizontal scroll Return value always TRUE. This function specifies minimum maximum scroll positions horizontal scroll custom window. specified both max, horizontal scroll displayed. default, horizontal scroll hidden, with both parameters recommended scroll range 100. 5.3.28. position horizontal scroll Function name: Parameter:int Returned value: Description: _win_hscroll_pos(int pos) TRUE position horizontal scroll Return value always TRUE.
This function sets current position horizontal scroll custom window redraws scroll make position horizontal scroll box. position must within scroll range.
5.3.29. scroll range vertical scroll Function name: Parameter:int _win_vscroll_range(int min, max) Returned value: Description: TRUE Minimum scroll position vertical scroll Maximum scroll position vertical scroll Return value always TRUE. This function specifies minimum maximum scroll positions vertical scroll custom window. specified both "min" max, vertical scroll displayed. default, vertical scroll hidden, with both parameters recommended scroll range 100. 5.3.30. position vertical scroll Function name: Parameter:int Returned value: Description: _win_vscroll_pos(int pos) TRUE position vertical scroll Return value always TRUE.
This function sets current position vertical scroll custom window redraws scroll make position vertical scroll box. position must within scroll range.
5.3.31. Function name: Parameter:int Returned value: Description: _win_statusbar_create(int cnt) TRUE Number items status Return value always TRUE.
This function creates status bottom custom window. cnt, number items this status bar.
5.3.32. items status Function name: Parameter:int _win_statusbar_set_pane(int index, style, size) index Returned value: Description: TRUE Index number status item style size Style item Size item pixels)
Return value always TRUE.
This function sets style specified "style" size specified "size" item created status that specified "index". style, specify styles shown below. Style SBPS_NOBORDERS SBPS_POPOUT SBPS_DISABLED SBPS_NORMAL SBPS_STRETCH Description Does have boundary line round pane. boundary line displayed inverse video with text raised surface. Does draw text. Neither stretched inverted. Does have boundary line either. Stretches pane fill unused space. Only pane this style allowed status bar. This style combined with some other style using
5.3.33. Function name: Parameter:int Returned value: Description: _win_statusbar_set_text(tint index, char *text) index char TRUE Index number status item *text Text displayed status Return value always TRUE.
This function sets text displayed status item.
5.3.34. _win_dialog: Function name: Parameter:char _win_dialog(char *str, char *buf) *str char Returned value: Description: TRUE FALSE Character string message displayed *buf Location where obtained character string stored button pressed Cancel button pressed
This function opens input dialog gets line character string.
5.3.35. Function name: Parameter:char _win_message_box(char *str, char *title, style) *str char Returned value: Value IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES Description: Style MB_ABORTRETRYIGNORE MB_APPLMODAL MB_DEFBUTTON1 combined with Description Message contains three pushbuttons: [Stop], [Retry], [Ignore]. Operation PD79/CB79 stopped until message responded (default). First button default. first button always default unless MB_DEFBUTTON2 MB_DEBUTTON3 specified. MB_DEFBUTTON2 MB_DEFBUTTON3 MB_ICONEXCLAMATION MB_ICONHAND MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP MB_OK MB_OKCANCEL MB_RETRYCANCEL MB_SYSTEMMODAL Second button default. Third button default. Exclamation mark icon displayed message box. Same MB_ICONSTOP. Icon with lowercase circle displayed message box. Question mark icon displayed message box. [STOP] icon displayed message box. Message contains [OK] pushbutton. Message contains [OK] [Cancel] pushbuttons. Message contains [Retry] [Cancel] pushbuttons applications suspended until user responds message box. this message inform serious potentially dangerous errors (e.g., memory shortage) that require immediate corrective action. Message displayed *title style Title message Operation content message Meaning sufficient memory [Stop] button selected [Cancel] button selected [Ignore] button selected [No] button selected [OK] button selected [Retry] button selected [Yes] button selected
Execution result functions shown below
This function creates message box. style, specify following styles
Style(continued from preceding page) MB_YESNO MB_YESNOCANCEL
Description Message contains pushbuttons: [Yes] [No]. Message contains three pushbuttons: [Yes], [No], [Cancel].
5.3.36. _win_filedialog: Create file selection dialog Function name _win_filedialog(char *title, openFileDialog, char *defExt, char *defFileName, flags, char *filter, char *fileName) Parameter:char *title Title dialog openFileDialog Specification open save char *defExt Default file name extension char *defFileName Default file name flags Flag customize dialog char *filter Specify filter char *fileName Destination where acquired file name store Returned value: TRUE button pressed. FALSE Cancel button pressed. Description: This function creates file selection dialog gets selected file name. "title", specify title dialog box. openFileDialog, specify TRUE when building dialog "Open file" FALSE when building dialog "Save file after giving name." "defExt", specify file name extension want automatically added when file name input file name edit without adding extension. extension added specify NULL here. defFileName, specify file name that displayed first file name entering edit box. file name displayed specify NULL here. "flags", specify styles shown below combining them with Flag OFN_ALLOWMULTISELECT Description This flag specifies that multiple choices selected "File name" list box. (When create dialog using private template, LBS_EXTENDEDSEL value must specified definition "File name" list box.)
Flag OFN_CREATEPROMPT
OFN_FILEMUSTEXIST
OFN_HIDEREADONLY OFN_NOCHANGEDIR OFN_NONETWORKBUTTON OFN_NOREADONLYRETURN OFN_NOTESTFILECREATE
OFN_OVERWRITEPROMPT
Description This flag specifies that specified file cannot found, user asked confirm whether file need created dialog function. (This flag sets OFN_PATHMUSTEXIST OFN_FILEMUSTEXIST flags automatically.) This flag specifies that user only input existing file name "File name" entry field. invalid file name input "File name" entry field user when this flag set, dialog function displays warning message box. When this flag set, OFN_PATHMUSTEXIST also. This flag turns (hides) [Read-only] check box. This flag directs dialog reset current directory that selected when calling dialog box. This flag turns [Network] button disable from being used. This flag specifies that [Read-only] check returned file checked, that file placed write-protected directory. This flag specifies that file created before closing dialog box. This flag must application saves file network-shared point that "Created corrected." application sets this flag, library does longer check whether file writeprotected, disk capacity available, drive door open, whether network protected. Once file closed while this state, cannot reopened. Therefore, applications that this flag must handle files with caution. selected file already exists, this flag causes dialog "Saving file after giving name" generate message box. user must confirm whether file overwritten.
Flag OFN_PATHMUSTEXIST
OFN_READONLY
Description This flag specifies that user only input valid path. invalid path input "File name" entry field user when this flag set, dialog function displays warning message box. When creating dialog box, this flag ensures that [Read-only] check default checked. also indicates status [Read-only] check when dialog closed.
filter, specify pair character strings specify filters that identify file using format shown below. example below, filters (*.m;*.h) (*.*) specified. "Files(*.m;*.h)|*.m;*.h|All Files(*.*)|*.*||" Once filters specified, fil

Other recent searches


S1700 - S1700   S1700 Datasheet
S1750 - S1750   S1750 Datasheet
S1703 - S1703   S1703 Datasheet
S1700 - S1700   S1700 Datasheet
S1750 - S1750   S1750 Datasheet
S1703 - S1703   S1703 Datasheet
RLZ6 - RLZ6   RLZ6 Datasheet
ODD-5WBISOL - ODD-5WBISOL   ODD-5WBISOL Datasheet
MCH3144 - MCH3144   MCH3144 Datasheet
MCH3244 - MCH3244   MCH3244 Datasheet
3D7215 - 3D7215   3D7215 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive