ARM Technical Support Knowledge Articles

ADS 1.1 ARMulator peripherals at addresses > 0x80000000

Applies to: ARM Developer Suite (ADS)

Answer

There is a bug in ADS 1.1 ARMulator which affects peripherals placed at high addresses beyond 0x80000000. Peripherals use ARMulif_ReadBusRange() to get their address base. Unfortunately, due to a coding error, this uses strtol(), which clips at 0x7fffffff, instead of strtoul(). Hence addresses > 0x80000000 give problems. This is fixed in ADS 1.2.

One workaround is to specify the address > 0x80000000 as a (signed) negative number, instead of an unsigned positive number, i.e.: in peripherals.ami , instead of changing:

Range:Base=0x0a800000
to:
Range:Base=0x84000000
use:
Range:Base=-2080374784
instead.

This is not be the most elegant solution, but it works!

The other (more elegant) workaround is to rebuild the peripheral model itself.

  1. Locate ADSARMulatearmulext imer.c

  2. Change line 130 from:
      err = ARMulif_ReadBusRange(&state->coredesc, state->hostif,
    ToolConf_FlatChild(config, (tag_t)"RANGE"),
    &state->my_bpar,
    0x0a800000,0x40,"");

    to:

      err = ARMulif_ReadBusRange(&state->coredesc, state->hostif,
    ToolConf_FlatChild(config, (tag_t)"RANGE"),
    &state->my_bpar,
    0x84000000,0x40,"");
  3. Rebuild the model as described in the documentation

  4. In peripherals.ami and peripherals.dsc , comment out the lines:
    Range:Base=0x0a800000
    The ARMulator will then take the base address from the timer.c file instead of the .ami or .dsc  files.

Article last edited on: 2008-09-09 15:47:28

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential