Home

M16C R8C FoUSB/UART Debugger User Manual

image

Contents

1. IRE sample High performance Embedded Workshop sample c e x lt gt File Edit View Project Build AStA Setup Tools Test Window Help E x D amp B 2 amp Debug Sessions JA amp R IE 8 h A Debug SessionM16C_RBC_Fol x At 4 omen g 2 By Debug settngs PPDa FABRA AB l x xl EF Reset cPU sample P Go F5 Ell Reset Go shifters DO B fyector c Free Go C a a TAKA TAHT ATTA HAHA AKT AKA AAT AA TAHT AAA AAA AT AK TAHA AHA AAA H AAA f P heap c urd initsct c Zi Go To Cursor rsample c i E intprg c I Set PC To Cursor Frfi May 30 2008 resetpra c Run RIPTION main program file wf sample c ae GROUP 27 _ a pk Download modu ec Display PC Ctrl Shift y j 5 file is generated by Renesas Project Generator Ver 4 12 Ps sample x30 Py step In g j i cstartdef h P Step Over F10 EREEREER EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE EEE EEEE EEEE EEEE EE EEEE Z initsct h P Step Out Shift F11 resetprg h Step inivoid sfr_1827 h b Z typedefine h TENA STOR Halt Program Initialize i Connect M Disconnect Save Memory y a 12 gt Verify Memory ajajaa Download Modules m OL OT l t 2i ft Z Unload Modules All Download Modules Communication ERROR n Can t accept data 16014 Disconnected Connected Disconnected 3 Connected F v
2. sample ag E sample al LRRTEFTTATEATEK TAKA ETAT TAKA EK TA AAT AA TET TA AAA AA TAHA E TART AAATAA TAHA ATTRA H E C source file 2 fvector c 3 FILE sample c heap c 4 DATE Fri May 30 2008 El initsct c 5 DESCRIPTION main program file intpra c 6 CPU GROUP 27 resetpra c y pn 4 sample c 8 This file is generated by Renesas Project Generator Ver 4 12 wf Dependencies 9 it cstartdef h 10 PREFS TATA AAA AKT ATA E EAA AAA A TATA E HAHA AAA A AAA K ATA AAA K AKASH ATA HAHAH initsct h E resetprg h ie oid main void sfr_1827 h 13 B typedefine h 15 4 ol or al at 21 2t 2 e Phase M16C Load Module Converter finished Build Finished 0 Errors O Warnings gt Build Debug A _ Find in Files 1 Find in Files2 A Macro Test A Version Control Ready EE F2 E FS Default desktop Read write 14 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 f efx lt gt Fie Edit View Project Build Debug Setup Tools Test Window Help 0 x Dae g r we BS a jt G A hae ig Debug x DefautSession 2 w DefaultSession Ses
3. Register mee Limitation Change Processor Mode Register 0 Single chip mode only Processor Mode Register 1 Resetto 00h System Clock Control Register 0 Resetto08h Setthe CMO5 bit to 0 5 Set bits CM13 and CM15t01 Partial Saem Oa Coa Fg Sais OMIA High Speed On Chip Oscillator Control Setthe FRADO bitto 1 Register O eet S O Register 1 Do not change this register Raaz OP OBD ON Reson Register 2 Oscillation Stop Detection Register LS w Set this register to OOh a l Protect Register l Whiting to the D flag is ignored Do not j Pease ate Set an area not used by the monitor Partially SP rent Sack Porten pesto STF 5 6 Limitations on stop mode and 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 25 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 monitor
4. initsct c E intprg c resetpra c Dependencies cstartdef h initsct h 5 resetprg h sfr_r827 h typedefine h EE E2 E E Default desktop o A E oe i 1 io n When the program is complete under the Build menu select Build or Build All to build the program ner sample High performance Embedded Workshop BER Fie Edit Yiew Project f3MGA Debug Setup Tools Test Window Help D g lzi a 8 Renesas M16C Standard Toolchain Build File Ctrl F7 E G sample Build F7 E sample Ar All 5 C source E fvecte Build Multiple heap Clean Current Project l initsct Clean All Projects intprg f Update All Dependencies E sa Stop Tool Execution Ctrl Break H E Depender cstart Include Exclude Build initsch E resetg Build Phases i E sfr_r8 typed Build Configurations Linkage Order Generate Makefile Version Control Build the active project and all dependent projects regardless of whether the project files are c Ft E2 ES E4 Default1 desktop INS NUM 13 o The result of the build is displayed IRE sample High performance Embedded Workshop sample c BE fx lt gt Fie Edit View Project Build Debug Setup Tools Test Window Help xd x x _ gt ty A A a 33 Debug DefaultSession Pai Sy
5. 2 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 2E 2F Groups P3_7 TRAO TRFO11 2 pin P4_5 INTO 9 pin 5 11 Limitations on the flag register When operating the flag register in a 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 break 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 28 REVISION HISTORY M16C R8C FoUSB UART Debugger Description Rev Date Page Summary Too bec ta 2000 Freon o S a S M16C R8C FoUSB ART Debugger User Manual Notes on Connecting R8C 2E R8 2F Publication Date Rev 1 00 Dec 12 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 s Manual CENESAS Renesas Electronics Corporation 1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan REJ10J1965 0100
6. Build A Debug A Find in Files 1 Find in Files 2 Macro A Test version Control EEx lt gt Fie Edit View Project Build AStA Setup Tools Test Window Help x Da GS g X a Debug Sessions JAg D IE E ey 2 Debug SessionM16C_REC_FoU gt At 4 omen g z HH obu setings PROL mamala a G sample sample Z Go FS E C source file ll Reset Go trs oe ee See See Se ee ae B fyector c F Free Go THKKKKAAK AKT AK AAT AAT E AAA E E AAT AA TAHT AAA TAHT ATA A AHA AAA H EET t7 initsct c f Go To Cursor sample c af intpra c I Set PC To Cursor Frfi May 30 2008 fesetprg c Run RIPTION main program file tr sample c ale GROUP 27 Download modu c Display PC Ctrl Shift f AR sample x30 B file is generated by Renesas Project Generator Ver 4 12 wf i A Step In Fii Dependencies f cstartdef h P Step Over F10 EREEREER EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE EEEE EEEE EEEE EEEE initsct h P Step Out Shift F11 sfr 827 b typedefine h Step Mode STOR Halt Program Initialize a Connect Disconnect Save Memory a Verify Memory Download Modules gt Ol OT l t 21 2t Z Unload Modules gt Communication ERROR Can t accept data 16014 Disconnected Connected Disconnected Connected gt Build A Debug A Find in Files 1 Fi
7. Eal Debug SessionM16C_R8C_FoU qe Insert Project typedefine h Create Project Type Pro YP UART dd Files ection bss Firma rea Remove Files E firmarea 0x400 File Extensions Components cstartdef h Z initsct h resetprg h 2 sfr_1827 h E typedefine h Phase M16C Load Module Converter finished Build Finished 0 Errors O Warnings rm gt Build Debug A Find in Files 1 Find in Files 2 Macro A Test Version Control Add File s to project fF F2 E FS Defaulti desktop Read write 77 7 INS NUM 21 c To add the compile option select Renesas M16C Standard Toolchain under the Build menu neh sample High performance Embedded Workshop fiem c f ef lt gt Fie Edit View Project JE Debug Setup Tools Test Window Help 0c0e 6 LIE ca ls oe _ ax x Deus SessionM16C_R8C_FoU At ye omens 2 Build File a7 Pa rs 4 Build F7 Bull a wea aaa Build Multiple hr Clean Current Project B fiem c Clean All Projects LE fvector c irmarea Update All Dependencies L heap c Oxs00 Ej initsct c d Stop Tool Execution Ctrl Break L intprg c B resetprg c Include Exclude Build sample c E Download mo Build Phases i Dependencies cstartdef Build Configurations initsct h aah Linkage Order E s
8. Makefile 4 91 or al at 21 2t 7 H in Build Debug A Find in Files 1 Find in Files 2 Macro A Test Version Control fF E2 E EA Default 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 C Assembly Link Librarian Lmc RTOS crae Debug Category Section Order TET Al Loaded Projects in O OE O Era sample D O0000400 data SE C source file Hee SE Assembly source file data SO bss SU data ME bss ME data NO bss MO shack istack heap NE rom_ AO data_SE Options Link L r clib G MS 0 S CONFIGDIRME PROJECTNAME 30 A DADER data _5E 0400 b _5E data SO bss SOU data NE bss NE dat a NU bes NO stack tstack heap NE rom NE 08000 1rom_ NO data_SEl data_SUI data_NEldata_NOlswitch_table program 12 m Double click the source program to launch the program editor ner sample High performance Embedded Workshop File Edit view Project Build Debug Setup Tools Test Window Help D kj a r amp B gt had Debug 7 DefautSession Pai gk E E sample sample E C source file 2 fvector c heap c
9. 2C Straight lee IBM PC AT Vcc 20MHz a 6 XIN P4_6 5k 4 XOUT P4_7 3 RESET Push Tr Vd Figure 2 Circuit Using the RS 232C Cable R8C 2E 2F Groups Preparing the M16C R8C FoUSB UART Debugger The M16C R8C FoUSB UART debugger hereinafter RBC 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 f x r C 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 project 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 workspac
10. 6N Group O M16C 264 Group M16C 65 Group M16C 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 mncul Cancel 15 S Select one of the following MCU files depending on the group R8C 2E Group R5F212E4UART MCU R8C 2F Group R5F212F4UART MCU Select MCU File Look ir Aal Tiny Series d 4 B RSF21144 MCU B RSF21174 MCU B RSF21258UART MCU R RSFZLLUART MCU P R5F2LIF4UART MCU RSF21266U4RT MCU R R5F21154 MCU R RSF21164UaRT MCU MEE E RSFZ1154UART MCU F R5FZLIS4UART MCU RSF21286U4RT MCU RoF21 164 MEU RoF21 23 7UGRT MCU RoF21296U4R7 MCU RS5F211640AF T MEU F RoF21256U4R7 MU 4 fl File name ASF 21 fbUAART MCU Files of type MCU Files mou Cancel In this example R8C 27 Group is selected t Select the appropriate Port and Baud Rate from the pull down menus Press OK and a monitor program is downloaded Init M16C R amp C FoUSB UART MCU Debugging Information Run Mode Script MCU R5F21276UART MCU 2 f Serial C Fort COM Baud Rate 38400 Monitor Debug Start up for monitor debug OK 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
11. E data _ 5E 0400 b _5E data SU bss SO data NE bss NE dat a NU bes NO stack tstack heap NE rom NE 08000 rom_ NO data_SEl data_SUI data_NEl data_NOlswitch_table program When the user program overlaps with the monitor program occupied area due to the above settings an error is output 23 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 Do not select low speed on chip oscillator or Xcin clock as a main clock Table 3 Communication Available Speed of Each Frequency Frequency Communication Speed bps 4800 9600 19200 38400 O Communication available h NO NO N 0 X Communication not available Note Communication may not be possible depending on temperature and voltage If communication is not possible lower the communication speed 24 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
12. ECT DIRECTORY CA MorkS pace samplesample LPU SERIES AalT iny CPU GROUP ee TOOLCHAIN MAME Renesas M16C Standard Toolch TOOLCHAIN VERSION 5 44 00 GENERATION FILES Cw ork Space sample sample tupedetine h define scalar types CWWork Space sample sample resetprg c Initialize for C language Cwik Space sample sample resetprg h Include some headder files CAW ok Space sample sample vnitsct c Initialize each sections CAWWork Space sample sample initsct h define the macro for initialization of sections Click OF to generate the project or Cancel to abort iw 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 IRE sample High performance Embedded Workshop Fie Edit view Project MaMCA Debug Setup Tools Test Window Help ee eg Renesas MIGC Standard Toolchain w e g 9 a eg Debug z DefautSession x At 2 Build File sample bki Build E Build All 3 3 C source ae B fvectd Build Multiple heap Clean Current Project E initsct 23 Clean all Projects E intprg n Update All Dependencies Bj resetp 4 sampl 2 Stop Tool Execution Ctrl Break E Depender cstart Include Exclude Build Z initsct resetp Build Phases u sfr8 i B typed Build Configurations Linkage Order Generate
13. To our customers Old Company Name in Catalogs and Other Documents On April 1 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http Awww renesas com Send any inquiries to hitp www renesas com inquiry CENESAS 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is granted
14. Y 4 70 Release 1 T arget type REC Tiny lt Back Next gt 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 Setting the Debugger Options Target name MI6C RBC FollSBe UART Configuration name Debug _M16C_AeSC_FoUSB_ UART Detall options Setting Modify lt Back Next gt Finish Cancel i Verify the file names to be generated New Project 6 6 Changing the File Names to be Created 7x The following source files will be generated Est Description tupedeftine define scalar types resetprg Initialize for C language reseltprg Include zome headder Initect Initialize each sections Intec define the macro for in fector define the fired vector Intprg define the top address str roe define the sfr register str mee i define the sfr register heap define the size of hear sample main program file cstartdet define the size of stacl 10 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 PROJ
15. ain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronic
16. cation ERROR Can t accept data 16014 Disconnected Connected Disconnected Connected gt Ml Build A Debug A Find in Files 1 Find in Files 2 Macro A Test version Control Ready fF F2 E FA Default desktop Read write 40 72 1 INS NUM 18 3 Memory Map When Using the R8C UART Debugger Figure 3 shows a memory map 16 KB 00000h 002FFh PONEN User RAM FFh Monitor RAM ee OFFDCh re Undefined 007FFh K instruction OCOOOh Address Match Flash Memory Monitor Program pi 4 16KB OCA00h User Program Watchdog Timer 4 Area Single Step Vector Area OFFFFh Note are monitor program occupied areas Figure 3 Memory Map 32 KB 4 Monitor Program Occupied Area Table 1 Monitor Program Occupied Area ROM RAM Occupied Area for Monitor Program KB B Vector FFE8h to FFEBh FFECh to FFEFh ia FFF4h to FFF7h RAM 6FFh to 7FFh Flash memory CO0Oh to C9FFh Vector FFE8h to FFEBh FFECh to FFEFh FFF4h to FFF7h 16 KB 1 KB 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 RBC UART debugger is done Therefore when changing 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 chang
17. ci dev setaiedicanaelalihcecasastecedecmncditaahedelevcs 21 5 4 Freg ncy characteristics seiis e a aaa qual aa i aE a aa aaa a 24 55 Eimitations of SFRODEAINONS ae a e a N aN 25 5 6 Limitations on stop mode and wait mode ccccceeecneeeeeeeeeaeeeeeeeeeaeeeeeeeeaeeeesensaeeees 25 Se Watchdog ime ei e a ae a a a 26 5 8 Real time operation of user program ccccccsescecceeseeecceescecceseeeceuseecseuseeessaseeessaaeees 26 5 9 Executing anomalstic SICDS sorea a e e a ae ad 27 95 10 Limitations On peripheral TUNCUONS cesis ea aaa aaa aaa ataa 28 5 11 Limitations on the flag reQister ccccccssssceccesseecceeseeeceeeseeceaseeeceaseecseuseeessaseeessageees 28 5 12 Operation on peripheral I O during a break ccccccccsseeeeeeeceeeeeeeeesaeeeeeeeseeeeeesssageeeees 28 1 Connecting the Target Board to the User System Host External Computer Power Supply 00090 08090 25080 00090 050 050 0 a 3302000 390000 3 38 Target Board Figure 1 Connecting the Target Board to the User System LHA 0812 472K Vcc 0 1uF MAX3221EAE 0 22uF DIODE 10 5 Vss AVss VeciAVcc 7 22ur 2 2uF 2 2uF ANV 10 E Vec 5V DIODE Vcc O i j 9 DIODE CON1 T 5k P4_5 RxD1 4 0 1uF 2 j P3_7 TxD1 Vcc D SUB9 O CONNECTOR ii 8 S77 io JUMPER rO RS 23
18. 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 malfunction or mishap Notes regarding these materials These materials are intended as a reference to assist our customers in the selection of the Renesas Technology product best suited to the customer s application they do not convey any license under any intellectual property rights or any other rights belonging to Renesas Technology Corporation Renesas Solutions Corporation or a third party Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage or infringement of any third party s rights originating in the use of any product data diagrams charts programs algorithms or circuit application examples contained in these materials All information contained in these materials including product data diagrams charts programs and algorithms represents information on products at the time of publication of these materials and are subject to change by Renesas Technology Corporation and Renesas Solutions Corporation without notice due to product improvements or other reasons It is therefore recommended that customers contact Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor for the latest prod
19. e and pressing OK the screen under letter t Page 17 is displayed b Select Create a new project workspace Press OK Welcome Cancel Administration c The Project Generator starts When a toolchain is preinstalled the following screen is displayed New Project Workspace Projects workspace Mame Project Types H Application kane OSS C source startup Applicatior Project Name Empty Application i a ian sample go Library Directory F gt Debugger only M16C FollSB CAworkSpace sample 0000000 EEE F Debugger only M16C Simulat CPU family MIEC 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 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 Select Target CPU Toolchain version fx Toolchain version 5 44 00 Which CPU do you wa
20. ed 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 C watch window and ASM window are closed 26 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
21. er use 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 f these products or technologies are subject to the Japanese export control restrictions they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved destination Any diversion or reexport contrary to the export control laws and regulations of Japan and or the country of destination is prohibited Please contact Renesas Technology Corporation or Renesas Solutions Corporation for further details on these materials or the products contained therein s OF se ee a Table of Contents Connecting the Target Board to the User SyStem 0 ccccceeeeeeeeeeeeeeeeeeeaaeaeeeeeseeeeeeeeeeeeeees 4 Preparing the M16C R8C FOUSB UART Debugger cceeeeeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeeeeeeensaes 5 Memory Map When Using the R8C UART DebUGGe cccceeeeeceeeeeeeeeeeeeeeeneeeeeeeseeeanes 19 Monitor Program OCCUBIED ATC asninn a aaa a e Sai 20 Notes on Using the R8C UART DebUgQel ceccccccceecceseesseeeeeeeeeeeeeeeeceeeeeseueaeeeeeeeeeesaaas 20 5 1 Changing communication speed and restarting the R8C UART debugger after the R8C UART debugger 1S doneert eee ate Ocelot esse 20 g2 Userprograni ID COC rasa a a a A 20 5 3 User program download area oss cdccrccvitecsietelecii
22. esas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers office equ
23. hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document but Ren
24. ing communication speed turn 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 OFFE4h BRK instruction OFFEFh OFFECh Single step OFFE3h OFFFOh ID5 Watchdog timer oscillation stop detection voltage monitor 2 OFFF7h OFFF4n ID6 __ Reserved o Z o o O OFFFBh OFFF8h OFFFFh OFFFCh Note Refer to the hardware manual for the value set to address OFFFFh 20 5 3 User program download area As shown in Figure 3 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 outputting an error 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 33 sample High performance Embedded Workshop fiem c lt gt File Edit view JOGA Build Debug Setup Tools Test Window Help E xX Dak g set Current Project JA Ry
25. ipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under cert
26. nd in Files 2 Macro A Test version Control Reset CPU BEN Ey E El Default1 desktop Read write 4 16 20 INS NUM 17 w The cursor moves to the top of the user program and debugging starts RE sample High performance Embedded Workshop resetprg c o ef lt gt Fie Edit View Project Build Debug Setup Tools Test Window Help oF x JOM ls 08 2B Ble THM POS a B amp SS Crvucetie Line su e O 30 B fvector c pragma entry start X 31 oid start void initsct c 32 extern void initsct void sJ extern void _init void resetprg c 34 oid exit void Bl sample c 35 void Download modu 36 sample x30 st pragma section program interrupt Dependencies 38 cstartdef h 39 oid start void initsct h 40 o8ocs gt resetprg h 41 080C8 _isp_ amp istack_top ff set interrupt stack pointer sfr_r827 h 42 o80cCc prer 0x02 f f change protect mode register typedefine h 43 080D0 pmO 0x00 f f set processor mode register 44 O080D3 prer 0x00 f f change protect mode register 45 O080D6 _flg _F value_ set flag register 46 if __STACKSIZE _ 0 47 O60DAa _Sp_ stack_top set user stack pointer 45 endif 49 O80DE _sb_ 0x400 400H fixation Do not change 50 O80E2 intbh 0x00 f f set variable vector s address F b ONS E J5 sample c 9 2 resetprg c 4 ol ot al at 222 Communi
27. nt 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 specication or select Other Hest gt Finish Cancel Select the Toolchain Version CPU Series CPU Group and then press Next In this example R8C 27 Group is selected e Select the MCU ROM size and other related settings New Project 5 Setting the Contents of Files to be Generated 7x What kind of initialization routine would you like to create ROFI 32k Use Standard 17 0 Library UART 1 Use Heap Memory Heap Size oxen Generate main Function Ic source file Use OnChip Debugging Emulator Mone Firmware Address Size C wwork RAM Address Size c lt Back Next gt 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 foxs0 Interrupt Stack Pointer Stack Size 0x80 lt Back Next gt Finish Cancel Set the Stack Size and press Next g When the toolchain setting is complete the following screen is displayed New Project 4 5 Setting the Target System for Debugging f Eg MIBC ASE Fol SBe UART JMTBC REC Simulator External Debugger MI6C Family ROSO
28. s 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 C D me lt Q 5 Cc Q M16C R8C FoUSB UART Debugger User s Manual Renesas Microcomputer Development Environment System R8C Family R8C 2x Series Notes on Connecting R8C 2E R8C 2F Renesas Electronics Rev 1 00 2008 12 WWW Frenesas 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 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
29. sionM16C RSC FoUSB sample sample 1 Fa a E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E a E E a a E a E E E H E C source file 2 jt fvector c 3 FILE sample c E heap c 4 DATE Fri May 30 2008 El initsct c 5 DESCRIPTION main program file E intpra c 6 CPU GROUP 27 resetpra c s f 4 sample c 8 This file is generated by Renesas Project Generator Ver 4 12 wf H E Dependencies 9 cstartdef h amj Fa a a a a a a a a E a a a a a a a E E E a E E E E E a a a a a a a a initsct h 11 resetpra h al oid main void sfr_1827 h 13 B typedefine h 14 v5 16 4 4 I a l B sample c H ol or at at 2121 2 e Phase M16C Load Module Converter finished Build Finished 0 Errors O Warnings v TE gt Build Debug A _ Find in Files 1 Find in Files2 A Macro f Test A Version Control Ready fF F2 Fe FR Default desktop Read write 14 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 Mode Script MCU Refer LAN OO UP C USB Fort COM Baud Aate 38400 Monitor Debug O Start up for monitor debug Cancel Help Do not show this dialog box again r Select R8C Tiny Series Select MCU File Look in McuFiles eE Mi6c 20 Group M16C 26 Group lets e JM16C
30. t_r827 h Generate Makefile typedefine ol E gt iq a ja a B lt 5 fiemc 4 ol of al at 21 21 2 8 2 Phase M16C Load Module Converter finished Build Finished 0 Errors O Warnings IK Build A Debug A Find in Files 1 Find in Files2 A Macro Test A Version Control EE E2 E FR Default desktop Read write 77 7 INS 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 Configuration ey All Loaded Projects ee sar Options C finto dir CONFIGDIR A8C 22 e Set defined macro is displayed Enter UART_ in the Macro field and press OK Set defined macro Macro UART Replacement rea f To set the link option in the Renesas M16C Standard Toolchain window click on the Link tab and select Section Order from the Category pull down menu Add FirmArea_NE to the start address of the monitor program occupied area shown in Table 1 Renesas M16C Standard Toolchain Configuration C Assembly Link Librarian Lme RTOS cris l gt Debug X Category EEan E Address Section Ox00000400 C source file Assembly source file menna rom HE rom_ AO data_SE Options Link L r clib G MS 0 CONFIGDIRMEIPROJECT MAME 30 DADER
31. uct 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 these inaccuracies or errors Please also pay attention to information published by Renesas Technology Corporation and Renesas Solutions Corporation by various means including the Renesas home page http www renesas com When using any or all of the information contained in these materials including product data diagrams charts programs and algorithms please be sure to evaluate all information as a total system before making a final decision on the applicability of the information and products Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage liability or other loss resulting from the information contained herein Renesas Technology semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake Please contact Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor when considering the use of a product contained herein for any specific purposes such as apparatus or systems for transportation vehicular medical aerospace nuclear or undersea repeat

Download Pdf Manuals

image

Related Search

Related Contents

Telefunken DPF 7904  OKS 470 - INGSUMOS Ltda.  EK 60 UNV  Téléchargez la notice  CTC-140A - B & B Instruments, Inc.  Quick Start Guide - LW2002W Video baby monitor  ハンドシャワー  Testing Manual - Blogs@UMass Amherst    DOMEZBULB Z-Wave Dimmable LED Light Bulb Quick  

Copyright © All rights reserved.
Failed to retrieve file