Skip to content

Commit a45138f

Browse files
committed
fix: place trace.log in root directory
1 parent 148b58c commit a45138f

4 files changed

Lines changed: 19 additions & 13 deletions

File tree

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ It currently supports the following ESP microcontrollers:
3737

3838
## Features
3939
- GUI flashes either
40-
- an [esp-idf](https://github.com/espressif/esp-idf) build folder
40+
- an [ESP-IDF](https://github.com/espressif/esp-idf) build directory
4141
- a [flasher_args.json](https://github.com/espressif/esp-idf/blob/master/components/esptool_py/flasher_args.json.in) file
4242
- a .zip archive
4343
- single/multiple loose binaries
@@ -49,20 +49,21 @@ Most options are supported equally by CLI and GUI. The following table contains
4949
| Option | Description |
5050
| --------------- | --------------------------------------------------------------- |
5151
| `-c`, `--chip` | Target chip type |
52-
| `-p`, `--port` | Serial port baud rate |
52+
| `-p`, `--port` | Serial port device |
53+
| `-b`, `--baud` | Serial port baud rate |
5354
| `--before` | What to do before connecting to the chip |
5455
| `-a`, `--after` | What to do after QtESPFlasher is finished |
5556
| `--no-stub` | Disable launching the flasher stub, only talk to ROM bootloader |
5657
| `-t`, `--trace` | Enable trace-level output of QtESPFlasher interactions |
57-
| `-l`, `--list` | List all available serial interfaces |
58+
| `-l`, `--list` | List all available serial devices |
5859

59-
The following screenshot shows the GUI options.
60+
And this screenshot shows how the options are displayed in the GUI.
6061
![options](data/images/options.png)
6162

6263
### Reset modes
6364
By default, QtESPFlasher tries to hard reset the chip into bootloader mode before it starts and hard resets the chip to run the normal program once it is complete. The `--before` and `--after` options allow this behavior to be changed.
6465

65-
#### Reset before operation
66+
#### Reset before operation
6667
The `--before` argument allows you to specify whether the chip needs resetting into bootloader mode before QtESPFlasher talks to it.
6768
- `--before default_reset` is the default, which uses DTR & RTS serial control lines to try to reset the chip into bootloader mode.
6869
- `--before no_reset` will skip DTR/RTS control signal assignments and just start sending a serial synchronization command to the chip. This is useful if your chip doesn't have DTR/RTS, or for some serial interfaces (like Arduino board onboard serial) which behave differently when DTR/RTS are toggled.
@@ -76,7 +77,7 @@ The `--after` argument allows you to specify whether the chip should be reset af
7677
The `--no-stub` option disables uploading of a software "stub loader" that manages flash operations, and only talks directly to the loader in ROM.
7778

7879
### Trace
79-
QtESPFlasher has a `--trace` option which can be supplied in the first group of arguments (before the command). This will dump all traffic sent and received via the serial port to a log file next to the executable called `trace.txt`.
80+
QtESPFlasher has a `--trace` option which can be supplied in the first group of arguments (before the command). This will dump all traffic sent and received via the serial port to a log file called `trace.txt` in the application root directory.
8081

8182
### Chip type
8283
The target chip type can be selected using the `-c`, `--chip` option. If no `-c` option is specified, QtESPFlasher automatically detects the chip type when connecting.
@@ -85,7 +86,7 @@ The target chip type can be selected using the `-c`, `--chip` option. If no `-c`
8586
The serial port is selected using the `-p`, `--port` option. If no `-p` option is specified, QtESPFlasher will enumerate all connected serial ports and try each one until it finds an Espressif device connected.
8687

8788
### Baud rate
88-
The default QtESPFlasher baud rate is 115200. Slower rates may be set using `-b`, `--baud`. It is recommend to only set the baud rate if you're experiencing transmission errors during flashing. If left at default QtESPFlasher tries to change the baud rate to 460800 when running.
89+
The default QtESPFlasher baud rate is 115200. Slower rates may be set using `-b`, `--baud`. It is **recommend** to only set the baud rate if you're experiencing transmission errors during flashing. If left at default QtESPFlasher tries to change the baud rate to 460800 when running to considerably reduce flash times.
8990

9091
## Usage
9192
### CLI
@@ -124,11 +125,16 @@ Done
124125
```
125126

126127
### GUI
127-
#### Add folder
128-
![usage add dir](data/images/usage_add_dir.gif)
128+
QtESPFlasher offers a few different ways to select binaries for flashing.
129129

130-
#### Add binaries
131-
![usage add bin](data/images/usage_add_bin.gif)
130+
#### Add directory
131+
The build directory of an ESP-IDF project can be selected directly using the ![folder open](data/images/folder_open.png) symbol. ESP-IDF builds generate a file called flasher_args.json which contains project flash information in JSON format. This file is red by QtESPFlasher to obtain all of the projects binaries and their offsets.
132+
![usage add dir](data/images/usage_add_dir.gif)
132133

133134
#### Add .zip archive
134-
![usage add zip](data/images/usage_add_zip.gif)
135+
A zipped ESP-IDF build directory can also be selected directly using the ![file](data/images/file.png) symbol. The .zip file must contain a flasher_args.json file, just like when adding a directory.
136+
![usage add zip](data/images/usage_add_zip.gif)
137+
138+
#### Add binaries
139+
If there is no flasher_args.json file available, binaries can also be added directly. This is done by selecting .bin files with the ![file](data/images/file.png) symbol. Please note that in this case the offset must be entered **manually**. Offsets in the C language convention, such as “0x” for base 16 or “0b” for base 2, are supported.
140+
![usage add bin](data/images/usage_add_bin.gif)

data/images/file.png

302 Bytes
Loading

data/images/folder_open.png

364 Bytes
Loading

src/esp_flasher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ void EspFlasher::transfer_debug_print(uint8_t const* data,
509509
if (_trace != "trace") return;
510510

511511
static auto const log_path{
512-
QCoreApplication::applicationDirPath().toStdString() + "/trace.txt"};
512+
QCoreApplication::applicationDirPath().toStdString() + "/../trace.log"};
513513
static auto fd{fopen(log_path.c_str(), "w")};
514514
static gsl::final_action close{[&fd] { fclose(fd); }};
515515

0 commit comments

Comments
 (0)