Skip to content

Commit

Permalink
[add] 添加readme
Browse files Browse the repository at this point in the history
  • Loading branch information
luanxg committed Apr 7, 2021
1 parent 9b60d30 commit 890f42f
Showing 1 changed file with 54 additions and 1 deletion.
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,54 @@
# devmem
## devmem

RT-Thread 上的 MCU/CPU 读写内存/寄存器的小工具,在menuconfig里选中软件包后,在msh上输入`devmem`查看使用说明。

```
msh />devmem
Usage: devmem address [type [data]]
address : memory address to act upon
type : access operation type : [b]yte, [h]alfword, [w]ord
data : data to be written
```
### 写内存/寄存器

#### byte方式写入

```
devmem 0x600a4000 b 0xa
```

#### halfword方式写入

```
devmem 0x600a4000 h 0xab
```

#### word方式写入

```
devmem 0x600a4000 w 0xabcd
```

### 读内存/寄存器

#### byte方式读取

```
msh />devmem 0x600a4000 b
0x0a
```

#### halfword方式读取

```
msh />devmem 0x600a4000 h
0x00ab
```

#### word方式读取

```
msh />devmem 0x600a4000 w
0x0000abcd
```

0 comments on commit 890f42f

Please sign in to comment.