Chapter 9 Separate ROMs
- 146 -
9.1 How to Form Separate ROMs
This chapter describes how to form the MR308's kernel and application programs into separate ROMs.
Figure 9.1 shows an instance in which the sections common to two different applications together with the ker-
nel are allocated in the kernel ROM and the applications are allocated in separate ROMs.
Here is how to divide a ROM based on this example.
1. System configuration
Here you set up a system configuration of application programs.
Here, descriptions are given on the supposition that the system configuration of two application pro-
grams is as shown below.
Application 1 Application 2
The number of Tasks 4 5
The number of Eventflags 1 3
The number of Semaphores 4 2
The number of Mailboxes 3 5
The number of Fixed-size memory pools 3 1
The number of Cyclic handlers 3 3
2. Preparing configuration files
You prepare configuration files based on the result brought by setting up the system configuration. In
this instance, you need to make the following two items you set in the maxdefine definition division
common to two configuration files. You specify the greater of the two numbers of definitions as to the
respective applications for a value to be set in the maxdefine definition division.
e.g.
maxdefine{
max_task = 5;
max_flag = 3;
max_sem = 4;
max_mbx = 5;
max_mpl = 3;
max_cyh = 3;
};
Other definitions, though different from each other between two configuration files, raise no problem.
3. Changing the processor mode register
You change the processor mode register for a startup program in compliance with the system.
4. Preparing application programs
You prepare two application programs.
5. Locating respective sections
Programs to be located in the kernel ROM and in the application ROM are given below.
Programs to be located in the kernel ROM
Startup program (MR_KERNEL section)
MR308's kernel(MR_KERNEL section)
Programs common to two applications(program section)
Fixed interrupt vector area(FIX_INTERRUPT_VECTOR section)