# Tools

**Skip the following step if you already enabled and updated the repository.**

### Enable and Update the DeGirum repository

{% stepper %}
{% step %}
Install prerequisites:

{% code overflow="wrap" %}

```bash
 sudo apt install curl
```

{% endcode %}
{% endstep %}

{% step %}
Download DeGirum public key:

* Ubuntu 20.04:

{% code overflow="wrap" %}

```bash
wget -O - -q http://assets.degirum.com/apt-repo/DeGirum.gpg.key | sudo apt-key add -
```

{% endcode %}

* Ubuntu 22.04 and Ubuntu 24.04:

{% code overflow="wrap" %}

```bash
curl -fsSL http://assets.degirum.com/apt-repo/DeGirum.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/degirum.gpg
```

{% endcode %}
{% endstep %}

{% step %}
Add the DeGirum software repository to your APT sources:

* Ubuntu 20.04:

{% code overflow="wrap" %}

```bash
echo deb [arch=amd64,arm64] https://assets.degirum.com/apt-repo ORCA main | sudo tee -a /etc/apt/sources.list
```

{% endcode %}

* Ubuntu 22.04 and Ubuntu 24.04:

{% code overflow="wrap" %}

```bash
echo deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/degirum.gpg] https://assets.degirum.com/apt-repo ORCA main | sudo tee -a /etc/apt/sources.list
```

{% endcode %}
{% endstep %}

{% step %}
Update package information from configured sources:

{% code overflow="wrap" %}

```bash
 sudo apt update
```

{% endcode %}
{% endstep %}
{% endstepper %}

### Installation procedure for ORCA utilities

{% stepper %}
{% step %}
Download and install DeGirum tools package:

{% code overflow="wrap" %}

```bash
sudo -E apt install dgotools-dg
```

{% endcode %}
{% endstep %}
{% endstepper %}

This installs the **dgopwc**, **dgoinfo**, and **qflup** utilities.

## **dgoinfo** - DeGirum ORCA info

### Description

**dgoinfo** prints information about ORCA devices. If no board is specified, the utility lists all detected boards.

### Parameters

**dgoinfo** **command** \[options]

{% code overflow="wrap" %}

```bash
Available commands:
 hw    - Print out information about hardware
 fw    - Print out information about firmware
 pwr   - Print out information about power control
 stats - Print out information about device statistic
 all   - Print out all above information (Default command)
```

{% endcode %}

### Options

**-b** *bus*, **--bus**=*bus* Device bus address: part of **B**DF for PCIe device, USB Controller / Hub Path for USB device.

**-d** *dev*, **--dev**=*dev* Device address on a bus: part of B**D**F for a PCIe device, or the USB connection device address.

**-p** *port*, **--port**=*port* Device port on a USB bus: N/A for PCIe device, the USB controller or hub port address.

**-n** *number*, **--ndev**=*number* \[=0 by default] If previous parameters matched multiple devices (for example, only the bus was specified) or nothing was specified, then *number* selects the device in the OS-specific order.

### Sample run

{% code overflow="wrap" %}

```bash
dgoinfo all
```

{% endcode %}

{% code overflow="wrap" %}

```bash
Device 0:
USB and M.2 PCIe device: 0 BDP 2:22-1 with DDR
Board info: HVS00014(A1/01): 00002090.
Firmware ver: 0x101000f-0xc153155. Heartbeat: 00000005 secs.
Temperature: 41C, Frequency: AISS 250MHz, CPU 250MHz, DDR 1333MHz. Power profile: hi.
Device use: 0%. No failures.
```

{% endcode %}

## **dgopwc** - DeGirum ORCA power control

### Description

**dgopwc** is a utility to set/get power parameters on ORCA device with PCIe/USB interfaces.

### Parameters

**dgopwc** **command** \[options]

{% code overflow="wrap" %}

```bash
Available commands:
get						- Get ORCA power control parameter
set						- Set ORCA power control parameter

Available command get/set items:
temp					- temperature (get only)
freq					- Current frequency of AISS (get only)
freq aiss				- Current frequency of AISS (get only)
freq cpu				- Current frequency of CPU (get only)
profile					- ORCA power control profile (lo/mid/hi)

Advanced user items:
freq aiss idle			- AISS idle frequency
freq aiss active		- AISS active frequency
freq aiss fp			- AISS Floating-point frequency
freq cpu idle			- CPU idle frequency
freq cpu active			- CPU active frequency
temp threshold hi		- Temperature threshold high
temp threshold lo		- Temperature threshold low
temp threshold crt		- Temperature threshold critical
timeout idle			- Timeout to switch in idle mode in no activity (in ms)
timeout throttling		- Timeout to apply chip throttling after previous check (in ms)
block ddr_lp_mode		- Allow low power mode of DDR
state ddr_lp_mode		- State of low power mode of DDR (get only)
```

{% endcode %}

### Common options

**-b** *bus*, **--bus**=*bus* Device bus address: part of **B**DF for PCIe device, USB Controller / Hub Path for USB device.

**-d** *dev*, **--dev**=*dev* Device address on a bus: part of B**D**F for a PCIe device, or the USB connection device address.

**-p** *port*, **--port**=*port* Device port on a USB bus: N/A for PCIe device, the USB controller or hub port address.

**-n** *number*, **--ndev**=*number* \[=0 by default] If previous parameters matched multiple devices (for example, only the bus was specified) or nothing was specified, then *number* selects the device in the OS-specific order.

