Skip to content

Commit

Permalink
V4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
felias-fogg committed Jan 1, 2025
1 parent 5743f9e commit 06491d5
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 72 deletions.
7 changes: 4 additions & 3 deletions core-mods/ATTinyCore-mods/Add_dw-link-tools-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
AUTHOR=felias-fogg # Github username
REALAUTHOR=drazzy.com # Real author name
REPOSITORY=ATTinyCore # Github repo name
SUFFIX=_plus_Debug # suffix for index file

DWTOOLS_VERSION="1.3.0"

Expand Down Expand Up @@ -63,7 +64,7 @@ printf "File4: ${FILE4}, Size: ${SIZE4}, SHA256: ${SHASUM4}, URL4: ${URL4}\n"
#printf "File5: ${FILE5}, Size: ${SIZE5}, SHA256: ${SHASUM5}, URL5: ${URL5}\n"
printf "File6: ${FILE6}, Size: ${SIZE6}, SHA256: ${SHASUM6}, URL6: ${URL6}\n"

cp "package_${REALAUTHOR}_${REPOSITORY}_index.json" "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp"
cp "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json" "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp"

### NOTE: OS platform 5 needs to be added!

Expand Down Expand Up @@ -140,12 +141,12 @@ jq -r \
"url": $url6
}
]
}' "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp" > "package_${REALAUTHOR}_${REPOSITORY}_index.json"
}' "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp" > "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json"

rm $FILE1
rm $FILE2
rm $FILE3
rm $FILE4
#rm $FILE5
rm $FILE6
rm "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp"
rm "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp"
7 changes: 4 additions & 3 deletions core-mods/ATTinyCore-mods/Boards_manager_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
AUTHOR=felias-fogg # Github username
REALAUTHOR=drazzy.com # real author
REPOSITORY=ATTinyCore # Github repo name
SUFFIX=_plus_Debug

# Get the download URL for the latest release from Github
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/$AUTHOR/$REPOSITORY/releases/latest | grep "tarball_url" | awk -F\" '{print $4}')
Expand Down Expand Up @@ -50,7 +51,7 @@ SHA256="SHA-256:$(shasum -a 256 "$REPOSITORY-${DOWNLOADED_FILE#"v"}.tar.bz2" | a
# Create Github download URL
URL="https://${AUTHOR}.github.io/${REPOSITORY}/$REPOSITORY-${DOWNLOADED_FILE#"v"}.tar.bz2"

cp "package_${REALAUTHOR}_${REPOSITORY}_index.json" "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp"
cp "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json" "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp"

# Add new boards release entry
jq -r \
Expand Down Expand Up @@ -103,7 +104,7 @@ jq -r \
"version": "1.3.0"
}
]
}' "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp" > "package_${REALAUTHOR}_${REPOSITORY}_index.json"
}' "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp" > "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json"

# Remove files that's no longer needed
rm -rf "$REPOSITORY-${DOWNLOADED_FILE#"v"}" "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp"
rm -rf "$REPOSITORY-${DOWNLOADED_FILE#"v"}" "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp"
7 changes: 4 additions & 3 deletions core-mods/MicroCore-mods/Boards_manager_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
AUTHOR=felias-fogg
REALAUTHOR=MCUdude # Github username
REPOSITORY=MicroCore # Github repo name
SUFFIX=_plus_Debug

# Get the download URL for the latest release from Github
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/$AUTHOR/$REPOSITORY/releases/latest | grep "tarball_url" | awk -F\" '{print $4}')
Expand Down Expand Up @@ -50,7 +51,7 @@ SHA256="SHA-256:$(shasum -a 256 "$REPOSITORY-${DOWNLOADED_FILE#"v"}.tar.bz2" | a
# Create Github download URL
URL="https://${AUTHOR}.github.io/${REPOSITORY}/$REPOSITORY-${DOWNLOADED_FILE#"v"}.tar.bz2"

cp "package_${REALAUTHOR}_${REPOSITORY}_index.json" "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp"
cp "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json" "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp"

# Add new boards release entry
jq -r \
Expand Down Expand Up @@ -90,7 +91,7 @@ jq -r \
"version": "1.3.0"
}
]
}' "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp" > "package_${REALAUTHOR}_${REPOSITORY}_index.json"
}' "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp" > "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json"

