beautypg.com

2 a limitation item about the c language – Renesas M16C FAMILY User Manual

Page 63

background image

5 Using the KD

5.2.2 A limitation item about the C language

When using Renesas C compiler. It is necessary to change a start up file (ncrt0.a30 and

sect30.inc).

(1) The change point of “ncrt0.a30”

(a) Initialize standard I/O

The UARTi setting is modified in the I/O initialization treatment. Therefore, to

ensure that the I/O initialization treatment is not called up, comment it out.

--> Applicable MCUs

All MCUs

(b) Reset treatment (after reset, this program will start)

The interrupt enable flag is cleared and communication is disabled after the

LDINTB instruction. Therefore, execute the interrupt enable setting immediately

after the LDINTB instruction.

--> Applicable MCUs

M16C/10, M16C/1N, M16C/62A(M), M16C/6N(M306NAFG, M306NABFC only)

M16C/24, M3062GF8N, M16C/80

(c) Variable Vector process (INTERRUPT VECTOR ADDRESS definition)

The initial setting of the relocatable vector table (variable vector table) will cause

the program to overlap with the monitor memory area. Set the address so that it

does not overlap with the memory area.

--> Applicable MCUs

All MCUs except R8C/Tiny

(2) The change point of “sect30.inc”

(a) UARTi receive interrupt vector address setting

The user must set the UARTi receive interrupt address for communication between

the monitor program and the debugger. Set the interrupts as indicated below

applicable MCUs.

--> Applicable MCUs

UART1 receive interrupt (FF900h): M16C/24, M16C/62A(M), M3062GF8N

M16C/6N(M306NAFG, M306NBFC only)

UART0 receive interrupt (FF900h): M16C/10, M16C/1N

UART1 receive interrupt (FFF900h): M16C/80

60