No Reset Vector Value in glo file?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

No Reset Vector Value in glo file?

510 Views
everkimage
Contributor IV

MCU is MC9S12XEQ512,compile the offical bootloader project and get one glo and one s19 file in the directory 'bin'.

In the project's prm file,I get source codes like:

VECTOR 0 _BootStart

VECTOR 1 _BootStart

VECTOR 2 _BootStart

In s19 file,i get the expected code:

S109FFFAF000F000F0002D

But in glo file,i get the unexpected code:

S20A7FFFFAF000F000F000AD

Description of PPAGE register in the datasheet,i get following words:

The fixed 16KB page from 0x4000~0x7FFF is the page number 0xFD;

The fixed 16KB page from 0xC000~0xFFFF is the page number 0xFF;

The 16KB page from 0x8000~0xBFFF mapped range is 0x780000~0x7FFFFF;

Upgrade processing use the glo file,but there is no Reset Vector Value(0xFFFA~0xFFFE) in glo file,how does this work?

Labels (1)
0 Kudos
2 Replies

393 Views
everkimage
Contributor IV

0x7FFFFA is Global Address.If ROMHM is 0,0xC000~0xFFFF will be mapped to 0x7FC000~0x7FFFFF.

Is it right?

0 Kudos

393 Views
kef2
Senior Contributor IV

ROMHM affects what is mapped to non banked 0x4000-0x7FFF, either flash page 0xFD or EEPROM.

Your glo file is correct. Global 0x7FFFFA corresponds to non banked 0xFFFA. The math for S12X flash is this:

global_address = page_offset + page_size * PPAGE + 0x400000

page_size = 0x4000

page_offset = 0xFFFA % page_size = 0xFFFA & (page_size-1) = 0x3FFA

PPAGE = 0xFF

For details, as well for what 0x400000 comes from look at Figure 3-12. PPAGE Address mapping. 0x400000 corresponds to bit22=1.

0 Kudos