Home
M16 R8C FoUSB/UART Debugger User Manual
Contents
1. CPU family Select the applicable CPU family In this case M16C has been selected for the R8C Family Toolchain When using a toolchain select the applicable toolchain name When not using a toolchain select None Project Types Window Select a project type The project type which supports the C start up has been selected as an example d Set the toolchain version New Project 1 5 Select Target CPU Toolchain version Toolchain version 54501 Which GPU do you want to use for this project GPU Series I there i no GPU group to be selected select the GPU Group that a similar to hardware specification or select Other Back Next Finish Cancel Select Toolchain Version CPU Series CPU Group and then press Next In this example the R8C M12A Group is selected e Selectthe MCU ROM size and other related settings New Project 2 5 Setting the Contents of Files to be Generated KIE What kind of initialization routine would you like to create ROM size Be Use Standard FO Library UART1 Use Heap Memory Heap Size oxao Generate mami Function Ic source file kuj Use OnChip Debuggime Emulator Hone Firmware Address Dx S ZE 0x Work RAN Address x J DIZE Ox Back Next gt Finish Cancel Select the MCU ROM size and heap size Select None for the on chip debugging emulator And
2. Standard Computers office equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of 1ts products semiconductor products have specific characteristics such as the occurrence of failure at a ce
3. Step In 5 TP Step Over F10 P Step Out Shift F11 Step Step Mode RAS cstartdef h initsct h mn resetpro h E sfi_182b h L typedefine h a Halt Program Initialize Es Connect q Disconnect Save Memory Verify Memory Download Modules G sample sample Debugisample x30 00000000 E 01 OT Al t 21 2t A Unload Modules Connected I Build A Debug A FindinFiles 1 A FindinFiles2 A Macro A Test A Version Control Ed E El E Default1 desktop Read write 11116 li INS NUM v To reset the user program select Reset CPU under the Debug menu Loj sample High performance Embedded Workshop sample c E lt File Edit View Project Build Me ZI Setup Tools Test Window Help 2 Os b g 8 do JJA A A a ZB Debus y Session16C_R8C_Foll IA alle os 22 OS 05 A A Aa xl Debug Sessions Debug Settings E G sample E E sample E a C source file El Go F5 Reset Go Shift F5 fvectorc E Free Go AS p heap c rd initsct c Elf Go To Cursor sample c intprg c Ipc Set PC To Cursor Fri May 30 2008 t J resetpro c Run RIPTION main program file wf sample c GROUP 22k a a Download modi ec Display PC Ctri Shift Y poke sample x30 B file is generated by Renesas Project Generator Ver 4 12 t E a Dependencies 9 Step In des TP step Ov
4. press Next f Set the stack New Project 3 5 5etting the Stack Area What are the stack settings User Stack Pointer Stack Size ox80 Interrupt Stack Pointer Stack Size ox8o Back Next gt Finish Cancel Set the Stack Size and press Next 10 g When the toolchain setting is complete the following screen is displayed New Project 4 5 Setting the Target System for Debugging El E MIBE ASE FoLISGBALIART IMIEL ASC Simulator External Debugger MI6C Family 00307 4 10 Release 1 Target type R8CATiny Back Nets Finish Cancel Select M16C R8C FOUSB UART and press Next If necessary select other targets h Set the configuration file name Configurations are the build option settings e g output of debug information or optimization having their own names The term configuration can also be referred to as build configuration New Project 5 6 5etting the Debugger Options Target name Configuration name Debug MIEL HOC Foll5B LIART Detall options Setting Modify Back Next gt Finish Cancel 11 i Verify the file names to be generated New Project G 6 Chanzing the File Names to be Created The followine source files will be generated Description tvpedefime h define scalar types resetpre Initialize for language resetpre include some headder files initsct Initialize each sections Initsct de
5. NOP when performing step execution JMP MAIN INT_3 NOP Address at which program execution should stop NOP NOP REIT e INT instruction To debug the program using the INT instruction set the software break for the INT instruction process and use the Go command Example NOP INT 3 Executed by the Go NOP command JMP MAIN INT 3 NOP NOP REIT Break 27 5 10 Limitations on Peripheral Functions UARTO is used for communication between the monitor program and the host computer Do not use UARTO in the user program Do not connect the pins below to other pins as they are used for communication with the host computer e R8C M11A Group P1_6 TRCIOB 9pin P1_4 TRJO TRCIOB 11pin e R8C M12A Group TP1_6 TRCIOB 14pin P1 4 TRJO TRCIOB 16pin 5 11 Limitations on Flag Register When using the user program to rewrite the flag register execute the FSET and FCLR instructions to prevent the debug flag D flag from being rewritten 5 12 Operation on Peripheral I O During a Break Although an interrupt cannot be accepted during a break peripheral I O continues operating For example when stopping a user program by a break during timer operation the timer continues counting but the timer interrupt cannot be accepted 5 13 Interrupts used by UART Debugger The BRK instruction interrupt address match interrupt single step interrupt and address break interrupt are used by UART Debugger Therefore ma
6. Clean Current Project yu firm c Clean AlI Projects ple c re j fvector c May 30 2008 E heap c Update ependerces h program file i I a i inksct c Stop Tool Execution Ctrl Break 2 intpra c reselprgoj Include Exclude Build erated by Renesas Project Generator Ver 4 12 L sample c Build Phases ERERERAERARA RAE RARA RARA ERA RARA RARE RARA RARA ARANA Build Configurations i E cstartdef be initsct h 2 B resetprg str 182b typedefine Linkage Order Generate Makefile 4 i BJ a E 8 a A lt sample c ol ot al at 2121 2 2 Connected Disconnected FEZ EX Ed EX Defaulti desktop Read write 16 16 1 ms NUM d Renesas M16C Standard Toolchain is displayed Select Defines from the Show Entries For pull down menu and then press Add Renesas M16C Standard Toolchain KIE Configuration E Assembly Link Librarian Lmg RTOS crade Category Source 11111 2 4 All Loaded Projects Show Entries For E E I C source file D Define a identifier H Assembly source file Add Remove Options L e finfo dir F CONFIGOIA ASCE 23 e Set defined macro is displayed Enter UART in the Macro field and press OK Sel defined macro Macro LAR To Replacement cancel f To set the link option in the Renesas M16C Standard Toolchain window clic
7. DIODE 100 Vss AVss Vec AVcc 22uF 2 2u4F 100 ve 141 GND EN IH O i i P1 4 TRCIOB Vcc D SUB9 CONNECTOR 5kQ PLSP0020JB A PRDPOO20AD A lo JUMPER O RS 232C l Vcc 5k Q Push 0 1 uF i L Figure 3 Circuit Using the RS 232C Cable with the R8C M12A Group 2 Preparing the M16C R8C FoUSB UART Debugger The M16C R8C FoUSB UART debugger hereinafter R8C UART debugger is used for debugging by connecting an RS 232C cable between the host computer and the target board A monitor program comes bundled and is automatically installed with the R8C UART debugger software For the R8C Family the monitor program is automatically programmed when starting the R8C UART debugger The monitor program does not need to be preprogrammed with an M16C FlashStarter or other flash programmer Note Before using the R8C UART debugger for the R8C Mx Series erase the user area using a serial writer such as Flash Development Toolkit in advance a To start the High performance Embedded Workshop go to Start Programs Renesas High performance Embedded Workshop and High performance Embedded Workshop You will see the following Welcome dialog box Welcome b Create a new project workspace Cancel Cork pace aaaaaaaa hus VJ Administration C Browse to another project workspace Create a new pro
8. West Mongkok Kowloon Hong Kong Tel 852 2886 9318 Fax 852 2886 9022 9044 Renesas Electronics Taiwan Co Ltd 7F No 363 Fu Shing North Road Taipei Taiwan Tel 886 2 8175 9600 Fax 886 2 8175 9670 Renesas Electronics Singapore Pte Ltd 1 harbourFront Avenue 06 10 keppel Bay Tower Singapore 098632 Tel 65 6213 0200 Fax 65 6278 8001 Renesas Electronics Malaysia Sdn Bhd Unit 906 Block B Menara Amcorp Amcorp Trade Centre No 18 Jin Persiaran Barat 46050 Petaling Jaya Selangor Darul Ehsan Malaysia Tel 60 3 7955 9390 Fax 60 3 7955 9510 Renesas Electronics Korea Co Ltd 11F Samik Lavied or Bldg 720 2 Yeoksam Dong Kangnam Ku Seoul 135 080 Korea Tel 82 2 558 3737 Fax 82 2 558 5141 http www renesas com O 2010 Renesas Electronics Corporation All rights reserved Colophon 1 0 M16C R8C UART Debugger User s Manual R20UT0540EJ0100 Previous Number REJ09B0567 0100 LENESAS Renesas Electronics Corporation
9. memory size chips such as R5F2M110A and R5F2M120A are not supported t Select the appropriate Port and Baud Rate from the pull down menus Press OK to download the monitor program Note When connecting the R8C UART debugger all data in the flash memory is erased Init M16C REC FoUSB UART MCU REFEMT 2240 ART MEL f Parallel f Se al LAN LPT Port COM Baud Rate 38400 Monitor Debug Start up for monitor debug LIE Cancel Help Do not show this dialog box again 17 u To download a user program select Download File X30 file in the Download Modules submenu under the Debug menu Loj sample High performance Embedded Workshop sample c Eii E II 3 File Edit View Project Build PPAS Setup Tools Test Window Help ax DsuB Ja s 3 a e Bi Debug Y SessionMIEC REC FoU At i om fe me 2 06D mlam malala lm xl Debug Sessions Debug Settings Elf Reset CPU El Go FS Reset Go Shift FS E Free Go sample E G sample E a C source file 3 fyector e 4 heap c AS wf initsct c El Go To Cursor sample c ko i intprg c Ip Set PC To Cursor Fri May 30 2008 ty 5 ON main program file haw S 2h dd a T em modu ec PC Ctrl Shift D sample x30 Pp is generated by Renesas Project Generator Ver 4 12 Fil 5 Dependencies
10. ones Sata aaa Sa 26 MV ARC CLG Ch HME 26 Real time Operation of User Program s s sssssscsssesscessusscessunsstntens 26 Executing Anomalistic Steps sus ea ak up Ka ea a aaa 27 Limitations on Peripheral Functions cansancio ies Essen aSo ubi 28 Limitations on Flag Regqister an ome akso reo dd ka konde ka ks al kio vd ada sak 28 Operation on Peripheral I O During a Break esesseessssennnsennnneennns 28 Interrupts used by UART Debugger esccssescesesscennssennnnsennassennnsos 28 1 Connecting the Target Board to the User System Host External Computer Power Sup 0 0 0 0 00 CORK 00000000A KOKOJ 0 0 0 0 0 0 0 0 0 0 0 0 o 0 0 0 0 0 0 0 Lo 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 di 0900009 03020909090 02090900 02090 RS 232C si Cable Target Board Figure 1 Connecting the Target Board to the User System Vcc Vcc LHA 0812 472K O 0 1 UF 1009 Vss AVss Vec AVcc 22uF 2 2uF 109 Vcc O 9 5kQ P1_6 TRJO 11 P1_4 TRCIOB Vcc D SUB9 CONNECTOR 5kQ PTSP0014JA B PRDP0014AC A lo JUMPER LO 5k Q Push 0 1 uF i L Figure 2 Circuit Using the RS 232C Cable with the RBC M11A Group Vcc Vcc LHA 0812 472K 0 1 UF
11. the source program to launch the program editor sample High performance Embedded Workshop File Edit View Project Build Debug Setup Tools Test Window Help ose jej sejo aj JAg h ax F ow y DefautSession y A We H E C source file i fvector c E heap c initsct c intprg c resetpro c ow E sample c Dependencies E cstartdef h ke initsct h resetpro h E sh r82b h ka typedefine h la jo g zi o1 ot l t 21 1 0 mi n When the program is complete under the Build menu select Build or Build All to build the program 3 sample High performance Embedded Workshop sample c 32 File Edit View Project JEM Debug Setup Tools Test Window Help asajsss Ctrl F7 F7 ka id AS juild A A G E C source fie ZN aclare Build Multiple ple c i heap c Clean Current Project May 30 2008 initset c Clean All Projects h program file Aj 1 i E intprg c Update All Dependencies a E resetpro c 7 sample c Stop Tool Execution Ctrl Break rated by Renesas Project Generator Ver 4 12 2 3 Dependen H cstartdef Include Exclude Build AS initsct h E resetpro Build Phases sft_182b J typedefine Build Configurations Linkage Order Generate Makefile ET OF QI sample c z 01 oral at 21 21 0 I H 14 o The result of the
12. C D me o lt Q 5 D EN O M16C R8C UART Debugger User s Manual Renesas Microcomputer Development Environment System R8C Family R8C Mx Series Notes on Connecting R8C M11A M12A Group All information contained in these materials including products and product specifications represents information on the product at the time of publication and is subject to change by Renesas Electronics Corp without notice Please review the latest information published by Renesas Electronics Corp through various means including the Renesas Technology Corp website http www renesas com Renesas Electronics www renesas com Rev 1 00 Feb 2011 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however 1s subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described 1n this document No license ex
13. Limitations of SFR Operations Table 3 lists the limitations of register operations Changing registers that are disabled will cause the monitor program to malfunction Table 3 Limitations on SFR Operations Register Default Value Limitation Change ISP Interrupt Stack Pointer area not used by the monitor wing totheD flag is ignored Partially j l Partially Processor Mode Register O Resetto 00h Single chip mode only ariere Rend Pi Protect Register Do not change this register Disabled Please setthe CPU dockto 1 MHz ee erie Reset to 03h Peasosethe CPU MHz Paty PHISEL Stop Control Register h Speed On Chip Oscillator Register 1 Ee On Chip Oscillator eee ree Port PA Direction Register PDA Port PA Register PA PAMCR 1 PMH1 Do not change this register UART 0 Bit Rate Register Register O Register 1 Register UART 0 Transmit Buffer Register UART 0 Receive Buffer Register Do not change this register Do not wie data to this register Do not read this register I UART 0 Re Mode Register 25 5 6 Limitations on Stop Mode or Wait Mode When using stop mode or wait mode start the R8C UART debugger in free run mode and close the RAM window C watch window and ASM window in advance Also do not operate the R8C UART debugger until the program stops at the break point by setting the break point after exiting stop mode or wait mode 5 7 Watchdog Timer The wat
14. alfunction or mishap Notes regarding these materials e These materials are intended as a reference to assist our customers in the selection of the Renesas Technology product best suited to the customer s application they do not convey any license under any intellectual property rights or any other rights belonging to Renesas Technology Corporation Renesas Solutions Corporation or a third party O Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage or infringement of any third party s rights originating in the use of any product data diagrams charts programs algorithms or circuit application examples contained in these materials O All information contained in these materials including product data diagrams charts programs and algorithms represents information on products at the time of publication of these materials and are subject to change by Renesas Technology Corporation and Renesas Solutions Corporation without notice due to product improvements or other reasons lt is therefore recommended that customers contact Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor for the latest product information before purchasing a product listed herein The information described here may contain technical inaccuracies or typographical errors Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility
15. anese export control restrictions they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved destination Any diversion or reexport contrary to the export control laws and regulations of Japan and or the country of destination is prohibited O Please contact Renesas Technology Corporation or Renesas Solutions Corporation for further details on these materials or the products contained therein oe A oe le 5 2 e 9 4 9 9 6 5 7 5 8 du 5 10 5 11 9 12 19 Table of Contents Connecting the Target Board to the User System eesescesssssses 5 Preparing the M16C R8C FOUSB UART Debugger eseeeeeeeneeennnnneeees T Memory Map When Using the R8C UART Debugger ssssscsesssssces 20 Monitor Program Occupied AVC sss sss snr soleedoj at 20 Notes on Using the R8C UART Debugger s sssssccsssssscssessssssnnsssess 21 Restarting the R8C UART Debugger After it is Done Debugging 21 User Program D C OdG ia epale 21 User Program Download ANC isi vance oo nJ mO E Rn nek Ak pu dIa kata e kula 21 Frequency K6 a sIgole 5 se TTTTTTTRTTRTTFTRTTFTTTRTTT y 25 Limitations of SFR Operations o ko A Ou ua 25 Limitations on Stop Mode OF Wait Mod o sunas rs sa Eo Saro io aos
16. ation included in this document but Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using 1t in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for Which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified 1n a Renesas Electronics data sheets or data books etc
17. build is displayed Loj sample High performance Embedded Workshop sample c 33 File Edit view Project Build Debug Setup Tools Test Window Help Dsuo a 9a 8 a LAS A Bos Jal sample ine S Source I F o sample a l AS 2 3 C source file 2 o i 5 fvectorc 3 Y FILE sample c heap c 4 DATE Fri May 30 2008 12 initsct c 5 DESCRIPTION main program file 2 intpra c 6 CPU GROUP 2A E resetpra c y ke sample c 8 Y This file is generated by Renesas Project Generator Ver 4 12 wf 33 Dependencies 9 ya t H cstartdef h 10 EAS pu initsct h 11 resetprg h 12 oid main void E sfi_182b h 13 typedefine h 14 15 16 af CI 1 LS Wi BI sample c ol ot al at 2212 E Phase M16C Load Module Converter finished Build Finished O Errors O Warnings p Connect with the target A host computer can easily be connected with the target by switching to the session file in which the setting to use the R8C UART debugger is pre registered Loj sample High performance Embedded Workshop sample c 32 File Edit View Project Build Debug Setup Tools Test Window Help x D B La a 8 do mn Bl I Mm la hed Debug y DefautSession z A ax Pe noo EGI sample Line S SessionM16C RSC FoUSB Se sample 1 EAS 2 H E C source file 2 5 3 fvector c 3 FILE sample c i heap
18. c 4 DATE Fri May 30 2008 ka initsct c 5 5 DESCRIPTION main program file intprg c 6 CPU GROUP 2A resetpro c 7 fF po E sample c 8 This file is generated by Renesas Project Generator Ver 4 12 wf 2 3 Dependencies 9 it tj i cstartdef h 10 ES i E initsct h 11 resetpra h 12 oid main void E sfi_182b h 13 typedefine h alis 15 16 SV a a E oD sample c Phase M16C Load Module Converter finished Build Finished O Errors O Warnings EE EX E EX Defaulti desktop Read write 11116 1 ms NUM 15 q The Init screen is displayed Select the Serial radio button and press Refer ence Init M16C RBC FoUSB UART MCU Debugging Information Run Mode Script MIU Refer C lA LPT mee Fort COM Baud Rate 30400 Monitor Debug Start up for monitor debug OF Cancel Help Cel Hee Do not show this dialog box again r Select R8C Tiny Series Select MCU File Look in McuFiles de SM16C 2D Group IMIGC Z6 Groop MES M16C 6N Group OIMIGC Z6A Group IIMISC ES Grupo OIMI6C 2B Group IMIGC EV Group OIMIGC 29 Group 9M16C 10 Series OIMIGC EZA Group _9M16C 24 Group O M16C 62P Group File name meu Files of type MCU Files meu Cancel 16 s Select one of the following MCU files depending on the group and memory size R8C M11A R8C M12A R5F2M112AUART MCU R5F2M122AUART MCU Note 2 Kbyte
19. chdog timer is refreshed while the monitor program is running When using the watchdog timer while running the user program note that by referring to or changing memory content the monitor program intervenes and the watchdog timer is refreshed 5 8 Real time Operation of User Program e Sampling run mode also known as sampling mode In sampling mode execution status of the user program will be regularly monitored when executing Go and Come Therefore it is possible to detect when the user program is stopped by a break or other command Select this mode when performing normal debugging e Free run Mode In free run mode execution status of the user program will not be monitored when executing Go and Come Although real time operation of the user program is secure it is not possible to detect if the user program is stopped by a break or other command Therefore even when the user program stops the R8C UART debugger does not stop executing Go and Come Press STOP to stop the R8C UART debugger Note In free run mode use the R8C UART debugger while the RAM window C watch window and ASM window are closed 26 5 9 Executing Anomalistic Steps e Software interrupt instruction Instructions that generate software interrupts undefined instruction BRK instruction and INT instruction cannot be continuously step executed in the instruction internal processing Example INT instruction NOP NOP INT 3 INT instruction is skipped over
20. dit View ta Build Debug Setup Tools Test Window Help Dea Set Current Project INA AZ a Insert Project le yl l 1 Dependent Projects E O DOE DI e Sm SPOMECor ourton H H EASE THETA AKA TAKA a KATA A AAA AK AAA ATKAK AH AKA KAKA AH AH AAKAAAAHAHAH AAR Create Project Type a Add Files sample c g Fri May 30 2008 IPTION main program file af File Extensions ROUP 2d A oo 757 M Components ile is generated by Renesas Project Generator Ver 4 12 Download modu 9 pe Dependencies 10 FERRERA ARA TATA ATTA AAA AT AAT ATTA E estartdef h 11 initsct h 12 oid main void E resetprg h 13 E sir r82b h 14 E typedefine h 15 16 xi Connected Disconnected Add file s to project FE Ex E E Defaulti desktop Read write 11 16 i Ins NUM 22 c To add the compile option select Renesas M16C Standard Toolchain under the Build menu oe sample High performance Embedded Workshop sample c 32 File Edit View Project JEM Debug Setup Tools Test Window Help D I ki i 8 y Renesas M16C Standard Toolchain ray pa 163 amp Ji po IFRI 10 8 2 Build Ele Ctrl F D bec sl I Build F7 Build All Build Multiple FEFKKAKAKKRKRKAKAKKKKRKRKAKKKKKKRKKKKKKEKKKRKKRKRKAKFFRK SE sample E A H E C source file
21. er F10 P Step Out Shift F11 Step Step Mode AS cstartdef h bow initsct h mn resetpro h E sfi_182b h L typedefine h in void qe Halt Program Initialize Es Connect q Disconnect Save Memory Verify Memory Download Modules Unload Modules 4 ol ot al at 2121 Connected 4 4 Build A Debug A FindinFiles1 A FindinFiles2 A Macro A Test A Version Control Reset CPU EL 22 ES 4 Defaulti desktop Read write 11116 li INS NUM 18 w The cursor moves to the top of the user program and debugging starts sample High performance Embedded Workshop resetprg c ax SE sample B amp E W sample 3 C source file lm Sour P S Source id Jal E fvector c oid start void heap c 32 extern void initsct void 2 initsct c 3a extern void init void 2 intprg c 34 oid exit void resetpra c 35 oid main void 2 sample c 36 2 3 Download modu 37 pragma section program interrupt sample x30 44 Dependencies 39 oid start void cstartdef h 40 04108 initsct h 41 041C8 gt E resetprg h 42 041CC prer 0x02 f change protect mode register sir r82b h 43 041DO pmo OxOO f set processor mode register typedefine h 44 041D3 prer 0x00 f f change protect mode register 45 041D6 figo o F value set flag register 46 if _ STACKSIZE 0 47 041Da spo stack top set user stack
22. fine the macro for initial tvector define the fixed vector tab intpre define the top address of t str rom Ja define the sfr register for stroma inc define the sfr register for heap E define the size of heap sample C mal program file cetartdef h define the size of stack j The figure below displays the files generated by the High performance Embedded Workshop based on the above settings Pressing OK launches High performance Embedded Workshop Summary Project Summary PROJECT GENERATOR FA PROJECT NAME sample A PROJECT DIRECTORY LA Mork5 pace samples sample CPU SERIES RCT iny CPU GROUF ZA TOOLCHAIN MAME Renesas MIBC Standard Toolch TOOLCHAIN VERSION 5 44 00 GENERATION FILES LxAMM orkkpacezampleszamplestupedefine h define scalar types LWWiork Space sample sample resetprg c Initialize for E language LWWiork Space sample sample resetprg h include some headder files Co Woork Space sample sample vnitsct c Initialize each sections CsAMorkkpace sampleszample nitect h define the macro for initialization of sections 4 iili Click OF to generate the project or Cancel to abort MW Generate Aeadme tst as a summary file in the project director Cancel 12 k Check the section address Under the Build menu select Renesas M16C Standard Toolchain BEE sample High performance Embedded Workshop File Edit View Project EMEN Debug Setup T
23. for any damage liability or other loss rising from these inaccuracies or errors Please also pay attention to information published by Renesas Technology Corporation and Renesas Solutions Corporation by various means including the Renesas home page http www renesas com e When using any or all of the information contained in these materials including product data diagrams charts programs and algorithms please be sure to evaluate all information as a total system before making a final decision on the applicability of the information and products Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage liability or other loss resulting from the information contained herein O Renesas Technology semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake Please contact Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor when considering the use of a product contained herein for any specific purposes such as apparatus or systems for transportation vehicular medical aerospace nuclear or undersea repeater use O The prior written approval of Renesas Technology Corporation and Renesas Solutions Corporation is necessary to reprint or reproduce in whole or in part these materials O f these products or technologies are subject to the Jap
24. ject work space Select this when creating a new workspace Open a recent project workspace Select this when using an existing workspace Previous workspaces are displayed in the pull down menu Browse to another project workspace Select this when using an existing workspace and there are no previous workspaces listed in the pull down menu After selecting an existing workspace and pressing OK the screen shown in letter t Page 21 is displayed b Select Create a new project workspace and press OK Welcome DE Cancel 5 Open a recent project workspace LAMfork5pacelaaaakaaaa hws Administration e Browse to another project workspace c The Project Generator starts When a toolchain is preinstalled the following screen is displayed New Project Workspace Projects workspace Mame Project Types sample EC source startup Application Project Name Empty Application ie sample ap Library Directory Pe Debugger only M16C FoLISB CAWorkSpace sample Eu 2 Debugger only MIEC Simulat CPU family M160 Tool chain Renesas M16C Standard Properties Workspace Name Enter a name to create a new workspace sample has been input as an example Project Name Enter a project name If the project name is to be the same as the workspace name it is not necessary to input anything in the Project Name field
25. k on the Link tab and select Section Order from the Category pull down menu Add the following to the start address of the monitor program occupied area shown in Table 1 Memory size 48KB FirmArea_NE Memory size 64KB 96KB 128KB FirmArea_FE Renesas M16C Standard Toolchain Configuration E Assembly Link Librarian Lmc RTOS ce 4 gt Category Section Order aj All Loaded Projects Edit sample Edit Ox00000400 ial C source file bes SE H E Assembly source file data 5U bss 50 data ME bss ME data MU bss NO stack lzback 0x00004000 Options Link L nc3 lib G MS 0 EICONFIGOIANEPROJECTHA ME 30 OARDER data SE 0400 bss 5E data 50 bss 50 data NE bss ME dat a NO bes NO stack stack heap NE rom NE 04000 1rom_ MO data 5El data SOI data NE data MOUI switch table programi When the above settings cause the user program to overlap with the monitor program occupied area an error is output 24 5 4 Frequency Characteristics The monitor program only operates at 38600bps The monitor program operates in developer tool dedicated high speed on chip oscillator However note that operation may not be possible when dividing the main clock and using it with less than 1 MHz even in the range of the above frequency Do not use the low speed on chip oscillator clock as the system clock Note Communication may not be possible depending on temperature and voltage 5 5
26. ke sure the user program does not use any of these interrupts 28 M16C R8C UART Debbuer User s Manual R8C Family R8C 3x Series R8C Lx Series Notes on Connecting R8C 3xC Group R8C 3xD Group R8C LxC Group Publication Date Rev 1 00 Feb 01 2011 Published by Renesas Electronics Corporation LENESAS SALES OFFICES Renesas Electronics Corporation Refer to http www renesas com for the latest and detailed information Renesas Electronics America Inc 2880 Scott Boulevard Santa Clara CA 95050 2554 U S A Tel 1 408 588 6000 Fax 1 408 588 6130 Renesas Electronics Canada Limited 1101 Nicholson Road Newmarket Ontario L3Y 9C3 Canada Tel 1 905 898 5441 Fax 1 905 898 3220 Renesas Electronics Europe Limited Dukes Meadow Millboard Road Bourne End Buckinghamshire SL8 5FH U K Tel 44 1628 585 100 Fax 44 1628 585 900 Renesas Electronics Europe GmbH Arcadiastrasse 10 40472 D sseldorf Germany Tel 49 211 65030 Fax 49 211 6503 1327 Renesas Electronics China Co Ltd 7th Floor Quantum Plaza No 27 ZhiChunLu Haidian District Beijing 100083 P R China Tel 86 10 8235 1155 Fax 86 10 8235 7679 Renesas Electronics Shanghai Co Ltd Unit 204 205 AZIA Center No 1233 Lujiazui Ring Rd Pudong District Shanghai 200120 China Tel 86 21 5877 1818 Fax 86 21 6887 7858 7898 Renesas Electronics Hong Kong Limited Unit 1601 1613 16 F Tower 2 Grand Century Place 193 Prince Edward Road
27. n this document or Renesas Electronics products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics Active X Microsoft MS DOS Visual Basic Visual C Windows and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries IBM and AT are registered trademarks of International Business Machines Corporation Intel and Pentium are registered trademarks of Intel Corporation Adobe and Acrobat are registered trademarks of Adobe Systems Incorporated All other brand and product names are trademarks registered trademarks or service marks of their respective holders Keep safety first in your circuit designs O Renesas Technology Corporation and Renesas Solutions Corporation put the maximum effort into making semiconductor products better and more reliable but there is always the possibility that trouble may occur with them Trouble with semiconductors may lead to personal injury fire or property damage Remember to give due consideration to safety when making your circuit designs with appropriate measures such as i placement of substitutive auxiliary circuits ii use of nonflammable material or iii prevention against any m
28. ools Test Window Help O gt La a Renesas M16C Standard Toolchain ES Build File E AS sample had 3 ar Build AI source E fvect Build Multiple E heap Clean Current Project 7 Ctrl Break 2 3 Depende i Include Exclude Build Build Phases Build Configurations Linkage Order Generate Makefile o ot at at 2121 0 mm Version Control FE E E E Defaulti desktop RN EN EIN MEIN ee Ge Il Renesas M16C Standard Toolchain is displayed Click on the Link tab and select Section Order from the Category pull down menu Make sure the section start address does not overlap with the monitor program occupied area shown in Table 1 lf there is any overlap edit the address value Renesas MI6C Standard Toolchain Configuration E Assembly Link Librarian Lmc RTOS crade Debug Category Section Order aj All Loaded Projecte A Er sample OwDODOOAOO C source file Hee SE Assembly source file data 50 bss 50 data ME bss ME data MU bss NO stack lzback heap ME Ox00004000 rom MU data GEI Options Link L nc3 lib G MS 0 BICONFIGDIRIMHIPROJECTMAME 30 OARDER data SE UM0U bss 5E data SU bss 50 data ME bss ME dat a NU bes MU stack tetack heap ME rom_NE 04000 rom_NO data SEl data SUl data MEI data NOIswitch table programi e 13 m Double click
29. pointer 45 fendif 49 041DE _sb_ 0x400 400H fixation Do not change 50 041E2 intbh 0x00 set variable vector s address 51 041E6 asmi ldc fitopof vector SOFFFFh INTBL it 4 e a a ie sample c lt gt resetprg c Connected Ready Ea 2 ES E Defaulti desktop Read write 41 73 l INS NUM 19 3 Memory Map When Using the R8C UART Debugger Figure 4 shows a memory map 8 KB 00000h OFFD8h Reserved 002FFh i Undefined instruction 00400h SALES at E User RAM ada dd r BRK Instruction OOSFFh Address Match Single Step Watchdog Timer Reserved User Program Reserved Vector Area OEOOOh Reset OFFFFh Note are occupied areas for the monitor program Figure 4 Memory Map 8 KB 4 Monitor Program Occupied Area Table 1 Monitor Program Occupied Area ROM RAM Occupied Area for Monitor Program 4KB 384Bytes RAM 400h to 4FFh Vector FFE4h to FFEFh FFF4h to FFF7h 8KB 512 Bytes RAM 400h to 4FFh Vector FFE4h to FFEFh FFF4h to FFF7h 20 5 Notes on Using the R8C UART Debugger 5 1 Restarting the R8C UART Debugger After itis Done Debugging When restarting the R8C UART debugger turn off the power to the target and turn on the power again When starting the R8C UART debugger again please follow the procedure below to connect 1 After disconnecting HEW with the target please turn the power off 2 After turning the power of the
30. press implied or otherwise is granted hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information 1n the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or Information When exporting the products or technology described 1n this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale 1s prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care 1n preparing the inform
31. rtain rate and malfunctions under certain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office 1f you have any questions regarding the information contained i
32. target off again and erasing the user program area using a serial writer such as flash Development Toolkit turn the power of the target off 3 Please turn the power of the target on and start the R8C UART debugger again 5 2 User Program ID Code When using the R8C UART debugger all flash memory areas are erased Set the ID code of the user program to all FFh when using the R8C UART debugger Table 2 ID Code Storing Address IDNo Vector Table Address OFFE7htoOFFE4n BRKinstruction OFFEFh to OFFECh Single step OFFF3h to OFFFOh ID5 Watchdog timer oscillation stop detection voltage monitor 2 OFFF7h to OFFF4h IDE Reserved _ _________ OFFFBh to OFFF8h OFFFFhto OFFFCh See Note Note Refer to the hardware manual for the value set to address OFFFFh 5 3 User Program Download Area Please note that when the area in the user program overlaps with the area in the monitor program the R8C UART debugger does not perform error output When error output is performed please set the following a Make firm c and enter the following include typedefine h ifdef UART __ pragma section bss FirmArea _far UBYTE _firmarea 0xA00 endif 21 b Add the file created above to the project Under the Project menu select Add Files When the file selection screen is displayed select firm c Loj sample High performance Embedded Workshop sample c lt gt File E
Download Pdf Manuals
Related Search
Related Contents
GXP User Manual - Cheap IP Phones User`s Manual - Howen International Wheel Loss - A Risk No One Can Run! Zeiss Ikon Ikonette Operating Instructions Manual Protección de Cheques Panduit N52SPH rack accessory Nokia N 97 Manual - Auxilab Copyright © All rights reserved.
Failed to retrieve file