beautypg.com

2 flash/code space assignment, Flash/code space assignment – Maxim Integrated 78M6612 M-API Library User Manual

Page 12

background image

78M6612 M-API Library User Guide

UG_6612_036

12

Rev. 1.00

Metering

6K

Metrology functions (alarms, power factor, RMS, etc.)

Measurement

2K

Metrology computations

Serial Driver

1K

Serial 0/RS232 I/O

Timer

< 0.5K

Timer 0 driver.

Relay Management/Misc.

2K

Relay Control/On/Off, some math logic, IRQ.

3.3.2 Flash/Code Space Assignment

As shown in Table 1, in order to reserve specific regions of Flash for specific MAPI default data, CE code
and CE data, the build file of the firmware application must be setup to specify where the modules will
reside. It is necessary to keep images of CE code/data and default data isolated at the application’s build
file. The accompanying application code has setup these assignments as follows: Default data is at
starting address 0x7600. CE Data is at starting address 0x777E. CE Code is at starting address
0x77FE.

This information is represented in the mapped file (.M51) as follows:

SEGMENTS (?CO?DEFAULTS(C:0X7600),
?CO?CEIVIV200F0_1_DAT(C:0X777E),
?CO?CEIVIV200F0_1_CE (C:0X77FE))

The following figures show how the setup is done.