5.7.4. BIGEND

If your system uses BIGEND, you must test that loads and stores, and thumb code executed in big-endian mode, are traced correctly. You can do this by running the test twice:

You can use the code shown in Example 5.1 to switch the BIGEND configuration bit in the system control coprocessor (CP15):

Example 5.1. Switching the BIGEND configuration bit

[	{ENDIAN} = "big"
; If the -bigend armasm flag has been used, set the BIGEND bit
; in CP15.
MRC	p15, 0, r0, c1, c0, 0
ORR	r0, r0, #(1<<7)
MCR	p15, 0, r0, c1, c0, 0

The code in Example 5.1 uses the ENDIAN assembler variable that is automatically defined when the arm assembler is called with the -bigend command line flag. If your system drives the BIGEND input to an ARM7TDMI or ARM9TDMI core using a memory mapped register, you must modify the code appropriately.


EtmCompare has a -BigEnd flag. This is required because EtmCompare can deal with tracing that is controlled by comparisons on the load and store data. The internal ETM data comparisons are affected by:

  • the way the memory system returns the data to the ARM

  • how the data masks in the ETM are programmed.

However, the code in Example 5.1 does not use this functionality, and it is unlikely to be necessary to add it to the test.

The example Makefile has an ENDIAN variable to correctly set the command line options on the arm assembler and the bin2hex scripts.

Copyright © 2000, 2001 ARM Limited. All rights reserved.ARM DDI 0158D