[Icc-mot] Wrong Addresses Generated!! Unusable Code!

Gene Norris genenorris at spotengineering.com
Sat Apr 14 09:51:41 PDT 2007


Richard,

Here's a simple program:

void my_function(void);
void boot(void);

#pragma abs_address:0xC800
void main(void)
{
    my_function();
}

void my_function(void)
{
  return;
}
#pragma end_abs_address

Map file
        Addr  Global Symbol
       -----  --------------------------------
        C800  _main
        C805  $_my_function
Everything looks good so far...

Now what gets generated is unusable

            ; void main(void)
  C800            ; {
  C800                   .dbline 9
  C800            ;    my_function();
  C800  4A880503          xcall $_my_function
  C804                   .dbline -2

The extended call actually breaks down like this:
4A     call
8805   address
03     page

page 3 unfortunately does not exist (0x20 - 0x3F) and the program goes 
there anyway....
Since this is the last page, 3F should be used with address 8805
or _any_ valid page with address C800

Could you look at this Richard?

MC9S12Dx512, expanded memory, paged functions default, s2 linear

-- 
Gene Norris
Chief Engineer

SPOT Engineering, Inc.
1261 Campground Road
Lancaster, Ohio 43130
740.654.0880
FAX.654.0889

http://www.spotengineering.com/



More information about the Icc-mot mailing list