Advertisement

Quick Links

M16C R8C UART Debugger
16
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).
www.renesas.com
Rev.1.00 Feb 2011

Advertisement

Table of Contents
loading

Summary of Contents for Renesas M16C R8C UART Debugger

  • Page 1 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.
  • Page 2 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”...
  • Page 3 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.
  • Page 4: Table Of Contents

    Table of Contents Connecting the Target Board to the User System............5 Preparing the M16C R8C FoUSB/UART Debugger ............. 7 Memory Map When Using the R8C UART Debugger..........20 Monitor Program Occupied Area................. 20 Notes on Using the R8C UART Debugger..............21 5.1.
  • Page 5: Connecting The Target Board To The User System

    1. Connecting the Target Board to the User System Figure 1 Connecting the Target Board to the User System...
  • Page 6 Figure 2 Circuit Using the RS-232C Cable with the R8C/M11A Group. Figure 3 Circuit Using the RS-232C Cable with the R8C/M12A Group.
  • Page 7: Preparing The M16C R8C Fousb/Uart Debugger

    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. - “Create a new project work space”...
  • Page 8 Select “Create a new project workspace” and press [OK]. c) The Project Generator starts. When a toolchain is preinstalled, the following screen is displayed. ”Workspace Name” Enter a name to create a new workspace. “sample” has been input as an example. ”Project Name”...
  • Page 9 ” 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.
  • Page 10 e) Select the MCU ROM size and other related settings. Select the MCU ROM size and heap size. Select “None” for the on-chip debugging emulator. And press [Next]. Set the stack. Set the “Stack Size” and press [Next].
  • Page 11 g) When the toolchain setting is complete, the following screen is displayed. 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.
  • Page 12 Verify the file names to be generated. 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.
  • Page 13 Check the section address. Under the “Build” menu, select “Renesas M16C Standard Toolchain”. “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...
  • Page 14 m) Double-click the source program to launch the program editor. n) When the program is complete, under the “Build” menu, select “Build” or “Build All” to build the program.
  • Page 15 o) The result of the build is displayed. 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.
  • Page 16 q) The Init screen is displayed. Select the “Serial” radio button and press [Refer(ence)]. Select “R8C-Tiny Series”.
  • Page 17 s) Select one of the following MCU files depending on the group and memory size. Memory Group Size R8C/M11A R8C/M12A R5F2M112AUART.MCU R5F2M122AUART.MCU Note: 2-Kbyte memory size chips such as R5F2M110A and R5F2M120A are not supported. Select the appropriate ”Port” and ”Baud Rate” from the pull-down menus. Press [OK] to download the monitor program.
  • Page 18 u) To download a user program, select “Download File (X30 file)” in the “Download Modules” submenu under the “Debug” menu. v) To reset the user program, select “Reset CPU” under the “Debug” menu.
  • Page 19 w) The cursor moves to the top of the user program and debugging starts.
  • Page 20: Memory Map When Using The R8C Uart Debugger

    3. Memory Map When Using the R8C UART Debugger Figure 4 shows a memory map (8 KB). 00000h 0FFD8h Reserved 002FFh Undefined instruction 00400h Overflow Monitor RAM 004FFh BRK Instruction (2KB) User RAM 005FFh Address Match Single Step Watchdog Timer 0E000h Reserved User Program...
  • Page 21: Notes On Using The R8C Uart Debugger

    5. Notes on Using the R8C UART Debugger 5.1. Restarting the R8C UART Debugger After it is 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.
  • Page 22 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”.
  • Page 23 To add the compile option, select “Renesas M16C Standard Toolchain…” under the “Build” menu. d) “Renesas M16C Standard Toolchain” is displayed. Select “Defines” from the “Show Entries For” pull-down menu, and then press [Add…].
  • Page 24 “Set defined macro” is displayed. Enter “_UART_” in the “Macro” field and press [OK] 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 the following to the start address of the monitor program occupied area shown in Table 1.
  • Page 25: Frequency Characteristics

    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.
  • Page 26: Limitations On Stop Mode Or Wait Mode

    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.
  • Page 27: Executing Anomalistic Steps

    5.9. Executing Anomalistic Steps • 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 INT instruction is skipped over when performing step execution MAIN INT_3: Address at which program...
  • Page 28: Limitations On Peripheral Functions

    5.10. Limitations on Peripheral Functions UART0 is used for communication between the monitor program and the host computer. Do not use UART0 in the user program. Do not connect the pins below to other pins as they are used for communication with the host computer. •...
  • Page 29 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...
  • Page 30 SALES OFFICES 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...
  • Page 31 M16C R8C UART Debugger User’s Manual R20UT0540EJ0100 (Previous Number:REJ09B0567-0100)

Table of Contents