# Remove files that's no longer needed
rm -rf "$REPOSITORY-${DOWNLOADED_FILE#"v"}" "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp"
rm -rf "$REPOSITORY-${DOWNLOADED_FILE#"v"}" "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp"
7 changes: 4 additions & 3 deletions core-mods/MiniCore-mods/Add_dw-link-tools-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
AUTHOR=felias-fogg # Github username
REALAUTHOR=MCUDude # Real author name
REPOSITORY=MiniCore # Github repo name
SUFFIX=_plus_Debug

DWTOOLS_VERSION="1.3.0"

Expand Down Expand Up @@ -63,7 +64,7 @@ printf "File4: ${FILE4}, Size: ${SIZE4}, SHA256: ${SHASUM4}, URL4: ${URL4}\n"
#printf "File5: ${FILE5}, Size: ${SIZE5}, SHA256: ${SHASUM5}, URL5: ${URL5}\n"
printf "File6: ${FILE6}, Size: ${SIZE6}, SHA256: ${SHASUM6}, URL6: ${URL6}\n"

cp "package_${REALAUTHOR}_${REPOSITORY}_index.json" "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp"
cp "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json" "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp"

### NOTE: OS platform 5 needs to be added!

Expand Down Expand Up @@ -140,12 +141,12 @@ jq -r \
"url": $url6
}
]
}' "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp" > "package_${REALAUTHOR}_${REPOSITORY}_index.json"
}' "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp" > "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json"

rm $FILE1
rm $FILE2
rm $FILE3
rm $FILE4
#rm $FILE5
rm $FILE6
rm "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp"
rm "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp"
13 changes: 7 additions & 6 deletions core-mods/MiniCore-mods/Boards_manager_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
##########################################################

# Change these to match your repo
AUTHOR=felias-fogg
REALAUTHOR=MCUdude # Github username
REPOSITORY=MiniCore # Github repo name
AUTHOR=felias-fogg # Github username
REALAUTHOR=MCUdude # real author!
REPOSITORY=MiniCore # Github repo
SUFFIX=_plus_Debug # suffix to distinguish it

# Get the download URL for the latest release from Github
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/$AUTHOR/$REPOSITORY/releases/latest | grep "tarball_url" | awk -F\" '{print $4}')
Expand Down Expand Up @@ -50,7 +51,7 @@ SHA256="SHA-256:$(shasum -a 256 "$REPOSITORY-${DOWNLOADED_FILE#"v"}.tar.bz2" | a
# Create Github download URL
URL="https://${AUTHOR}.github.io/${REPOSITORY}/$REPOSITORY-${DOWNLOADED_FILE#"v"}.tar.bz2"

cp "package_${REALAUTHOR}_${REPOSITORY}_index.json" "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp"
cp "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json" "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp"

# Add new boards release entry
jq -r \
Expand Down Expand Up @@ -99,7 +100,7 @@ jq -r \
"version": "1.3.0"
}
]
}' "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp" > "package_${REALAUTHOR}_${REPOSITORY}_index.json"
}' "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp" > "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json"

# Remove files that's no longer needed
rm -rf "$REPOSITORY-${DOWNLOADED_FILE#"v"}" "package_${REALAUTHOR}_${REPOSITORY}_index.json.tmp"
rm -rf "$REPOSITORY-${DOWNLOADED_FILE#"v"}" "package_${REALAUTHOR}_${REPOSITORY}${SUFFIX}_index.json.tmp"
11 changes: 11 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog for dw-link

## Version 4.0.1
- Fixed: missing declarations in dw-link.h
- Added: new enum type FuseByte
- Changed: first parameter in ispProgramFuse is now of type FuseByte
instead a boolean
- Changed: code in ispProgramFuse, which now more straightforward and
allows to change the extended fuse as well
- Added: bootloader reset vector is disabled when chip is erased for
M328/168/88 in targetISPConnect
- The naming scheme for boards manager URLs was changed by suffixing the core name with "\_plus\_Debug". Having names different from the original ones guarantees that the modified revisions will be shown when installing the package. This needs to be reflected in the documentation.

