Skip to content

Commit

Permalink
updated docs + dw-server for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
felias-fogg committed Jan 6, 2025
1 parent 757cb71 commit fb64149
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/quickstart-AVR-GDB.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,13 @@ The `dw-server.py` script will discover the serial port of the hardware debugger

If something does not work as advertised, it is often a simple wiring problem. Other possible sources of errors are installation errors, i.e., that a program is not installed at the right place, does not have the proper permissions, the PATH variable is incorrect, or one has installed the wrong board manager files. When some strange error messages show up, it may also indicate that some components have not been installed. Google for the error message! Often, there are hints on how to mitigate the problem. Finally, there is also a troubleshooting section in the [dw-link manual](https://github.com/felias-fogg/dw-link/blob/master/docs/manual.pdf), which may be helpful.

The most annoying problem can be that an MCU might not be responsive anymore after a debugging session. The reason is that the RESET line, which is used as a communication line during debugging, has not been reenabled. While a regular exit of the debugger restores the RESET line, the debugger may be terminated without restoring it. An easy cure is to enter the debugger again and leave it regularly (after connecting to the target chip) with the command `quit`. If this does not help, you may have to use a High-Voltage programmer, such as [RescueAVR](https://www.tindie.com/products/fogg/rescueavr-hv-fuse-programmer-for-avrs/).
The most annoying problem can be that an MCU might not be responsive anymore after a debugging session. The reason is that the RESET line, which is used as a communication line during debugging, has not been re-enabled. While a regular exit of the debugger restores the RESET line, the debugger may be terminated without restoring it. An easy cure is to enter the debugger again and leave it regularly (after connecting to the target chip) with the command `quit`. If this does not help, you may have to use a High-Voltage programmer, such as [RescueAVR](https://www.tindie.com/products/fogg/rescueavr-hv-fuse-programmer-for-avrs/).

If you think you have found a bug, please post it on [issues](https://github.com/felias-fogg/dw-link/issues) and fill out the [issue form](issue_form.md) before.

## After debugging has finished

If you want to have a more durable debugging solution, then the [dw-link manual](https://github.com/felias-fogg/dw-link/blob/master/docs/manual.pdf) has some suggestions in Section 8, or you can buy the [dw-link probe](https://www.tindie.com/products/31798/) at Tindie.

So, after everything has been debugged, what do you do with your newly built hardware debugger? You don't have to throw it away. You can also use it as an ISP programmer (STK500 v1). In the Arduino IDE, such a programmer is called `AVR ISP` or `Arduino as ISP`.
So, after everything has been debugged, what do you do with your newly built hardware debugger? You don't have to throw it away. You can also use it as an ISP programmer (STK500 v1). In the Arduino IDE, such a programmer is called `Arduino as ISP` or `Arduino as ISP fast`. In the latter case, the upload speed is 115200 instead of 19200.

2 changes: 1 addition & 1 deletion docs/quickstart-Arduino-IDE2.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ If you think you have found a bug, please post it on [issues](https://github.com

## After debugging has finished

So, what do you do with your newly built hardware debugger after everything has been debugged? You don't have to throw it away. You can also use it as an ISP programmer (STK500 v1). In the Arduino IDE, such a programmer is called `AVR ISP` or `Arduino as ISP`.
So, what do you do with your newly built hardware debugger after everything has been debugged? You don't have to throw it away. You can also use it as an ISP programmer (STK500 v1). In the Arduino IDE, such a programmer is called `Arduino as ISP` or `Arduino as ISP fast`. In the latter case, the upload speed is 115200 instead of 19200.
11 changes: 4 additions & 7 deletions dw-link/dw-link.ino
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// because relevant input ports are not in the I/O range and therefore the tight timing
// constraints are not satisfied.

#define VERSION "4.0.3"
#define VERSION "4.0.4"

// some constants, you may want to change
// --------------------------------------
Expand Down Expand Up @@ -581,7 +581,7 @@ int main(void) {
if (ctx.state == NOTCONN_STATE) { // check whether there is an ISP programmer
if (UCSR0A & _BV(FE0)) // frame error -> break, meaning programming!
ISPprogramming(false);
#if 0 // disable ISP programming at HOSTBPS baud, seems to confuse dw-link sometimes
#if 1 // enable ISP programming at HOSTBPS baud, seems to confuse dw-link sometimes
else if (Serial.peek() == '0') // sign on for ISP programmer using HOSTBPS
ISPprogramming(true);
#endif
Expand Down Expand Up @@ -4691,11 +4691,8 @@ void ISPprogramming(__attribute__((unused)) boolean fast) {
}
leaveProgramMode();
wdt_disable();
if (!fast) {
Serial.end();
Serial.begin(HOSTBPS);
return; // return when finished
}
wdt_enable(WDTO_15MS);
while (1); //restart
}
}
#endif
Expand Down
Binary file added dw-server/x86_64-linux-gnu/dw-server
Binary file not shown.

0 comments on commit fb64149

Please sign in to comment.