Skip to main content
Knowledgebase
Home
Renesas India - Knowledgebase

How to rewrite M3T-ICC740 using the code that controls MCU?

Latest Updated:09/11/2006

Question:

How do I set the ID code that controls MCU Flash memory rewrites in M3T-ICC740?

Answer:

  1. To set the ID code: describe the ID code in an assembly language file.
    Example:

    Add the following lines to the assembly language file (xxx.s31).

    (1) Declare a new ID_CODE segment.
    (the area from RSEG ID_CODE to END in the example)

    (2) Set any value as the ID that will remove the ROM code protect from the BYTE operand
    (from ID1 to ID7 in the example)

    (3) Refer to the MCU data sheet for details concerning the BYTE operand value for lines containing “ROM code protect” as a comment.

    Example:
    
    -------------------------------------
    
       . . . . . . . . . . . .
    
        RSEG    ID_CODE
    
        BYTE    00      ; ID1
    
        BYTE    00      ; ID2
    
        BYTE    00      ; ID3
    
        BYTE    00      ; ID4
    
        BYTE    00      ; ID5
    
        BYTE    00      ; ID6
    
        BYTE    00      ; ID7
    
        BYTE    00      ; ROM code protect
    
        END
    
       . . . . . . . . . . . .
    
    -------------------------------------
    

     
  2. In link command file "lnk740.xcl", add a line declaring the address area for the ID_CODE segment after line -Z(CODE)RCODE… (where the top address of the ROM area is set).
    Note: Refer to the MCU data sheet for ROM code protect areas.
    Example:
    
    -------------------------------------
    
       . . . . . . . . . . . .
    
      -Z(CODE)RCODE,Z_CDATA,N_CDATA,C_ICALL,C_RECFN,CSTR,CCSTR,CODE,CONST=C080-FEFF
    
      -Z(CODE)ID_CODE=FFD4-FFDB
    
       . . . . . . . . . . . .
    
    -------------------------------------
    
Suitable Products