## Version 4.0.0

- Added: Debugging in Arduino IDE 2 is now supported. This affects
Expand Down
12 changes: 7 additions & 5 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ We need to install two new cores, which are forks of [MiniCore](https://github.c
Open the `Preference` dialog of the Arduino IDE and paste the following two URLs into the list of `Additional boards manager URLs`:

```
https://felias-fogg.github.io/ATTinyCore/package_drazzy.com_ATTinyCore_index.json
https://felias-fogg.github.io/ATTinyCore/package_drazzy.com_ATTinyCore_plus_Debug_index.json
```

```
https://felias-fogg.github.io/MiniCore/package_MCUdude_MiniCore_index.json
https://felias-fogg.github.io/MiniCore/package_MCUdude_MiniCore_plus_Debug_index.json
```

Then, you need to start the `Boards Manager`, which you find under `Tools`-->`Board`. Install MiniCore and ATTinyCore, choosing the most recent version with a `+debug` postfix. Note that the packages include tools that are incompatible with older OS versions. In particular, 32-bit host systems are not supported. If you have such a system, you only can use the approach described in Sections 6 and 7.
Expand Down Expand Up @@ -345,11 +345,11 @@ A more minimalistic approach might be better if you are uncomfortable using Ardu
In order to be able to debug the MCUs mentioned in the Introduction, you need to install 3rd party cores. For the classic ATtiny family, this is [ATTinyCore](https://github.com/SpenceKonde/ATTinyCore/blob/master/Installation.md) and for the ATmegaX8 family (including the Arduino UNO), it is [MiniCore](https://github.com/MCUdude/MiniCore). To be able to generate object files that are debug-friendly, you need to install my fork of the board manager files. You first have to add URLs under the `Additional Boards Manager URLs` in the `Preference` menu:

- ```
https://felias-fogg.github.io/ATTinyCore/package_drazzy.com_ATTinyCore_index.json
https://felias-fogg.github.io/ATTinyCore/package_drazzy.com_ATTinyCore_plus_Debug_index.json
```

- ```
https://felias-fogg.github.io/MiniCore/package_MCUdude_MiniCore_index.json
https://felias-fogg.github.io/MiniCore/package_MCUdude_MiniCore_plus_Debug_index.json
```

After that, you can download and install the board using the `Boards Manager`, which you find in the Arduino IDE menu under `Tools`-->`Board`. Currently, choose the versions that have a `+debug` suffix in their version number! I hope the capability of generating debug-friendly binaries will be incorporated in future versions of these board manager files, in which case you can rely on the regular board manager files by MCUdude and SpenceKonde.
Expand Down Expand Up @@ -1033,7 +1033,7 @@ Error # | Meaning
--:|---
1 | Connection error: No response to ISP and debugWIRE communication; check wiring
2 | Connection error: MCU type is not supported
3 | Connection error: Lock bits are set
3 | Connection error: Lock bits or BOOTRST could not be cleared
4 | Connection error: MCU has PC with stuck-at-one bits
5 | MCU type does not match
6 | Unknown connection error
Expand Down Expand Up @@ -1162,3 +1162,5 @@ Initial version

* Integration of Arduino IDE 2
* New fatal error: Wrong MCU type (caused by monitor mcu command)
* Renamed fatal error 3
* The *boards manager URLs* have changed: a suffix `_plus_Debug` has been added to the core name.
6 changes: 2 additions & 4 deletions docs/quickstart-AVR-GDB.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ You probably already have installed the Arduino IDE. If not, download and instal

Open the `Preference` dialog of the Arduino IDE and paste the following two URLs into the list of `Additional boards manager URLs`:

https://felias-fogg.github.io/ATTinyCore/package_drazzy.com_ATTinyCore_index.json
https://felias-fogg.github.io/ATTinyCore/package_drazzy.com_ATTinyCore_plus_Debug_index.json
```
https://felias-fogg.github.io/MiniCore/package_MCUdude_MiniCore_index.json
https://felias-fogg.github.io/MiniCore/package_MCUdude_MiniCore_plus_Debug_index.json
```

And you need to delete the MiniCore-URL hosted by MCUDude if you already have that in your URL list.

Close the `Preference` dialog with `OK`. Now we want to install the two cores `ATTinyCore` and `MiniCore`.

* Select `Tools` -> `Board` -> `Board Managers` ... . This will open the Boards Manager dialog.
Expand Down
6 changes: 2 additions & 4 deletions docs/quickstart-Arduino-IDE2.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ You probably already have installed the Arduino IDE 2. If not, download and inst

Open the `Preference` dialog of the Arduino IDE and paste the following two `Board Manager URLs` into the list:

https://felias-fogg.github.io/ATTinyCore/package_drazzy.com_ATTinyCore_index.json
https://felias-fogg.github.io/ATTinyCore/package_drazzy.com_ATTinyCore_plus_Debug_index.json
```
https://felias-fogg.github.io/MiniCore/package_MCUdude_MiniCore_index.json
https://felias-fogg.github.io/MiniCore/package_MCUdude_MiniCore_plus_Debug_index.json
```

And you need to delete the MiniCore-URL hosted by MCUDude if you already have that in your URL list.

Close the `Preference` dialog with `OK`. Now, we want to install the two cores, `ATTinyCore` and `MiniCore`.

* Select `Tools` -> `Board` -> `Board Managers` ... . This will open the Boards Manager dialog.
Expand Down
25 changes: 14 additions & 11 deletions docs/wishlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@

##### List of tasks to work on:

* write a short debug description for PIO

* produce short youtube video to promote dw-link probe

* use "blinkmodes.ino" in order to highlight embedded programming, perhaps in a video?

* try to use seer GUI again

* Implement STK500v2 protocol

* try integration of tool into IDE 2.0 again

* debug tiny13 problem, perhaps by reverting back to the version in
2022, when it seemed to work

Expand All @@ -43,8 +37,6 @@

* implement semi-hosting

* integrate into the Arduino VSC plugin

* design case for debugger and print it

* a mode where reads & writes are double-checked: "monitor
Expand All @@ -56,11 +48,15 @@

##### List of tasks done:

* clean up Gede interface
- try integration of tool into IDE 2.0 again

- clean up Gede interface

* no multiple main breaks oints
* no multiple main breaks oints

* reloading files in GUI when reloading files
* reloading files in GUI when reloading files

- write a short debug description for PIO

* write/design setup for UNO debugging with connected USB cable

Expand Down Expand Up @@ -96,3 +92,10 @@



**List of tasks abandoned**:

- try to use seer GUI again
- integrate into the Arduino VSC plugin



13 changes: 6 additions & 7 deletions dw-link/dw-link.h
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
void blockIRQ();
void unblockIRQ();
void setupio();
void monitorSystemLoadState();
void initSession();
void setupio();
void reportFatalError(byte, boolean);
void setSysState(statetype);
void gdbHandleCmd();
void gdbParsePacket(const byte *);
void gdbParseMonitorPacket(byte *);
int gdbDetermineMonitorCommand(char *, char &);
void gdbHelp();
void gdbCheckMcu(const char *);
boolean gdbConnect(boolean);
boolean gdbStop(boolean);
void gdbReportConnected();
void gdbReportLastError();
void gdbTimeoutCounter();
void gdbSteppingMode(char);
void gdbVersion();
void gdbSpeed(char);
byte findArg(const byte []);

void gdbSetMaxBPs(byte);
void gdbGetMaxBPs();
void gdbReportFlashCount();
void gdbReportRamUsage();
boolean gdbConnect(boolean);
boolean powerCycle(boolean);
void power(boolean);
boolean gdbStop(boolean);
void gdbReportConnected();
boolean gdbReset();
void gdbSetFuses(Fuses);
void gdbGetFuses(boolean, boolean);
Expand Down Expand Up @@ -128,7 +127,7 @@ boolean enterProgramMode();
void leaveProgramMode();
unsigned int ispGetChipId();
byte ispReadFuse(boolean);
boolean ispProgramFuse(boolean, byte, byte);
boolean ispProgramFuse(FuseByte, byte, byte);
boolean ispEraseFlash();
boolean ispLocked();
boolean setMcuAttr(unsigned int);
Expand Down
Loading

0 comments on commit 06491d5

Please sign in to comment.