*
*Home|Chinese|Japanese*About ARM|Forums|Events|News|Employment|Contact Us|Investors*
dotted rule
*ARM - the architecture for the digital worldARM - the architecture for the digital world
search
*
*
***
*MARKETS:PRODUCTS & SOLUTIONS:CONNECTED COMMUNITY:TECHNICAL SUPPORT:DOCUMENTATION*
*
technical support
*
*
****
*.Technical Support
*
*
*>>Home Page*
*
*.Obtaining Support*
*
*.FAQs*
*
**Development Tool FAQs*
**IP FAQs*
**Embedded Software FAQs*
**Artisan Physical IP FAQs (Login Required)*
*
*.Downloads*
*
*.Documentation*
*
*.Training*
*
*.Where To Buy*
*
*.Keil MCU Tools*
*
*.What's New*
*
*.ARM Newsgroups*
*
*.Active Assist On-site Services*
*
*
*
technical support FAQsask ARM*
*

Technical Support Search
*     (Advanced Search)
  FAQs   Documentation   Downloads   Forums

*

 
downarrowRead/write bytes/shorts to memory with armsd or ADW
Applies to: ADW/ADU/armsd, Software Development Toolkit (SDT)

The following applies to SDT 2.11 and SDT 2.50/2.51 only (broken in SDT 2.11a) .

Description
By default, when you specify a write to memory, a word value is used.
Thus when you write:

let 0x8000 = 0x01 

armsd/ADW will transfer a word (4 bytes) to memory starting at the address 0x8000. The bytes at 0x80010x8002 and 0x8003 will be zeroed.

Solution
To write only a single byte, you must tell armsd/ADW that a byte transfer is required.
You can do this with:

let *(char *)0x8000 = value 

Similarly, to read a byte from an address use:

print /%x *(char *)0x8000 

where '/%x' means 'display in hexadecimal'.

You can also read and write half-word 'short' values in a similar way, i.e.

let *(short *)0x8000 = value
print /%x *(short *)0x8000

You can also use ADW's View->Variables->Expression window to display memory in bytes or shorts.

For example, for bytes, enter '*(char *)0x8000' in the 'View Expression' box.
For example, for shorts, enter '*(short *)0x8000' in the 'View Expression' box.
To display in hex, right-mouse click on the window, select 'Change Window Format' and enter '%x'.

ADW 2.50/2.51 allows an area of memory to be read/viewed in word/halfword/byte format in the Memory Window (right-mouse-click in the memory window), however, in-place editing of the contents of memory in this window always results in a word write (STR).






back to top

*
**
*4 dots*Other ARM Websites
*
shadow *LEGAL STATEMENTshadow