Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
MAEC TOOL NEWS: MAECT-PD32R-010516D

PD32R
Precaution

Please take note of the following problem in using emulator debugger PD32R for the M32R family of microcomputers:
  • On setting pre-execution PC breakpoints


  1. Versions Concerned
    PD32R V.1.00 Release 1 -- V.2.00 Release 2


  2. Description
    If execution of target programs are halted at pre-execution PC breakpoints, the value of the BPC Register may become incorrect.
    This symptom specifically appears when emulators are used for debugging.

    2.1 Conditions
    This problem occurs if the following two conditions are satisfied:
    (1) The target MCU belongs to any of the following groups and series:
    • the 32120 group
    • the 32121 group
    • the 32102 group
    • the M32R/I series
    (2) The execution of the target program has been halted at the pre-execution PC breakpoint set at the address of an RTE instruction.

    2.2 Example
    When the target program shown in the example below is executed in the following steps, the BPC register is not loaded with the specified (RIGHT) value but keeps the previous (WRONG) one. Since the RTE instruction makes the program jump to the address indicated by the BPC register, the program branches to the wrong address, resulting in incorrect execution.
    (1) A pre-execution PC breakpoint is set at address 100A of an RTE instruction.
    (2) The BPC register is loaded with a value of H'3000.
    (3) The target program starts from address 1000.
    (4) The execution of the target program is halted when the pre-execution PC breakpoint set at address 100A is reached.
    [Example of a target program:]
       ---------------------------------------
       ADDRESS  CODE
       1000     NOP
       1002     NOP
       1004     LD24 R1,#H'002000
       1008     MVTC R1,BPC
       100A     RTE               <-- A pre-execution PC breakpoint set
       ---------------------------------------
    The RIGHT value of the BPC register: H'2000
    The WRONG value of the BPC register: H'3000


  3. Workaround
    Set any breakpoint other than the pre-execution PC one at the address of the RTE instruction.





© 2008. Renesas Technology Corp., All rights reserved. Privacy | Legal