**-S**, **--sua** \[user by default] Super user access.

### Sample run

{% code overflow="wrap" %}

```bash
dgopwc get freq 
250MHz
dgopwc get temp 
29C
```

{% endcode %}

## **qflup** - QSPI flash updater

### Description

**qflup** is a utility for erasing, reading, checking, updating firmware image on QSPI flash on ORCA device with PCIe/USB interfaces.

### Parameters

**qflup** **command** \[options]

### Available commands:

{% code overflow="wrap" %}

```bash
update - update a firmware image on the flash
read   - read a data from the flash
check  - check the firmware in the flash
```

{% endcode %}

### Common options

**-b** *bus*, **--bus**=*bus* Device bus address: part of **B**DF for PCIe device, USB Controller / Hub Path for USB device.

**-d** *dev*, **--dev**=*dev* Device address on a bus: part of B**D**F for a PCIe device, or the USB connection device address.

**-p** *port*, **--port**=*port* Device port on a USB bus: N/A for PCIe device, the USB controller or hub port address.

**-n** *number*, **--ndev**=*number* \[=0 by default] If previous parameters matched multiple devices (for example, only the bus was specified) or nothing was specified, then *number* selects the device in the OS-specific order.

**-y**, **--yesall** Confirm 'yes' for questions about any change data operations.

### **Update** command parameter and options:

**qflup** **update** *fw\_image\_path* \[ \[-s|--size=*size*] | \[-m|--md5=1] | \[-N|--noverif=1] ]

**fw\_image\_path** Path to file with new firmware image.

**-s** *size*, **--size**=*size* \[=0 by default] Firmware image size to update. If not specified or set to zero, the size of the firmware image file is used.

**-m**, **--size** \[no by default] Calculate the MD5 checksum for the written block of firmware and print it. If not specified, the tool prints nothing.

**-N**, **--noverif** \[verify by default] Skip firmware writing verification. If not specified, the tool verifies the written data.

### Sample run updating firmware image in the device with bus number 3:

{% code overflow="wrap" %}

```bash
qflup update ~/Downloads/orca-1.1.fi -b 3
The operation is safe. Are you sure you want to update the firmware? (y/N): y
Check existing firmware:..
Found firmware v1.1.1-8a0e2b3 at 0x3000 with size about 0x2200
Write FW to address 0
Writing 0x123c bytes to flash at address 0x4
Please wait some time:....complete
MD5 hash: 690e79e0fa5239efff0f5383a3ac3d83
Read data back:..complete
Compare data...complete
Written data matched read back data
Activate Firmware at address 0
```

{% endcode %}

### **Read** command options:

**qflup** **read** \[ \[*output\_file\_path*] | \[-a|--address=*address*] | \[-s|--size=*size*] ]

**-a** *address*, **--size**=*address* \[=0 by default] Start *address* in the flash to read.

**-s** *size*, **--size**=*size* \[=1MB by default] Size of the area to read. If not specified, it defaults to 1MB. If the size is 0, it uses the full flash size. The data is written to the file specified by *output\_file\_path* or printed to the console.

### Sample run (reading a part of the flash from device with bus address 3)

{% code overflow="wrap" %}

```bash
qflup read -b 3 -a 3000 -s 100 | hexdump -C
00000000  f1 ca 61 de f0 00 00 00  00 00 00 00 00 00 00 00  |..a.............|
00000010  ae 15 b7 11 3b 59 54 9c  d1 76 7f ba b0 a9 5b a3  |....;YT..v....[.|
00000020  43 5b 16 47 b5 ff eb 43  48 49 da 33 c8 1e 96 c3  |C[.G...CHI.3....|
00000030  09 00 00 40 00 00 00 00  00 00 00 00 00 00 00 00  |...@............|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000060  00 00 00 00 01 00 01 01  b3 e2 a0 08 00 32 00 00  |.............2..|
00000070  00 00 02 00 f4 0e 00 00  65 96 af 1a 81 ca 84 20  |........e...... |
00000080  fe 63 d1 5f df 5c e4 0d  82 4a cb 9a 68 50 c0 02  |.c._.\...J..hP..|
00000090  20 0c 91 8c f7 6a d6 f9  00 00 04 00 48 01 00 00  | ....j......H...|
000000a0  48 44 f1 58 c7 7d 20 3a  56 07 e5 90 3b 08 1e 4d  |HD.X.} :V...;..M|
000000b0  70 b4 63 fd e1 1b c8 df  64 1e ac c2 9e e9 70 b3  |p.c.....d.....p.|
000000c0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000100
```

{% endcode %}

### **Check** command options:

**qflup** **check** \[ \[-a|--address=*address*] | \[-s|--size=*size*] ]

**-a** *address*, **--size**=*address* \[=0 by default] Start *address* in the flash to read.

**-s** *size*, **--size**=*size* \[=0 by default] *Size* of checking area. If size is not specified it is set to board defined flash size. If firmware image is found on the flash and the image is valid for this tool the tool will print out the version of found firmware.

### Sample run of checking firmware in the flash from device with bus address 4:

{% code overflow="wrap" %}

```bash
qflup check -b 4
Check existing firmware:..
Found firmware v1.1.1-8a0e2b3 at 0x14000 with size about 0x2200
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.degirum.com/orca/tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
