Home
M16 R8C FoUSB/UART Debugger User Manual
Contents
1. 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 26 5 7 Watchdog timer The watchdog 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 a normal debug 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
2. 2 022 WA DIODE 40 11 vss AVss VeciAVec 13 75 22w 22wF mE ANV Vss AVss veciAvec S 10 vrer 7 TOT 9 ej far FORCEON Vcc 5V INV DIODE Vec Q 0 22uF one EN i O 46 5k P6_7 RxD1 45 P6 6 TxD1 Vcc D SUB9 Q CONNECTOR 5k LT o JUMPER 101 RS 232C j Straight PLQPOO80KB A IBM PC AT Vcc 20MHz IT 12 XIN P4 6 5k 10 XOUT P4 7 Push e d J Figure 3 Circuit Using the RS 232C Cable R8C 2C 2D Groups 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 232 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 a To start the High performance Embedded Workshop HEW go to Start Programs Renesas High performance Embedded Workshop and High performance Embedded Workshop You will see the following Welcome dialog box Welcome P t Create a new project workspace Cancel Administration e Create a new project work space Select this when creating a new workspace e Open a recent projec
3. 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 e 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 e All information contained in these materials including product data diagrams charts programs and algorithms represents information on products at the time of publication of these materials and are subject to change by Renesas Technology Corporation and Renesas Solutions Corporation without notice due to product improvements or other reasons It is therefore recommended that customers contact Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor for the latest product information before purchasing a product listed herein The information described here may contain technical inaccuracies or typographical errors Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage liability or other loss rising from th
4. C watch window and ASM window are closed 2 5 9 Executing anomalistic steps e Software interrupt instruction The step execution cannot be performed continuously to the instruction internal process of the instructions undefined instruction overflow BRK instruction and INT instruction which generate the software interrupts Example INT instruction NOP NOP INT 3 INT instruction is skipped over NOP when performing step execution JMP MAIN INT 3 NOP lt _ 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 28 5 10 Limitations on peripheral functions UART1 is used for communication between the monitor program and the host computer Do not use UART1 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 2A 2B Groups TxD1 37 pin RxD1 38 pin e R8C 2C 2D Groups TxD1 45 pin RxD1 46 pin 5 11 Limitations on flag register When operating the flag register on the user program execute the FSET instruction and FCLR instruction not to change the debug flag D flag 5 12 Operation on peripheral I O during a break Although an interrupt cannot be accepted during a b
5. Insert Project ORCKCKCHCKCCNCh ACA a KC TAA KAKA ATA WCh Ch Ch ACA Ch KCh A Ch ACA ChCh Ch CK Ch KCh TATA Ch A A A AAR Create Project Type Add Files sample c t7 Fri May 30 2008 R Files Z sa ri i IPTION main program file t7 File Extensions ROUP 2 Components file is generated by Renesas Project Generator Ver 4 12 Download modu 9 P NF E 10 F EEEEXEEEELLLILLLLILLLLLLLLLLLILLLLLILZLLLLILLLLLLEZLZLILILLLLALLLLLLLLLLLLLLLLLLEAM cstartdef h 11 initscth ale void main void E resetprg h 13 E sfr r82b h 14 typedefine h 15 16 4 n a la a gt sample c Connected Disconnected Build A Debug A Find in Files 1 Find in Files 2 Macro Test Version Control Add file s to project Ff E2 FZ FA Default desktop Read write 1 16 1 INS NUM 22 c To add the compile option select Renesas M16C Standard Toolchain Build menu e sample High performance Embedded Workshop sample c vi File Edit View Project SMCA Debug Setup Tools Test Window Help Deua LIE ca la oe B8 x x pb SessionM16C_R8C_FoU A ig gt 1 B8 la A um sample c dm e 15 10 8 2 Build File Ctrl F Q Lc x I Build F7 ou eS sample Build 4 EI Build Multiple Wd GR A b Ch CR AAA AAA KARA AAA AAA AAA AAA RAAT AAA ARATE A TS C
6. msc y O 4800 9600 19200 88400 NO cS je NO N je X X O O 0 x X O O O EX X O O O p Xx p OX qp O d O f O X O O O O L X O O O O XxX O O O O Q LO O O O O O0 O O O X Log a a X X O Communication available X Communication not available Note Communication may not be possible depending on temperature and voltage If communication is not possible lower the communication speed 25 5 5 Limitations of SFR operations Table 4 lists the limitations of register operations Changing registers that are disabled will cause the monitor program to malfunction Table 4 Limitations on SFR Operation Default n ug NETS Limitation Change m Processor Mode Register 1 System Clock Control Register 1 Resetto 28h Set bits CM13 and CM1510 1 Partially Set the CM14 bit to 0 es On Chip Oscillator Control Register R Setthe FRAO0bit fo 1 Partially a s emen fi High Speed On Chip Oscillator Control Enabled Register 2 Perg set the D flag to 1 is UART 1 TransmitReoeive Mode Register UART 1 Bit Rate Register pee UART 1 Transmit Aeceive Control Register O Do not change this register UART 1 Funcion Selecion Register john _UART 1 Transmit Bufer Register _ Donotwitedatatothisregiste Disabled UART 1 Receive Bufer Register Donotreadthis register Disabled
7. MCU RsFz12ABUART MCU RsFz12D8LART MCU R5F21144 MCU EEE RSF212DCUART MCU RSF21144UART MCU R5F212B68UART MCU R5F21104 MCU R5F21154 MCU RsFzi BCUART MCU RSF21114 MCU RSFZ1154UART MCU lt nT File name R5F21 AS CUAART MCU Files of type MCU Files meu L ancel t Select the appropriate Port and Baud Rate from the pull down menus Press OK and a monitor program is downloaded Init M16C RBC FoUSB UART MCU RSFZTZACLIART MELI Parallel f Serial E LAN Sp USB Fort COM Baud Rate 38400 Monitor Debug Start up for monitor debug LIF Cancel Help Do not show this dialog box again 16 u To download a user program select Download File X30 file in the Download Modules submenu under the Debug menu e sample High performance Embedded Workshop sample c PEIES vi File Edit View Project Build AStA Setup Tools Test Window Help a x Dg amp X Ba Debug Sessions Zar E R EN x Debug 7 Sessionwt amp C REC FoU 7 A Y OW ewe g wd mese Poo wm mmm mm nf xd Ef Reset CPU 43 sample amp sample l Go FS g C source file EI Reset Go us ES SSSSSSSs B fyector c F Free Go WUNCRCRCKCHCCA AKT ChCh Ch Ch A CHOR ACA C AAA ACA ACA Ch A Ch C RR A Oh h A 8 8
8. RR nm E heap c sy Y initsct c Elf Go To Cursor sample c j intpra c Ip Set PC To Cursor Fri May 30 2008 ty Y resetprg c Run ON main program file SERES va 2A em Y Download modu ec Display PC Ctrl Shift sample x30 H Step In Fil is generated by Renesas Project Generator Ver 4 12 Dependencies Pa E cstartdef h P step Over Fio GAR A OR A CR OR RO A E A A A E A E A A E A E A E A EN initsct h Step Out Shift F11 Been m i sfr 182b b 8 typedefine h sep Mode STOR Halt Program Initialize sa Connect M Disconnect Save Memory i Verity Memory Download Modules gt C WorkSpace sample sample Debugisample x30 00000000 r O OT Al AT 21 21 cg Unload Modules All Download Modules Build A Debug A Find in Files 1 Find in Files 2 Macro Test Version Control FEZ E2 EZ E Default desktop Read wie l6 1 NS NM v To reset the user program select Reset CPU under the Debug menu e sample High performance Embedded Workshop sample c PEIES vi File Edit View Project Build PASA Setup Tools Test Window Help x D k 6 4 Debus sessions JAg A IE amp E Ed amp Debug sessonwtec REC rou At 4 pre Da g m obses OD DA WEBS a E sample sample El Go FS g C source file EI Reset Go mis EE
9. a A Ch CA A Ch A A Ch A Ch a ACA CA Ch ACA Ch RR A UN S COR A initsct h resetprg h Build Phases T sfr r82b h 5 i typedefine Build Configurations Linkage Order Generate Makefile Q i gt sample c Version Control Build the active project and all dependent projects regardless of whether the project files are c Ft E2 3 ES Default1 desktop Read write 4 16 n INS NUM 13 o The result of the build is displayed e sample High performance Embedded Workshop sample c PE EI vi File Edit view Project Build Debug Setup Tools Test Window Help zd x x IT gt ty Bu a 3j DX Debug DetautSession A DEDI ax da ell sample ag E eS sample Jd WORCRCKCCACHCRCACHCRCK CHO ACACACACRCA CHO NCACR TAKA AAA NChCh BCACACACRCAChC B CACA TEA Ch Ch BC CA KC RC A A A A AO A S S NS S AN A E C source file 2 fvector c 3 FILE sample c heap c 4 DATE Fri May 30 2008 3 initsct c 5 DESCRIPTION main program file i intpra c 6 CPU GROUP 2 i resetprg c y Em ERES 8 This file is generated by Renesas Project Generator Ver 4 12 Dependencies 9 cstartdef h 10 PREFS HON CR CNCR AAA AKT Ch OW Ch WC AAA Ch KCh NC KC TATA Ch CK Ch A Ch AAA A AAA A Ch A Ch AAA Ch RR KC 8 8 HA
10. h 11 resetpra h qui oid main void sfr 182b h 13 E typedefine h 14 T5 H 16 4 lll Giga Im sample c H ol ot a at 8181 2 e Phase M16C Load Module Converter finished Build Finished O Errors O Warnings u gt Build Debug A Find in Files 1 Find in Files2 Macro A Test Version Control Ready fF F2 E7 E3 Defaulti desktop Read write 4 16 1 INS NUM 14 q The Init screen is displayed Select the Serial radio button and press Refer ence Init M16C RBC FoUSB UART MCU Debugging Information Run Made Script MCU Refer C LAM D Lp USB Fort COM Baud Hate 38400 Monitor Debug Start up for monitor debug Cancel Help Do not show this dialog box again r Select R8C Tiny Series Select MCU File Look in C3 McuFiles eE Mi6c 20 Group jM1i amp C 26 Group lets e JM16C 6N Group O M16c 264 Group M16C 65 Group 9 MI amp C 28 Group 9M16C 6 Group 0 M16c 29 Group 9M16C 10 Series M16C 624 Group JM16C 24 Group O M16C 62F Group File name MEU Files of type MCU Files meu L ancel 15 S Select one of the following MCU files depending on the group and memory size Group Memory size 48KB 64KB Memory size 96KB 128KB Select MCU File Look ir E REl Tiny Seres d E RsF211A4UART MCU RsFz12CBUART MCU R5F21124 MCU RsF211B4UART MCU RsF212CCUART MCU R5F21134
11. 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 e Please contact Renesas Technology Corporation or Renesas Solutions Corporation for further details on these materials or the products contained therein ES ee ae Oy 9 2 9 3 5 4 9 9 5 6 Del 5 8 2 9 2 10 5 11 5 12 Table of Contents Connecting the Target Board to the User System erre 4 Preparing the M16C R8C FoUSB UART Debugger eae 6 Memory Map When Using the R8C UART DebUGGE ccccceeeeeseeeseeeeeeeeeeaeeees 19 Monitor Program Occupied ATedg 55 an eee e a pis tebdescE EU ai 21 Notes on Using the R8C UART Debugger eeeeeeeeeseeeeeennnennnnnnnns 21 Changing communication speed and restarting the R8C UART debugger after the R8C WART debugger 1S dONC 4 eio usa i ont EE ue Rai I ee Oe date Pet bar ira lu ved ue DERE 21 User program D COG iai aic tueatur esa onis So utis OL isa asa Ra cioe 21 User program download ar e a cccccsssssccccccsseececceesecececeaueceeseaaeeeeessaaeeeessssgseeessaas 22 Frequency characteristics eiiie aud Cicada cand sor s sd uai da Eua pa Eco Obra fud an wai 25 Limitations Ol SEFCODeLadols senso ara a le ttal set io ea eei d ure uera 26 Limitations on stop m
12. using a toolchain select the applicable toolchain name When not using a toolchain select None e 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 5elect Target CPU Toolchain version HIEI T aalchain version 5 44 00 Which CPU do you want to use for this project CPU Seres IF there is no CPU group to be selected select the CPU Group that a similar to hardware specification or select Other Back Net Finish Cancel Select the Toolchain Version CPU Series CPU Group and then press Next In this example R8C 2A Group is selected e Select the MCU ROM size and other related settings Mew Project 2 5 5etting the Contents of Files to be Generated HIEI What kind of initializatian routine would you like ta create HUM FEE Use Standard 17 0 Library UART 1 Use Heap Memory Heap Size p 80 Generate manl Functian Ic source file Use OnChip Debugging Emulator Mone Firmware Address Size wwork RAM Address Size c Back Net Finish Cancel Select the MCU ROM size and heap size Select None for the on chip debugging emulator And press Next f Set the stack New Project 3 5 Setting the Stack Area What are the stack settings User Stack Pointer Stack Size 0480
13. 5 oid main void sample c 36 Download modu 37 fpracma section program interrupt sample x30 38 Dependencies 39 oid start void cstartdef h 40 041C8 Z initsct h 41 041C8 gt resetpra h 42 041CC prer 0x02 change protect mode register sfr r82b h 43 041D0 pmO 0x00 set processor mode register typedefine h 44 041D3 prer 0x00 change protect mode register 45 041D6 _flg_ _F_value_ set flag register 46 Hif STACKSIZE 0 47 041D Sp amp Stack top set user stack pointer 48 Hendif 49 O41DE sb 0x400 400H fixation Do not change 50 041E2 _intbh_ 0x00 set variable vector s address 51 041E6 asmi ldc fi topof vector OFFFFh INTEL a sample c 2 resetprg c X ol ot al at 21 2t 2 85 M Connected Build A Debug A Find in Files 1 Find in Files 2 Macro Test Version Control Ready fF F2 E E3 Defaulti desktop Read write 41 73 1 INS NUM 18 3 Memory Map When Using the R8C UART Debugger Figure 4 shows a memory map 64 KB 00000h 002FFh 00400h User RAM OOEFFh Monitor RAM OFFDCh Undefined OOFFFh instruction Overflow BRK Instruction 04000h Address Match Flash Memory Monitor Program 48KB Single Step User Program Watchdog Timer Area Reserved Reset OFFFFh Flash Memory 16KB 13FFFh Note o are occupied areas for the monitor program Figure 4 Me
14. E DE EE SE CR RR RR RR RR RC F Free Go a initsct c amp t Go To Cursor sample c Ip Set PC To Cursor Fri May 30 2008 Y resetpra c Run RIPTION main program file ER GROUP 2 Download modu c Display PC Ctrl Shift sample x30 E file is generated by Renesas Project Generator Ver 4 12 i 11 EE T3 step In Fil g y J i Dependencies E cstartdef h P Step Over Fio RED RCROR CR R CR A CR R CR A OR A B CR R CR ROB A B CR R OR A OR CR CR R OR A CR CR EEA B R EERE A BO A A E A E A EEE E initsct h Step Out Shift F11 str 182b b typedefine h Step Mode STOP Halt Program Initialize m Connect m Disconnect Save Memory i Verity Memory Download Modules gt m Ol OT l AT 21 91 c Unload Modules Build A Debug A Find in Files 1 Find in Files 2 Macro Test Version Control Reset CPLI Ft EZ E E Default1 desktop Read write 1 16 1 INS NUM 17 w The cursor moves to the top of the user program and debugging starts e sample High performance Embedded Workshop resetprg c BE fx T vi File Edit View Project Build Debug Setup Tools Test Window Help Zum JOM le 08 mma E E Eta EU POD m e EE E WEBS iz xd EIS Sucre e Sm Jeje LL B fvector c 31 oid start void r 32 extern void initsct void i initsct c 33 extern void init void 34 oid exit void resetprg c 3
15. Everywhere you imagine E P E NI ESAS REJ10J1725 0100 M16C R8C FoUSB UART Debugger User Manual Renesas Microcomputer Development Environment System R8C Family R8C 2x Series Notes on Connecting R8C 2A R8C 2B R8C 2C R8C 2D Rev 1 00 Renesas Technology Issued July 15 2008 www renesas com 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 e 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 li use of nonflammable material or iii prevention against any malfunction or mishap Notes regarding these materials
16. HAH initsct h 8 resetprg h ie oid main void sfr r82b h 13 E typedefine h 15 4 ol or al at 8181 92 e d Phase M16C Load Module Converter finished Build Finished O Errors O Warnings gt Build Debug A Find in Files 1 Find in Files2 Macro Test Version Control Ready EE F2 E EF Defaulti desktop Read write 4 16 1 INS NUM p Connect with the target A host computer can be connected with the target easily by switching to the session file in which the setting to use the R8C UART debugger is pre registered 3 sample High performance Embedded Workshop sample c PEIES vi File Edit View Project Build Debug Setup Tools Test Window Help 2 B8 x D gg r 4 we 8 a 5 da d hae eo Debug x DetaulSession A w TE DefaultSession SessionM16C RSC FoUSB N sample sample 1 AR RR a Ch A Ch WC RR RR Ch Ch Ch Ch KC h RR A OR A 8 A E H E C source file 2 tf fvector c 3 FILE sample c 5 heap c 4 DATE Fri May 30 2008 3 initsct c 5 DESCRIPTION main program file 3 intpra c 6 CPU GROUP 2A Y resetpra c 7 ERES 8 This file is generated by Renesas Project Generator Ver 4 12 H E Dependencies 9 4 cstartdef h alg PREFS RCNCR ACA ATA Ch OW ATTA HAKATA HATTA TAHA A TATA ATA Ch HAHAHAHAHA HAHAHAHAHA UN A I initsct
17. Interrupt Stack Painter Stack Size 0480 Back Net Finish Cancel Set the Stack Size and press Next g When the toolchain setting is complete the following screen is displayed Mew Project 4 5 Setting the Target System for Debugging E EI MIBC ASE FolISBALIA amp RT MTEL REC Simulator External Debugger MI6C Family KDr30 Y 4 10 Release 1 Target type REC Tiny Back Net 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 Mew Project 5 6 5etting the Debugger Options Target name M1B5C REL FaLlSB LI amp RT Configuration name Debug M15C Rol Fall8B LI amp RT Detall options Setting Modify Back Net Finish Cancel 10 i Verify the file names to be generated Mew Project 6 6 Changing the File Names to be Created HIEI The following source files will be generated tupedefine reselpro resetprq Initsct Intec fector intprg str rob str ro2b heap sample cstartdef define scalar types Initialize for C language include some headder Initialize each sections define the macro for in define the fired vector define the top address define th
18. e sfr register define the sfr register define the size of hear main program file define the size of stacl 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 PROJECT MAME sample PROJECT DIRECTOR Cw ork S pace ssample ssample CPU SERIES HSL Tiny CPU GROUP Ei TOOLCHAIN MAME Renesas M160 Standard Toolch TOOLCHAIN VERSION 5 44 00 GENERATION FILES Cw ork Space sample sample tupedetine h define scalar types L W arkSpace ssample ssample resetprg c Initialize for C language wW arkSpace ssamplessample resetprg h Include same headder files Sw arkSpace ssample ssampleiniEsct c Initialize each sections CAWork Space sample sample vinitsct h define the macro for initialization of sections lt Hill Click OF to generate the project ar Cancel to abort if Generate Readme tet as a summary file in the project directory Cancel 11 k Check the section address Under the Build menu select Renesas M16C Standard Toolchain Eos sample High performance Embedded Workshop File Edit view Project Wf Debug Setup Tools Test window Help ee eg Renesas MIGC Standard Toolchain eR a eg Debug z DefautSession At e Build File zd sample E Build E Build All Sy C source ae E f
19. ese 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 e 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 e 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 e f these products or technologies are subject to the Japanese export control restrictions they must be exported
20. mory Map 64 KB Figure 5 shows a memory map 128 KB 00000h 002FFh 00400h User RAM feste ae E O1OFFh 011FFh 03000h Address Match Single Step Flash Memory Monitor Program 04A00h Watchdog Timer 48KB 04000h User Program Area Reserved Reset Vector Area Flash Memory 80KB OFFFFh 23FFFh Note are occupied areas for the monitor program Figure 5 Memory Map 128 KB 20 4 Monitor Program Occupied Area Table 1 Monitor Program Occupied Area ROM RAM Occupied Area for Monitor Program Flash memory 4000h to 49FFh 48KB 2 5KB Vector FFE8h to FFEBh FFECh to FFEFh FFF4h to FFF7h RAM EFFh to FFFh Flash memory 4000h to 49FFh ARB TRAR Vector FFE8h to FFEBh FFECh to FFEFh FFF4h to FFF7h RAM 10FFh to 11FFh Flash memory 4000h to 49FFh TON RRAS Vector FFE8h to FFEBh FFECh to FFEFh FFF4h to FFF7h RAM 10FFh to 11FFh Flash memory 4000h to 49FFh TERS ae Vector FFE8h to FFEBh FFECh to FFEFh FFF4h to FFF7h 5 Notes on Using the R8C UART Debugger 5 1 Changing communication speed and restarting the R8C UART debugger after the R8C UART debugger is done The target MCU holds the baud rate value after the R8C UART debugger ends Therefore when changing the communication speed and restarting the R8C UART debugger a communication error occurs The R8C UART debugger can be started when using the previous communication speed When changing the communication speed tur
21. n off the target power and turn on the power again 5 2 User program ID code Set the ID code of the user program to all FFh when using the R8C UART debugger Table 2 ID Code Storing Address Address ID No Vector Table OFFE7h OFFE4dh BRK instruction i OFFF3h OFFFOh Watchdog timer oscillation stop detection voltage monitor 2 OFFF7h OFFF4h lD6 Reserved o o o OFFFBh OFFF8h OFFFFh OFFFCh See Note Note Refer to the hardware manual for the value set to address OFFFFh 21 5 3 User program download area As shown in Figures 4 and 5 a monitor program uses a part of RAM or flash memory when using the R8C UART debugger The R8C UART debugger does not download a user program only in the area which overlaps with a monitor program Note that the R8C UART debugger does not output an error at this time When an error is output set the following a Make firm c and enter the following include typedefine h ifdef_ UART __ pragma section bss FirmArea far UBYTE _firmarea OxA00 endif 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 e sample High performance Embedded Workshop sample c lt gt File Edit View Wz z49 Build Debug Setup Tools Test Window Help Dg gg set Current Project i JA E A amp E Debug SessionMIBC R amp C FoU a
22. ode or wait mode ssseesssseseeeenneeeenn nennen 26 Va feio pie o oil Anis ses as ee asc Dn 27 Real time operation of user program cccccseseecccesececceuseeccseseeeceseecseseesssaseeessaeees 27 Executing anomalIStic Stops oua eee eee a Cola cv RO are obw re SA Mae as 28 Limitations on peripheral functions eeeeeeeeeeeeeeeeeenn eene 29 Limitations on flag register 2 pu duis aiii gas rca gie sie utu ek pui daas daa lida ad 29 Operation on peripheral I O during a break cccccceeecceceeeeeeeeeeceeceeeeeeeeeeesseeeeseaees 29 1 Connecting the Target Board to the User System Host Computer External Power Supply e Target Board Figure 1 Connecting the Target Board to the User System LHA 0812 472K MAX3221EAE 0 22uF DIODE 59 22F 22wF Zeu ANV 10 me DIODE Vcc 0 22uF O e Voc D SUB9 Q CONNECTOR RS 232C Straight IBM PC AT 5k 5k o JUMPER 1014 i 20MHz 38 37 9 XIN P4_6 7 XOUTIP4 7 Push 0 1uF VI Vcc Q 0 1uF Vss AVss Vcc AVcc 19 Vec AVcc VREF Vcc 5V O DIODE CONT P6 7 RxD1 P6 6 TxD1 Perd 2pin PLQP0064KB A PLQP0064GA A Figure 2 Circuit Using the RS 232C Cable R8C 2A 2B Groups Q LHA 0812 472K Vcc 0 1uF MAX3221EAE
23. rder from the Category pull down menu Add followings to the start address of the monitor program occupied area shown in Table 1 e Memory size 48KB FirmArea_NE e Memory size 64KB 96KB 128KB FirmArea_FE Renesas M16C Standard Toolchain Configuration C Assembly Link Librarian Lc RTOS cPL Debug Category Section Order All ad Projects ED EE E dit 0200000400 C source file Assembly source file data SO data SD De DOLID ODE Options Link L ne3 lib G MS 0 S COMFIGDIRIPSEIPROJECTMHAME 30 OARDER data SE U4 LD bss SE data SU bss SO data NE bss NE dat a NO bes NO stack stack heap NE rom ME 04000 rom NO data SEl data S l data MEl data MOI smtoh table program When the user program overlaps with the monitor program occupied area due to the above settings an error is output 24 5 4 Frequency characteristics The monitor program operates in the range of the main clock Xin frequency shown below The monitor program may not run with frequencies not listed below so use an oscillator that has this frequency range 1 MHz minimum to 20 MHz maximum Table 3 lists each frequency and communication available speed 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 Table 3 Communication Available Speed of Each Frequency DE Communication Speed bps
24. reak peripheral I O continues operating For example when stopping a user program by a break during operating a timer the timer continues counting but the timer interrupt cannot be accepted 29 REVISION HISTORY Description Rev Date Page Summary Too ouis 2008 ese SSS PL tt Om M16C R8C FoUSB UART Debugger User Manual Notes on Connecting R8C 2A R8C 2B R8C 2C R8C 2D Publication Date Rev 1 00 Jul 15 2008 Sales Strategic Planning Div Published by Renesas Technology Corp Edited by Renesas Solutions Corp 2008 Renesas Technology Corp and Renesas Solutions Corp All rights reserved Printed in Japan M16C R8C FoUSB UART Debugger User Manual Notes on Connecting R8C 2A R8C 2B R8C 2C R8C 2D 24 N S AS Renesas Technology Corp 2 6 2 Ote machi Chiyoda ku Tokyo 100 0004 Japan
25. source file Clean Current Project i firme Clean All Projects ple c ui E fvector c ipcinte ABD dd May 30 2008 heap c se a program file E initsct c d Stop Tool Execution Ctrl Breal a L intprg c 3 resetprg c IncludeJExclude Build rated by Renesas Project Generator Ver 4 12 sample c ty Gy Download moi Build Phases WORCKCECHCACHOAChCACh ACA ACA ACA Ch KC KC A Ch Ch A Ch KC KC ACA A OR A RC A A 8 A 8 A 8 S UN S UN S NN Dependencies E estartdet Build Configurations E initscth E reseipra H Linkage Order E sfr 182b h Generate Makefile LE typedefine X ol of al at 21 21 2 Connected Disconnected Build A Debug Find in Files 1 Find in Files2 Macro A Test Version Control EE F2 E FS Defaulti desktop Read write 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 Configuration Debug cM All Loaded Projects sample H C source file Assembly source file Options c nto dir LCONFIGDIR RHSCE 23 e Set defined macro is displayed Enter UART in the Macro field and press OKT Set defined macro Macro UART O Replacement cr f To set the link option in the Renesas M16C Standard Toolchain window click on the Link tab and select Section O
26. t workspace Select this when using an existing workspace Previous workspaces are displayed in the pull down menu e 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 under letter t Page 16 is displayed b Select Create a new project workspace Press OK Welcome Cancel t Open a recent project workspace Administration t 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 Name Project Tupes H Application eme OSS C source startup Application Project Name Empty Application E e aene sample a Library Directory F gt Debugger only MTBC FollSB CAworkSpace sample ETE F Debugger only M16C Simulat CPU family MEE Tool chain Renesas M16C Standard Properties e Workspace Name Enter a name to create a new workspace sample has been input as an example e 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 e CPU family Select the applicable CPU family In this case M16C has been selected for the R8C Family e Toolchain When
27. ta MOI switch table program i 12 m Double click the source program to launch the program editor e sample High performance Embedded Workshop File Edit view Project Build Debug Setup Tools Test Window Help Dete 6 seea o al na ES Debug z DetautSession Pt ax E sample sample C3 C source file fvector c heap c initsct c intprg c resetprg c EXE Dependencies cstartdef h initsct h resetpra h sir 182b h typedefine h Ready Ft E2 3 ES Default1 desktop INS NUM n When the program is complete under the Build menu select Build or Build All to build the program Eros sample High performance Embedded Workshop sample c vi File Edit View Project JEM Debug Setup Tools Test Window Help ID oh g 6 X Renesas M16C Standard Toolchain S e amp amp Build File Ctrl F7 E G sample 3 Build F7 Emm E sample im P RN WURCKCHCKCKCHCK CH CR ACH CK ChCh A ChCKChCh A Ch C TAA RR A TATE ES IET All X 9 C source file E aci Build Multiple le 44 E heap c Clean Current Project May 30 2008 initsct c Clean All Projects h program file 4 E intprg c Update All Dependencies amp resetpra c wf a E EUA Stop Tool Execution Ctrl Breal rated by Renesas Project Generator Ver 4 12 EI Dependencies B cstartdef Include Exclude Build ka a a a a
28. vectd Build Multiple heap Clean Current Project initsct x Clean all Projects E intprg n Update All Dependencies Bj resetp 4 sampl g Stop Tool Execution Ctrl Break 3 Depender cstart Include Exclude Build Z initsct resetp Build Phases T sfr 8 i B typed Build Configurations Linkage Order Generate Makefile X ei er al at g1 gr 7 mme Build Debug A Find in Files 1 Find in Files 2 Macro Test Version Control FEZ E2 EZ E Defaultt desktop INS NUM I 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 If there is any overlap edit the address value Renesas M16C Standard Toolchain Configuration E Assembly Link Librarian Lmc ATOS crae Category Section Order hd ES All Loaded Projects sample 000000400 data SE C source file bss SE Assembly source file data 50 bss SU data ME bss ME data NO bss ML stack istack heap ME 000004000 rom ML data SEI Options Link L ne3 lib G MS 0 S COMFIGDIRIPSEIPROJECTMHAME 30 OARDER E data SE D400 bss SE data SO bss SO data NE bss NE dat 3 a NO bes NO stack stack heap NE rom NE 04000 rom NO data SEl data S l data MEl da
Download Pdf Manuals
Related Search
Related Contents
Autoévaluation à l`oral : s`entraîner avec des ressources authentiques 平成27年2月26日 Manual de Instrucciones, Garantía y Servicios Técnicos ポケットレーダー チラシ裏面 Scansonic R3 取扱説明書 - M 100 % COMPATIBLE Lors du dernier CHS du 6 juin 2007, la Fédération FO 日立インバータ高圧エアーパンチ Copyright © All rights reserved.
Failed to retrieve file