added scratch buffer section

This commit is contained in:
Robin Müller 2021-07-22 11:41:55 +02:00 committed by Robin Mueller
parent 69855bb316
commit c5a53abacc

View File

@ -591,6 +591,20 @@ Eclipse indexer.
# Q7S Utilities and Troubleshooting # Q7S Utilities and Troubleshooting
## Core commands
Display currently running image:
```sh
xsc_boot_copy
```
Rebooting currently running image:
```sh
xsc_boot_copy -r
```
## pa3tool Host Tool ## pa3tool Host Tool
The `pa3tool` is a host tool to interface with the ProASIC3 on the Q7S board. It was The `pa3tool` is a host tool to interface with the ProASIC3 on the Q7S board. It was
@ -612,6 +626,40 @@ cat /tmp/test.txt
For more useful combinations, see this [link](https://www.freecodecamp.org/news/the-cat-command-in-linux-how-to-create-a-text-file-with-cat-or-touch/). For more useful combinations, see this [link](https://www.freecodecamp.org/news/the-cat-command-in-linux-how-to-create-a-text-file-with-cat-or-touch/).
## Using the scratch buffer of the ProASIC3
The ProASIC3 has a 1024 byte scratch buffer. The values in this scratch buffer will survive
a reboot, so this buffer can be used as an alternative to the SD cards to exchange information
between images or to store mission critical information.
You can use `xsc_scratch --help` for more information.
Write to scratch buffer:
```sh
xsc_scratch write TEST "1"
```
Read from scratch buffer:
```sh
xsc_scratch read TEST
```
Read all keys:
```sh
xsc_scratch read
```
Get fill count:
```sh
xsc_scratch read | wc -c
```
## Using `system` when debugging ## Using `system` when debugging
Please note that when using a `system` call in C++/C code and debugging, a new thread will be Please note that when using a `system` call in C++/C code and debugging, a new thread will be
@ -695,20 +743,6 @@ Reading data from CAN:
candump can0 candump can0
```` ````
## Useful Q7S Linux Commands
Display currently running image:
```sh
xsc_boot_copy
```
Rebooting currently running image:
```sh
xsc_boot_copy -r
```
## Preparation of a fresh rootfs and SD card ## Preparation of a fresh rootfs and SD card
This section summarizes important changes between a fresh rootfs and the current This section summarizes important changes between a fresh rootfs and the current