beautypg.com

Figure 9.1 rom separate – Renesas 70 User Manual

Page 157

background image

Chapter 9 Separate ROMs

- 147 -

App_prog

MR_CIF

MR_ROM

program

MR_KERNEL

kernel ROM

(Internal ROM)

Application ROM1

App_prog

MR_CIF

MR_ROM

Startup

Program

MR308 kernel

Task of ID=1

Fix Interrupt

Vector area

MR308’s ROM

data

C language I/F routine

Interrupt vector area

Task4

Task3

MR308’s ROM

data

C language I/F routine

Interrupt vector area

Task3

Task2

application change

Use Function
: Mailbox
: Eventflag
: semaphore
Number of Task5

Task2

Task1

Use Function
: Mailbox
: Eventflag
Number of Task4

Task4

Application ROM2

Figure 9.1 ROM separate

Programs to be located in the application ROM

♦ MR308's ROM data (the MR_ROM section)

♦ C language I/F routines (the MR_CIF section)

♦ Application

programs

(the app_prog section)

♦ Interrupt vector area (the INTERRUPT_VECTOR section)

How to locate individual programs is given below.

♦ Changing the section name of user program
In dealing with application programs written in C language, you change the section name of the pro-
grams to be located in the application ROM by use of #pragma SECTION as shown below. In
NC308WA, the section name of user program, if not given, turns to program section. So you need to
assign a different section name to the task you locate in the application ROM.

64

#pragma SECTION program app_prog/* Changing section of program */

/* The section names of task2 and task3 turn to app_prog */

void task2(void){

:

}


void task3(void){

:

}

♦ Locating

sections

64

You need not change the names of sections for tasks to be located int the kernel ROM.