;---------------------------------------------------------------------- ; | ; | ; | ; DESCRIPTION : Section definition. (for Assembler language) | ; | ; | ; This file is generated by Renesas Project Generator. | ; | ;---------------------------------------------------------------------- ;/********************************************************************* ;* ;* Device : R8C/Mx ;* ;* File Name : sect30.inc ;* ;* Abstract : Section definition ;* ;* History : 1.00 (2011-02-01) ;* ;* NOTE : THIS IS A TYPICAL EXAMPLE. ;* ;* Copyright (C) 2011 Renesas Electronics Corporation. and ;* Renesas Solutions Corp. All rights reserved. ;* ;*********************************************************************/ ;===================================================================== ; ; Definition of section ; ;--------------------------------------------------------------------- ; Near RAM data area ;--------------------------------------------------------------------- ; SBDATA area .section data_SE,DATA,ALIGN .section bss_SE,DATA,ALIGN .section data_SO,DATA .section bss_SO,DATA ; SBDATA area definition ; Sets the top address (__SB__) of the SBDATA area ; (it is accessing area to used the SBrelative addressing mode). .glb __SB__ __SB__ .equ 400H ; near RAM area .section data_NE,DATA,ALIGN .section bss_NE,DATA,ALIGN .section data_NO,DATA .section bss_NO,DATA ;--------------------------------------------------------------------- ; Stack area ;--------------------------------------------------------------------- .if __STACKSIZE__ != 0 .section stack,DATA,ALIGN .blkb __STACKSIZE__ .endif .section istack,DATA,ALIGN .blkb __ISTACKSIZE__ ;--------------------------------------------------------------------- ; heap section ;--------------------------------------------------------------------- .if __HEAPSIZE__ != 0 .section heap_NE,DATA,ALIGN .blkb __HEAPSIZE__ .endif ;--------------------------------------------------------------------- ; Initial data of 'data' section ;--------------------------------------------------------------------- .section data_SEI,ROMDATA .section data_SOI,ROMDATA .section data_NEI,ROMDATA .section data_NOI,ROMDATA ;--------------------------------------------------------------------- ; variable vector section ;--------------------------------------------------------------------- .section vector,ROMDATA,ALIGN ; When you use "#pragma interrupt" with "vect=", ; you need not define interrupt vector. ; ; When you use "#pragma interrupt" without "vect=", ; you must define all interrupt vectors like the following example. ; You define dummy_int for interrupt vector not used. ; ; .lword dummy_int ; vector 0 ; .lword dummy_int ; vector 1 ; .lword dummy_int ; vector 2 ; : ; .lword dummy_int ; vector 63 ;--------------------------------------------------------------------- ; fixed vector section ;--------------------------------------------------------------------- .section fvector,ROMDATA .org 0ffd8H ; reserved .addr 0FFFFFFH ; OFS2 .byte 0FFH UDI: .lword dummy_int OVER_FLOW: .lword dummy_int BRKI: .lword dummy_int ADDRESS_MATCH: .lword dummy_int SINGLE_STEP: .lword dummy_int WDT: .lword dummy_int ; reserved .lword dummy_int ; reserved .lword dummy_int RESET: .lword start ;===================================================================== ; ID code & Option function select register ;--------------------------------------------------------------------- ; ID code check function .id "#FFFFFFFFFFFFFF" ; option function select register .ofsreg 0FFH ;--------------------------------------------------------------------- ; far ROM data area ;--------------------------------------------------------------------- ; .section data_FEI,ROMDATA ; .section data_FOI,ROMDATA ;===================================================================== ; Initialize Macro declaration ;--------------------------------------------------------------------- N_BZERO .macro TOP_ ,SECT_ mov.b #00H, R0L mov.w #(TOP_ & 0FFFFH), A1 mov.w #sizeof SECT_ , R3 sstr.b .endm N_BCOPY .macro FROM_,TO_,SECT_ mov.w #(FROM_ & 0FFFFH),A0 mov.b #(FROM_ >>16),R1H mov.w #TO_ ,A1 mov.w #sizeof SECT_ , R3 smovf.b .endm